Process monitoring method and electronic equipment

By identifying the Java process exception type and performing corresponding automated response actions, the problem of Java process exception processing time is solved, the processing efficiency is improved, and the stable operation of the system is ensured.

CN120371580APending Publication Date: 2025-07-25HENAN QINWEI DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510449773.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, Java process exception handling takes a long time, resulting in worsening system operation problems and low processing efficiency of operation and maintenance personnel.

Method used

By identifying process exception types, determining exception response rules and executing corresponding actions, automated processing is achieved, including increasing memory size, releasing process memory, increasing the number of CPU cores, etc.

Benefits of technology

It shortens the processing time of exception processes, improves processing efficiency, reduces system resource losses, and ensures the stable operation of the operating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371580A_ABST
    Figure CN120371580A_ABST
Patent Text Reader

Abstract

The invention provides a process monitoring method and electronic device.The method comprises the steps that under the condition that it is detected that a target process is in an abnormal state, the process exception type of the target process is recognized; determining a matched exception response rule based on the process exception type, and determining an exception response action of the target process based on the exception response rule; wherein the exception response rule is used for indicating a reason for exception of the target process, and the exception response action is used for representing an action executed for the exception response rule; and executing the abnormal response action to obtain a response result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of process monitoring. Specifically, it relates to a process monitoring method and an electronic device. Background Art

[0002] Currently, Java is still the most suitable programming language for the backend. Java is used to provide website services and run favorite applications. To solve various exceptions that occur during the running of Java processes, such as memory exceptions, CPU exceptions, etc., the industry usually uses the Linux system or the command tools built into the JVM (Java Virtual Machine) to detect the Java processes running on the current system. When an exception is found, the operation and maintenance personnel first make a judgment and analysis, and then handle the exception. Or use commercial tools to monitor information such as the performance, memory, and threads of Java processes, so as to generate an analysis report.

[0003] For the current technology, after the operation and maintenance personnel obtain an exception warning or an analysis report, they need to analyze and solve the problem according to the exception warning or the analysis report. This processing process takes a long time and has low efficiency. Therefore, more serious problems are caused to the system operation. Summary of the Invention

[0004] At least one embodiment of this application provides a process monitoring method and an electronic device, which can improve the processing efficiency of abnormal processes.

[0005] In a first aspect, an embodiment of this application provides a process monitoring method, including:

[0006] When it is detected that the target process is in an abnormal state, identify the process exception type of the target process;

[0007] Based on the process exception type, determine a matching exception response rule, and based on the exception response rule, determine the exception response action of the target process; wherein, the exception response rule is used to indicate the reason for the exception of the target process, and the exception response action is used to represent the action executed for the exception response rule;

[0008] Execute the exception response action to obtain a response result.

[0009] In the above implementation, by determining the exception response rule based on the process exception type, and then determining the exception response action according to the exception response rule, and handling the process exception according to this exception response action, automatic solution processing of abnormal processes can be achieved, thereby shortening the processing time of abnormal processes, improving the processing efficiency of abnormal processes, and further alleviating the technical problem that the system operation problem is aggravated due to the slow processing of abnormal processes in the prior art.

[0010] In an alternative embodiment, determining the abnormal response action of the target process based on the abnormal response rule includes:

[0011] Obtaining a plurality of preset abnormal response actions corresponding to the abnormal response rule;

[0012] Determining the abnormal response action of the target process among the plurality of preset abnormal response actions.

[0013] As can be seen from the above description, by setting one or more abnormal response actions for different abnormal response rules, the secondary occurrence of abnormal operation failures of the operating system can be reduced, and the consumption of system resources can be reduced.

[0014] In an alternative embodiment, executing the abnormal response action to obtain a response result includes:

[0015] Determining the running mode of the abnormal response action;

[0016] When the running mode of the abnormal response action is automatic operation, automatically execute the abnormal response action to obtain a first response result;

[0017] When it is determined that the running mode of the abnormal response action is manual operation, send a message notification to the operation and maintenance object, and determine a second response result based on the response action of the operation and maintenance object to the message notification.

[0018] Through the above processing method, the integration of automatic operation and manual operation of the abnormal response action can be realized, so as to provide more abnormal solution for users on the basis of quickly restoring the operating system and ensuring the stable operation of the operating system.

[0019] In an alternative embodiment, identifying the process abnormal type of the target process includes:

[0020] Obtaining the abnormal alarm information of the target process;

[0021] Determining the target abnormal type according to the abnormal alarm information, and determining the process abnormal type of the target process among the multi-level sub-abnormal types to which the target abnormal type belongs according to the abnormal alarm information.

[0022] Through the above processing method, the refinement of the process abnormal type of the target process can be realized, a more targeted and more matching process abnormal type can be determined for the target process, and then a more matching abnormal response rule and abnormal response action can be determined for the target process, so that the process abnormality can be solved more quickly and accurately.

[0023] In an alternative embodiment, determining the matching abnormal response rule based on the process abnormal type includes:

[0024] Extracting the field content of the target field from the abnormal alarm information of the target process; wherein the target field is used to indicate the reason why the target process is abnormal;

[0025] Determine a preset exception response rule corresponding to the field content as the matched exception response rule; wherein the preset exception response rule is an exception response rule pre-set for the process exception type.

[0026] Through the above processing method, the cause of the target process failure can be accurately analyzed, and the method to solve the failure can be determined, thereby realizing automatic response processing of the failure, thereby reducing the failure time of the operating system.

[0027] In an optional implementation, the process exception type includes: multi-level sub-exception types to which a memory exception belongs and / or multi-level sub-exception types to which a CPU exception belongs; wherein, the multi-level sub-exception types to which the memory exception belongs include: insufficient memory and / or memory overflow, and the multi-level sub-exception types to which the CPU exception belongs include: CPU kernel exception.

[0028] In the above implementation, by setting the process exception type to memory exception and CPU exception, the process exceptions that frequently occur in the operating system can be automatically processed, thereby improving the processing efficiency of abnormal processes, and further alleviating the technical problem of the prior art that the system operation problems are aggravated due to the slow processing of abnormal processes.

[0029] In an optional implementation, when the process exception type is insufficient memory, determining a matching exception response rule based on the process exception type, and determining an exception response action of the target process based on the exception response rule, includes:

[0030] Determine a first exception response rule that matches the insufficient memory; wherein the first exception response rule includes: insufficient physical memory and / or a large application program occupies a memory greater than a preset threshold;

[0031] Determine the first exception response action of the target process based on the first exception response rule; wherein, if the first exception response rule is that the physical memory is insufficient, the first exception response action includes: increasing the memory size and / or reducing the process memory; if the first exception response rule is that the memory occupied by the large application is greater than the first threshold, the first exception response action includes: releasing the process memory.

[0032] In the above embodiments, for memory exceptions, automated solutions can be provided according to different situations, so as to determine a more suitable solution for the target process, and then the process exception can be resolved more quickly and accurately.

[0033] In an alternative embodiment, when the process exception type is the memory overflow, determining a matching exception response rule based on the process exception type, and determining an exception response action of the target process based on the exception response rule includes:

[0034] Determining a second exception response rule that matches the memory shortage; wherein the second exception response rule includes: heap memory overflow and / or garbage collection overhead exceeding a second threshold;

[0035] Determining a second exception response action of the target process based on the second exception response rule; wherein, if the second exception response rule is the heap memory overflow, the second exception response action includes: increasing the maximum heap memory size parameter, and if the second exception response rule is the garbage collection overhead exceeding the second threshold, the second exception response action includes: increasing the maximum heap memory size parameter and / or canceling the overhead limit of garbage collection.

[0036] In the above embodiments, for memory exceptions, automated solutions can be provided according to different situations, so as to determine a more suitable solution for the target process, and then the process exception can be resolved more quickly and accurately.

[0037] In an alternative embodiment, when the process exception type is the CPU exception, determining a matching exception response rule based on the process exception type, and determining an exception response action of the target process based on the exception response rule includes:

[0038] Determining a third exception response rule that matches the memory shortage; wherein the third exception response rule includes: insufficient number of cores in the CPU;

[0039] Determining a third exception response action of the target process based on the third exception response rule; wherein the third exception response action includes: increasing the number of cores in the CPU.

[0040] In the above embodiments, for CPU core exceptions, automated solutions can be provided, thereby shortening the processing time of exception processes and improving the processing efficiency of exception processes.

[0041] In a second aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps in the above first aspect or any possible implementation manner in the first aspect are executed.

[0042] An embodiment of the present application provides a process monitoring method and an electronic device. In the embodiment of the present application, when it is detected that the target process is in an abnormal state, the process abnormal type of the target process is identified; then, based on the process abnormal type, a matching abnormal response rule is determined, and based on the abnormal response rule, the abnormal response action of the target process is determined; wherein, the abnormal response rule is used to indicate the reason for the abnormality of the target process, and the abnormal response action is used to represent the action executed for the abnormal response rule; finally, the abnormal response action is executed to obtain a response result.

[0043] In the above implementation manner, by determining the abnormal response rule based on the process abnormal type, and then determining the abnormal response action according to the abnormal response rule, and processing the process abnormality according to the abnormal response action, the automatic solution processing of the abnormal process can be realized, thereby shortening the processing time of the abnormal process, improving the processing efficiency of the abnormal process, and further alleviating the technical problem that the system operation problem caused by the slow processing of the abnormal process in the prior art is aggravated.

[0044] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. The drawings herein are incorporated into the specification and constitute a part of this specification. These drawings show embodiments that conform to the present application and are used together with the specification to illustrate the technical solutions of the present application. It should be understood that the following drawings only show some embodiments of the present application, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0046] Figure 1 Shows a flowchart of a process monitoring method provided by an embodiment of the present application;

[0047] Figure 2 Shows a flowchart of another process monitoring method provided by an embodiment of the present application;

[0048] Figure 3It shows a schematic flow chart of determining an exception response rule and an exception response action for a memory exception provided by an embodiment of the present application;

[0049] Figure 4 It shows an implementation schematic diagram of a method for adding process monitoring to a cloud host system provided by an embodiment of the present application;

[0050] Figure 5 It shows a schematic diagram of a process monitoring device provided by an embodiment of the present application;

[0051] Figure 6 It shows a schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0052] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Usually, the components of the embodiments of the present application described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but merely represents the selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts shall fall within the scope of protection of the present application.

[0053] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0054] The term "and / or" in this article only describes an association relationship and indicates that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" in this article means any one of a plurality or any combination of at least two of a plurality. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set composed of A, B, and C.

[0055] Before making a specific description, the terms related to the embodiments of the present application are explained as follows:

[0056] Java: An object-oriented programming language and one of the preferred languages in multiple fields such as enterprise application development, Android application development, and Web application development.

[0057] Process: It refers to a program that is running on a computer. A process used to be the basic operating unit of a time-sharing system. In a system designed for processes (such as early UNIX, Linux 2.4 and earlier versions), a process is the basic execution entity of a program; in a system designed for threads (such as most contemporary operating systems, Linux 2.6 and later versions), a process itself is not the basic running unit, but a container for threads. A program itself is only a description of instructions, data and their organizational forms, and a process is the actual running instance of the program (those instructions and data).

[0058] Automation: It refers to the process in which a machine device, system or process (production, management process) achieves the expected goal through automatic detection, information processing, analysis and judgment, and manipulation and control according to human requirements with little or no direct human participation.

[0059] Orchestration: Arrange in sequence according to the purpose; allocate and arrange the execution of tasks.

[0060] The embodiments of the present application provide a process monitoring method and an electronic device. In the embodiments of the present application, when it is detected that the target process is in an abnormal state, the type of process abnormality of the target process is identified; then, based on the type of process abnormality, a matching exception response rule is determined, and based on the exception response rule, the exception response action of the target process is determined; wherein, the exception response rule is used to indicate the reason for the abnormality of the target process, and the exception response action is used to represent the action executed for the exception response rule; finally, the exception response action is executed to obtain a response result.

[0061] In the above embodiment, by determining the exception response rule based on the type of process abnormality, and then determining the exception response action according to the exception response rule, and processing the process abnormality according to the exception response action, the automatic solution of the abnormal process can be realized, thereby shortening the processing time of the abnormal process, improving the processing efficiency of the abnormal process, and alleviating the technical problem of the aggravation of the system operation problem caused by the slow processing of the abnormal process in the prior art.

[0062] To facilitate the understanding of this embodiment, first, a process monitoring method disclosed in the embodiments of the present application will be introduced in detail. The execution subject of the process monitoring method provided in the embodiments of the present application is generally an electronic device with certain computing capabilities, such as a server, a terminal, etc. In some possible implementation manners, the process monitoring method can be implemented by a processor calling computer-readable instructions stored in a memory.

[0063] See Figure 1 As shown, it is a flowchart of a process monitoring method provided by an embodiment of the present application. The method includes steps S101 to S103, where:

[0064] S101: When it is detected that the target process is in an abnormal state, identify the process abnormal type of the target process.

[0065] Here, an operation and maintenance monitoring tool can be used to monitor the processes in the operating system that are in a running state, so as to identify the processes in an abnormal state among the above processes, that is, the target processes. Among them, the operation and maintenance monitoring tool can be the Linux system or the built-in command tools jps, jstat, jmap, jstack, Jconsole of the JVM. Through this operation and maintenance monitoring tool, the processes running on the current operating system can be monitored, and after detecting process abnormalities, the abnormal alarm information of the process can be obtained. Then, the abnormal alarm information of the target process can be analyzed to identify the process abnormal type of the target process. Among them, the process abnormal type can be: memory abnormality (insufficient memory or memory overflow), CPU abnormality, disk space abnormality, and disk mounting abnormality.

[0066] In the embodiment of the present application, the process abnormal type of the target process can be identified among multiple preset process abnormal types. Among them, the multiple preset process abnormal processes are process abnormalities that can be monitored and can be automatically resolved, which will not be listed one by one here.

[0067] S102: Determine a matching abnormal response rule based on the process abnormal type, and determine the abnormal response action of the target process based on the abnormal response rule; where the abnormal response rule is used to indicate the reason for the abnormality of the target process, and the abnormal response action is used to represent the action executed for the abnormal response rule.

[0068] In the embodiment of the present application, for each process abnormal type, a corresponding abnormal response rule is set. For each abnormal response rule, one or more matching abnormal response actions are preset. Among them, the abnormal response action is a solution proposed for the reason of the current process abnormality.

[0069] For example, as Figure 3 shown, if the process abnormal type is insufficient memory, then the abnormal response rule can be insufficient physical memory and large application programs occupying too much memory; if the process abnormal type is memory overflow, then the abnormal response rule can be heap memory overflow or excessive garbage collection (GC) overhead.

[0070] Here, one or more matching abnormal response rules can be determined based on the process abnormal type. For each abnormal response rule, one or more abnormal response actions can be determined.

[0071] S103: Execute the abnormal response action to obtain a response result.

[0072] After determining one or more abnormal response actions, the one or more abnormal response actions can be choreographed to execute the abnormal response actions after choreography, and then a response result can be obtained.

[0073] As can be seen from the above description, the embodiment of the present application proposes a process monitoring method. Through this process monitoring method, abnormal response rules and abnormal response actions can be preset, and then a solution can be given to the detected abnormal process according to the abnormal response rules and abnormal response actions, and the abnormal handling process can be automatically completed, so as to realize that the abnormal problems that need to be solved manually by operation and maintenance personnel are automatically responded and solved by the system.

[0074] The above steps will be described in detail below in conjunction with specific embodiments.

[0075] In the embodiment of the present application, when the above step S101 detects that the target process is in an abnormal state, the process abnormal type of the target process is identified, which specifically includes the following steps:

[0076] Step S11: After detecting the abnormal alarm information of the target process;

[0077] Step S12: Determine the target abnormal type according to the abnormal alarm information, and determine the process abnormal type of the target process among the multi-level sub-abnormal types to which the target abnormal type belongs according to the abnormal alarm information.

[0078] In the embodiment of the present application, the operation and maintenance monitoring tool can be scheduled regularly to monitor the processes running in the operating system, for example, Java processes. In addition, for other types of processes, the processes that can be monitored by the operation and maintenance monitoring tool are all within the protection scope of the embodiment of the present application.

[0079] After the operation and maintenance monitoring tool detects the abnormal alarm information of the target process, the log information used to indicate the process abnormal type can be extracted from the abnormal alarm information, and then the pending abnormal type of the target process can be determined according to the log information. After that, the pending abnormal type can be matched with the preset abnormal types, and the matched preset abnormal type can be determined as the target abnormal type of the target process; wherein, if there is no abnormal type in the preset abnormal types that matches the pending abnormal type, a notification message is sent to the operation and maintenance object, and the notification message carries the pending abnormal type and the message that the pending abnormal type does not belong to the preset abnormal types.

[0080] After obtaining the target exception type, the multi-level sub-exception types to which the target exception type belongs can be determined. The number of levels is subject to what can be achieved, and no specific limitation is set in the embodiments of the present application. Moreover, for each level of sub-exception type, corresponding exception response rules and exception response actions are set.

[0081] In an alternative embodiment, the sub-exception types matching the target process can be determined level by level according to the exception warning information until the sub-exception type of the last level is determined as the process exception type of the target process.

[0082] In another alternative embodiment, the sub-exception types matching the target process can be determined level by level according to the exception warning information until the sub-exception type with the highest similarity to the exception indicated in the exception warning information is determined, and the sub-exception type with the highest similarity is determined as the process exception type of the target process. Here, the sub-exception type with the highest similarity may not be the sub-exception type of the last level.

[0083] Through the above processing methods, the refinement of the process exception type of the target process can be achieved, a more targeted and more matching process exception type can be determined for the target process, and then a more matching exception response rule and exception response action can be determined for the target process, so that the process exception can be solved more quickly and accurately.

[0084] In the embodiments of the present application, the above step S102 determines the matching exception response rule based on the process exception type, which specifically includes the following steps:

[0085] Step S21: Extract the field content of the target field from the exception warning information of the target process; wherein, the target field is used to indicate the reason for the exception of the target process;

[0086] Step S22: Determine the preset exception response rule corresponding to the field content as the matching exception response rule; wherein, the preset exception response rule is the exception response rule preset for the process exception type.

[0087] In the embodiments of the present application, the reason for the exception of the target process, that is, the field content of the target field, can be extracted from the log information of the exception warning information. Then, the field content of the target field is matched with one or more preset exception response rules belonging to the process exception type, and then the preset exception response rule matching the field content is determined as the exception response rule matching the process exception type of the target process.

[0088] For example, if the process exception type is out-of-memory, then the preset exception response rules that match this out-of-memory are "heap out-of-memory" and "excessive GC overhead". At this time, the field content can be matched with "heap out-of-memory" and "excessive GC overhead" respectively. Suppose "heap out-of-memory" matches the field content, then "heap out-of-memory" is determined as the exception response rule that matches the process exception type of the target process.

[0089] Here, if multiple matching exception response rules are determined through the matching of the field content, then the exception response actions of each exception response rule can be determined respectively, and the exception response actions can be choreographed, and the choreographed exception response actions can be executed.

[0090] In addition, a corresponding utility label can be set for each exception response rule. Through this utility label, it is possible to determine the estimated time required to solve the abnormal process by using the exception response action under this exception response rule, and the degree of abnormal solution for the abnormal process. At this time, the urgency, importance of the target process, and the utility label can be combined to further screen multiple exception response rules. For example, for a target process with a higher urgency and importance, an exception response rule with a shorter estimated time and that can completely solve the process exception can be selected.

[0091] Through the above processing method, the cause of the failure of the target process can be accurately analyzed, and the method to solve the failure can be determined, thereby realizing the automated response processing of the failure, and reducing the failure time of the operating system.

[0092] In the embodiment of the present application, the above step S102 determines the exception response action of the target process based on the exception response rule, which specifically includes the following steps:

[0093] Step S23: Obtain multiple preset exception response actions corresponding to the exception response rule;

[0094] Step S24: Determine the exception response action of the target process among the multiple preset exception response actions.

[0095] In the embodiment of the present application, for each exception response rule, one or more preset exception response actions can be set. After determining the exception response rule, the exception response action of the target process can be determined among at least one preset exception response action of each exception response rule. Here, the exception response action of the target process can be all or part of the preset exception response actions.

[0096] Here, the exception response action of the target process is an action that can meet the timeliness requirements and urgency of the target process and can solve the failure of the target process.

[0097] In an embodiment of the present application, an abnormal response action of a target process can be screened from multiple preset abnormal response actions according to multiple screening dimensions, where the multiple screening dimensions include: the action priority of the preset abnormal response action, the process time limit requirement of the target process, the importance level of the process (or, the urgency level of the process), and the processing method of the preset abnormal response action.

[0098] As can be seen from the above description, by setting one or more abnormal response actions for different abnormal response rules, the secondary occurrence of abnormal operating faults of the operating system can be reduced, and the consumption of system resources can be reduced.

[0099] Several methods for determining the abnormal response action of the target process will be introduced below.

[0100] Method 1:

[0101] In this method, to determine the abnormal response action of the target process among the multiple preset abnormal response actions, the following specific steps are included:

[0102] First, obtain the action priority of each preset abnormal response action;

[0103] Second, based on the action priority, determine the preset abnormal response action that meets the preset priority requirement as the abnormal response action of the target process.

[0104] In an embodiment of the present application, for each preset abnormal response action, a corresponding action priority can be set.

[0105] After obtaining the action priority of each preset abnormal response action, the preset abnormal response action corresponding to the highest action priority can be determined as the abnormal response action of the target process.

[0106] In addition, the abnormal solution degree of the target process can also be combined to determine the preset abnormal response action that meets the preset priority requirement as the abnormal response action of the target process. For example, multiple preset abnormal response actions that can meet the abnormal solution degree requirement of the target process can be selected in the order of decreasing action priority as the abnormal response actions of the target process. For instance, if the preset abnormal response action corresponding to the highest action priority cannot completely solve the abnormality of the target process, at this time, the next highest action priority preset abnormal response action can be selected until the abnormality of the target process can be solved and the target process can operate stably.

[0107] Here, the action priority can be used to indicate the processing method (automated processing or manual processing), processing time consumption, and degree of exception resolution of the preset exception response actions. Among them, the action priority of automated processing is higher than that of manual processing; the lower the processing time consumption, the higher the action priority; the higher the degree of exception resolution, the higher the action priority.

[0108] Through the above processing method, a more efficient exception response action can be selected for the target process, thereby shortening the processing time consumption of the exception process and improving the processing efficiency of the exception process.

[0109] Method 2:

[0110] In this method, determining the exception response action that matches the exception response rule among the multiple preset exception response actions includes the following steps:

[0111] First, obtain the timeliness requirement of the target process; where the timeliness requirement is used to indicate the urgency of the target process;

[0112] Secondly, determine the preset exception response action that meets the timeliness requirement of the target process as the exception response action of the target process.

[0113] In the embodiments of the present application, if the target process sets a timeliness requirement, the timeliness requirement of the target process can also be obtained. Through this timeliness requirement, information such as the urgency of the target process, the planned completion time of the target process, and the importance of the task executed by the target process can be determined.

[0114] After obtaining the timeliness requirement, a preset exception response action that meets the timeliness requirement can be determined, and this preset exception response action is determined as the exception response action of the target process.

[0115] Specifically, a timeliness label can be set for each preset exception response action. Through this timeliness label, the estimated time consumption for this preset exception response action to handle this exception can be indicated. Then, according to this timeliness label, a preset exception response action that meets the timeliness requirement is determined, thereby obtaining the exception response action of the target process.

[0116] Through the above processing method, by determining the exception response action of the target process according to the timeliness requirement of the target process, the fault time of the operating system can be reduced, thereby quickly ensuring the normal operation of the target process.

[0117] Method 3:

[0118] In this way, a preset exception response action with the highest action priority and automated processing mode can be determined. Then, it is determined whether the preset exception response action can meet the preset priority requirement or the time limit requirement of the target process. Among them, if it can meet the preset priority requirement or the time limit requirement of the target process, the preset exception response action is determined as the exception response action of the target process. If it does not meet the preset priority requirement or the time limit requirement of the target process, the next preset exception response action with the highest action priority and automated processing mode is continued to be selected. Among them, if there is no preset exception response action for automated processing, the preset exception response action with the highest action priority and manual processing mode can be continued to be selected until the preset priority requirement or the time limit requirement of the target process is met.

[0119] In the embodiment of the present application, the above step S102 determines a matching exception response rule based on the process exception type, and determines the exception response action of the target process based on the exception response rule. Specifically, it further includes the following steps:

[0120] Step S31: Determine a first historical exception record matching the process exception type in the historical exception record; where the historical exception record is used to record the exception response rule and the exception response action of the exception process at the historical moment;

[0121] Step S32: Determine the first historical exception record with the highest exception handling score to obtain a second historical exception record;

[0122] Step S33: Determine the exception response rule recorded in the second historical exception record as the matching exception response rule, and determine the exception response action recorded in the second historical exception record as the exception response action.

[0123] In the embodiment of the present application, the exception record of each process each time can be recorded in the database, and this record can be called a historical exception record. Among them, the historical exception record carries the name of the exception process, the process exception type, the time when the process occurs, the exception response rule, and the exception response action. In addition, after processing the exception situation of each process, it is also necessary to score the processing process of the exception situation of each process to obtain an exception handling score, and use this exception handling score as the score of the historical exception record.

[0124] Here, the exception handling score can be determined based on the total processing time of each exception process, the content of the response result (for example, successful exception handling, or, failed exception handling), the time length between this process and the next exception, etc.

[0125] The exception handling score is not fixed, but dynamically changes. After the exception process is completed, the exception handling score is related to the duration for which the process has been continuously running normally. For example, for every increase in the preset duration, the exception handling score increases by a predetermined value.

[0126] After identifying the process exception type of the target process, historical exception records can be retrieved from the database, and historical exception records that match the process exception type are determined in the historical exception records, which are called the first historical exception records. Then, the first historical exception record with the highest processing score is determined and denoted as the second historical exception record. At this time, the exception response rule in the second historical exception record can be determined as the exception response rule for the target process, and the exception response action in the second historical exception record can be determined as the exception response action for the target process.

[0127] Through the above processing method, by determining the exception response rule and exception response action of the target process according to the exception handling score of the historical exception record, the reliability of the exception response rule and exception response action can be improved, thereby ensuring the stable operation of the processes in the operating system.

[0128] In the embodiment of the present application, the above step S103 executes the exception response action to obtain a response result, which specifically includes the following steps:

[0129] Step S41: Determine the running mode of the exception response action;

[0130] Step S42: When the running mode of the exception response action is automatic operation, automatically execute the exception response action to obtain a first response result;

[0131] Step S43: When it is determined that the running mode of the exception response action is manual operation, send a message notification to the operation and maintenance object, and determine a second response result based on the response action of the operation and maintenance object to the message notification.

[0132] In the embodiment of the present application, the running modes of the exception response actions include automatic operation and manual operation. For each exception response action, a corresponding mode label can be preset in advance, and the running mode of the exception response action can be determined through this mode label.

[0133] After determining the exception response actions of the target process, the running modes of each exception response action can be determined by identifying the mode label.

[0134] If it is determined that the operation mode is automated operation, the exception response action is automatically executed to obtain a first response result. If it is determined that the operation mode is manual operation, a message needs to be sent to the operation and maintenance object to notify the operation and maintenance object to manually trigger the execution of the exception response action. After that, the manual response result, that is, the second response result, can be obtained.

[0135] Through the above processing method, the integration of automated operation and manual operation of the exception response action can be realized, so as to provide more exception solutions for users on the basis of quickly restoring the operating system and ensuring the stable operation of the operating system.

[0136] In the embodiment of the present application, the above step S103 executes the exception response action to obtain a response result, including:

[0137] First, when the number of the exception response actions is multiple, determine the arrangement method of the multiple exception response actions;

[0138] Secondly, execute the exception response action according to the arrangement method to obtain the response result.

[0139] In the embodiment of the present application, if it is determined that the number of exception response actions of the target process is multiple, then the multiple exception response actions can be arranged. Among them, the multiple exception response actions can be arranged according to the following arrangement dimensions: the action priority of the exception response action, the estimated time consumption of the exception response action, and the operation mode of the exception response action. For example, the exception response actions with higher action priority, less estimated time consumption, and automated operation can be set in the front position.

[0140] In addition, the arrangement method can also be determined according to the action relevance between multiple exception response actions. For example, if the exception response action A needs to be executed after the exception response action B, at this time, the exception response action B can be set after the exception response action A.

[0141] Through the above processing method, the reasonable arrangement of the exception response action can be realized, so that the process exception problem can be quickly solved and the normal operation of the process in the operating system can be ensured.

[0142] In the embodiment of the present application, the process exception types include: multi-level sub-exception types belonging to memory exceptions and / or multi-level sub-exception types belonging to CPU exceptions; among them, the multi-level sub-exception types belonging to memory exceptions include: memory shortage and / or memory overflow, and the multi-level sub-exception types belonging to CPU exceptions include: CPU core exceptions.

[0143] When the process exception type is the memory shortage, the above steps determine a matching exception response rule based on the process exception type, and determine an exception response action for the target process based on the exception response rule, specifically including:

[0144] First, determine a first exception response rule that matches the memory shortage; wherein, the first exception response rule includes: physical memory shortage and / or large application occupying memory greater than a preset threshold; secondly, determine a first exception response action for the target process based on the first exception response rule; wherein, if the first exception response rule is the physical memory shortage, the first exception response action includes: increasing the memory size and / or reducing the process memory, and if the first exception response rule is the large application occupying memory greater than the first threshold, the first exception response action includes: releasing the process memory.

[0145] When the process exception type is the memory overflow, the above steps determine a matching exception response rule based on the process exception type, and determine an exception response action for the target process based on the exception response rule, specifically including:

[0146] First, determine a second exception response rule that matches the memory shortage; wherein, the second exception response rule includes: heap memory overflow and / or garbage collection overhead exceeding a second threshold; secondly, determine a second exception response action for the target process based on the second exception response rule; wherein, if the second exception response rule is the heap memory overflow, the second exception response action includes: increasing the maximum heap memory size parameter, and if the second exception response rule is the garbage collection overhead exceeding the second threshold, the second exception response action includes: increasing the maximum heap memory size parameter and / or canceling the overhead limit of garbage collection.

[0147] It is found through research that memory exceptions include memory shortage and memory overflow. Among them, the main reasons for the operating system memory shortage are physical memory shortage and / or large applications occupying a large amount of memory, and the main reasons for the operating system memory overflow are heap memory overflow and / or large garbage collection overhead. Based on this, sub-exception types can be set in advance for memory exceptions, namely: memory shortage and memory overflow, and exception response rules can be set in advance for memory shortage: physical memory shortage and / or large applications occupying a large amount of memory, and exception response rules can be set in advance for memory overflow: heap memory overflow and / or large garbage collection overhead.

[0148] It has been found through research that the problem of insufficient physical memory can be solved by increasing the memory size and / or reducing the process memory, and the problem of large memory occupation by large applications can be solved by releasing the process memory. At this time, the exception response action of "increasing the memory size and / or reducing the process memory" can be set in advance for the exception response rule of "insufficient physical memory", and the exception response action of "releasing the process memory" can be set for the exception response rule of "large memory occupation by large applications".

[0149] In an embodiment of the present application, after determining that the process exception type is insufficient memory in the above manner, an exception response rule matching the insufficient memory can be determined, denoted as the first exception response rule. The first exception response rule includes insufficient physical memory and / or large memory occupation by large applications exceeding a preset threshold. Then, an exception response action matching the insufficient physical memory and / or large memory occupation by large applications exceeding the preset threshold can be determined, denoted as the first exception response action; among them, the exception response action matching the insufficient physical memory is to increase the memory size and / or reduce the process memory, and the exception response action matching the large memory occupation by large applications exceeding the preset threshold is to release the process memory.

[0150] After determining that the process exception type is memory overflow in the above manner, an exception response rule matching the memory overflow can be determined, denoted as the second exception response rule. The second exception response rule includes heap memory overflow and / or garbage collection overhead exceeding a second threshold. Then, an exception response action matching the heap memory overflow and / or garbage collection overhead exceeding the second threshold can be determined, denoted as the second exception response action; among them, the exception response action matching the heap memory overflow is to increase the maximum heap memory size parameter, and the exception response action matching the garbage collection overhead exceeding the second threshold is to cancel the overhead limit of garbage collection.

[0151] In the above embodiments, the memory exception can be automatically solved and processed in different cases, so as to determine a more suitable solution for the target process, and then the process exception can be solved more quickly and accurately.

[0152] In an embodiment of the present application, when the process exception type is the CPU kernel exception, the above steps of determining a matching exception response rule based on the process exception type and determining the exception response action of the target process based on the exception response rule specifically include:

[0153] First, determine a third exception response rule matching the insufficient memory; among them, the third exception response rule includes: insufficient number of cores in the CPU;

[0154] Secondly, determine the third abnormal response action of the target process based on the third abnormal response rule; wherein, the third abnormal response action includes: increasing the number of cores in the CPU.

[0155] It has been found through research that CPU exceptions include CPU core exceptions. Among them, the main reason for CPU core exceptions is the insufficient number of cores in the CPU. Based on this, a lower-level sub-exception type can be set for CPU exceptions in advance, that is: CPU core exceptions, and an exception response rule can be set for CPU core exceptions in advance: the number of cores in the CPU is insufficient. It has been found through research that the problem of insufficient number of cores in the CPU can be solved by increasing the number of cores in the CPU. Therefore, an exception response action "increase the number of cores in the CPU" can be set for the exception response rule "the number of cores in the CPU is insufficient" in advance.

[0156] After determining that the process exception type is CPU core exception in the above manner, an exception response rule that matches the CPU core exception can be determined, denoted as the third abnormal response rule. This third abnormal response rule includes that the number of cores in the CPU is insufficient. After that, an abnormal response action that matches the insufficient number of cores in the CPU can be determined, denoted as the third abnormal response action; among them, the abnormal response action for the insufficient number of cores in the CPU is to increase the number of cores in the CPU.

[0157] In the above embodiment, the CPU core exception can be automatically resolved, thereby shortening the processing time of the abnormal process and improving the processing efficiency of the abnormal process.

[0158] Next, the process monitoring method will be introduced in combination with Figures 2 to 4 In Figures 2 to 4 the process exception types are introduced by taking memory exceptions and CPU exceptions as examples.

[0159] As Figure 2 shown in the flowchart of another optional process monitoring method, as Figure 2 shown, this method specifically includes the following processes:

[0160] S1: Monitor abnormal processes through an operation and maintenance monitoring tool; among them, the abnormal processes can be monitored by scheduling the operation and maintenance monitoring tool running on the Linux system at regular intervals;

[0161] S2: Detect abnormal alarm information through the operation and maintenance monitoring tool;

[0162] S3: Identify the process exception type of the abnormal process based on the abnormal alarm information;

[0163] S41: When the process exception type is a memory exception, determine the abnormal response rule 1 that matches the memory exception;

[0164] S51: Determine the abnormal response action 1 of the abnormal process based on the abnormal response rule 1;

[0165] S61: Determine whether the running mode of the abnormal response action 1 is automated operation; wherein, if it is determined to be yes, then execute S71; otherwise execute S8;

[0166] S71: Execute the abnormal response action 1;

[0167] S42: When the process abnormal type is CPU abnormality, determine the abnormal response rule 2 that matches the CPU abnormality;

[0168] S52: Determine the abnormal response action 2 of the abnormal process based on the abnormal response rule 2;

[0169] S62: Determine whether the running mode of the abnormal response action 2 is automated operation; wherein, if it is determined to be yes, then execute S72; otherwise execute S8;

[0170] S72: Execute the abnormal response action 2;

[0171] S8: Send a message notification to the operation and maintenance object.

[0172] As can be seen from the above description, the embodiment of the present application innovatively solves the abnormal problems that need to be solved manually by operation and maintenance personnel through system automated response. In this technical solution, the operation and maintenance personnel can set abnormal response rules in advance. The operation and maintenance monitoring tool monitors abnormal data, and calls the abnormal response action corresponding to the response rule to automatically execute the arranged abnormal response action. The technical solution of the present application can capture process abnormalities in real time, and the response rules automatically respond and arrange actions, greatly reducing the system failure time; at the same time, it reduces the workload and solves the problems of long cycle and large investment caused by the workload and operation and maintenance personnel; it can also reduce the generation of secondary system operation failures and minimize the resource consumption problem.

[0173] As Figure 3 shown is a schematic diagram for determining the abnormal response rule and abnormal response action for memory abnormality. As Figure 3 shown, this process includes the following processes:

[0174] S301: Capture the memory abnormality warning information. By analyzing the log information in the abnormality warning information, it can be determined that the process abnormal type can be memory shortage or memory overflow.

[0175] S302: Determine the process abnormal type, wherein the process abnormal type can be determined according to the abnormality warning information. For example, the process abnormal type can be divided into memory shortage and memory overflow.

[0176] S303: Match the abnormal response rule.

[0177] For insufficient memory, the exception response rules can be divided into physical memory shortage of the operating system itself and excessive memory occupation by large applications. For memory overflow, the exception response rules can be divided into heap memory overflow and excessive GC overhead.

[0178] S304: Match the exception response action.

[0179] For the exception response rules for physical memory shortage, the exception response action 1 "increase physical memory" can be matched and selected. This exception response action 1 needs to be manually resolved by notifying the operation and maintenance personnel through a message. In addition, the exception response action 2 "reduce part of the memory of the process" can also be matched and selected, that is, reduce the memory space usage of other Java services with lower importance.

[0180] In this case, for the exception response rules for large applications, the exception response action "release the memory of the process" can be matched and selected. In the production environment, priority should be given to ensuring important service processes, and the monitoring service or logging service can be appropriately reduced or put into sleep mode. For example, large applications such as the monitoring service and logging service can be reduced or put into sleep mode, or other large applications with lower importance can be reduced.

[0181] For the exception response rules for heap memory overflow, the exception response action 1 "increase the service startup parameter -Xmx" can be matched and selected. For the exception response rules for excessive GC overhead, the exception response action "increase the service startup parameter -Xmx" can be matched and selected; or the exception response action "cancel the GC overhead limit" can be selected.

[0182] As Figure 4 shown is the implementation schematic diagram of adding a process monitoring method to the cloud host system. As Figure 4 shown, this process specifically includes:

[0183] S401: Start monitoring the cloud host process; among them, the monitoring of the cloud host process can be increased through the operation and maintenance monitoring tool.

[0184] S402: Capture the exception alarm information.

[0185] Here, the following exceptions of the cloud host can be set for detection: memory exception, CPU exception, disk space exception, and disk mount exception.

[0186] The operation and maintenance monitoring tool can detect the following exception alarm information for the above exceptions: memory alarm information (information 1), CPU alarm information (information 2), disk space alarm information (information 3), and disk mount alarm information (information 4), etc.

[0187] S403: Determine the exception response rules.

[0188] S404: Determine the abnormal response action.

[0189] After detecting the abnormal alarm information, the abnormal response rule can be determined according to the abnormal alarm information, and the abnormality can be automatically processed according to the abnormal response action corresponding to the abnormal response rule.

[0190] For example, for the memory alarm information, the abnormal response rule is insufficient physical memory (Rule 11). At this time, the automatic processing of the abnormality can be achieved through the abnormal response action of "reducing part of the memory of the process" (Response 111). For the CPU alarm information, the abnormal response rule is insufficient number of CPU cores (Rule 21). At this time, the automatic processing of the abnormality can be achieved through the abnormal response action of "increasing the number of CPU cores" (Response 211). For the disk space alarm information, the abnormal response rule is "occupied by log files and cache files" (Rule 31). At this time, the automatic processing of the abnormality can be achieved through the abnormal response action of "increasing disk space / cleaning files" (Response 311). For the disk mount alarm information, the abnormal response rule is "retrieving the consistency between disk mounts and boot mounts" (Rule 41). At this time, the automatic processing of the abnormality can be achieved through the abnormal response action of "supplementing the missing content of the / etc / fstab file" (Response 411).

[0191] After the abnormal response action is completed, a message is sent to notify the operation and maintenance personnel.

[0192] For example, during the operation of the cloud host system, the log files and cache files are increasing day by day, occupying 40% of the disk space, resulting in the operation and maintenance monitoring tool obtaining a disk space alarm, and the alarm rule responds with the action of increasing disk space / cleaning files. Through the implementation of the automatic response orchestration solution for monitoring processes, the operation and maintenance personnel do not need to solve the problem on-site.

[0193] The process monitoring method provided by the technical solution of this application can achieve the automatic processing of process abnormal problems. This method reduces the workload and solves the problems of long cycle and large investment caused by the workload and operation and maintenance personnel solving abnormalities; at the same time, it can reduce the generation of secondary faults during system operation and minimize the problem of resource consumption.

[0194] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.

[0195] Based on the same inventive concept, a process monitoring device corresponding to the process monitoring method is also provided in the embodiments of this application. Since the principle of solving problems by the device in the embodiments of this application is similar to the above process monitoring method in the embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0196] Refer to Figure 5 As shown, it is a schematic diagram of a process monitoring device provided by an embodiment of the present application. The device includes: an identification unit 10, a determination unit 20, and an execution unit 30; wherein,

[0197] The identification unit 10 is configured to identify the type of process anomaly of the target process when it is detected that the target process is in an abnormal state;

[0198] The determination unit 20 is configured to determine a matching anomaly response rule based on the type of process anomaly, and determine an anomaly response action for the target process based on the anomaly response rule; wherein, the anomaly response rule is used to indicate the reason for the anomaly of the target process, and the anomaly response action is used to represent the action to be taken for the anomaly response rule;

[0199] The execution unit 30 is configured to execute the anomaly response action to obtain a response result.

[0200] In the above embodiment, by determining the anomaly response rule based on the type of process anomaly, and then determining the anomaly response action according to the anomaly response rule, and processing the process anomaly according to the anomaly response action, the automatic solution of the abnormal process can be realized, thereby shortening the processing time of the abnormal process, improving the processing efficiency of the abnormal process, and alleviating the technical problem of the aggravated system operation problem caused by the slow processing of the abnormal process in the prior art.

[0201] In a possible implementation manner, the determination unit is further configured to:

[0202] Obtain a plurality of preset anomaly response actions corresponding to the anomaly response rule;

[0203] Determine the anomaly response action of the target process among the plurality of preset anomaly response actions.

[0204] In a possible implementation manner, the execution unit is further configured to:

[0205] Determine the operation mode of the anomaly response action;

[0206] When the operation mode of the anomaly response action is automatic operation, automatically execute the anomaly response action to obtain a first response result;

[0207] When it is determined that the operation mode of the anomaly response action is manual operation, send a message notification to the operation and maintenance object, and determine a second response result based on the response action of the operation and maintenance object to the message notification.

[0208] In a possible implementation manner, the identification unit is further configured to:

[0209] Obtain the exception warning information of the target process;

[0210] Determine the target exception type according to the exception warning information, and determine the process exception type of the target process among the multi-level sub-exception types to which the target exception type belongs according to the exception warning information.

[0211] In a possible implementation manner, the determining unit is further configured to:

[0212] Extract the field content of the target field from the exception warning information of the target process; wherein, the target field is used to indicate the reason for the exception of the target process;

[0213] Determine the preset exception response rule corresponding to the field content as the matching exception response rule; wherein, the preset exception response rule is an exception response rule set in advance for the process exception type.

[0214] In a possible implementation manner, the process exception type includes: multi-level sub-exception types belonging to memory exception and / or multi-level sub-exception types belonging to CPU exception; wherein, the multi-level sub-exception types belonging to memory exception include: memory shortage and / or memory overflow, and the multi-level sub-exception types belonging to CPU exception include: CPU kernel exception.

[0215] In a possible implementation manner, the determining unit is further configured to: the process exception type is the memory shortage; determining a matching exception response rule based on the process exception type, and determining an exception response action of the target process based on the exception response rule, includes:

[0216] Determine a first exception response rule matching the memory shortage; wherein, the first exception response rule includes: physical memory shortage and / or large application occupying memory greater than a preset threshold;

[0217] Determine a first exception response action of the target process based on the first exception response rule; wherein, if the first exception response rule is the physical memory shortage, the first exception response action includes: increasing the memory size and / or reducing the process memory, and if the first exception response rule is that the large application occupies memory greater than the first threshold, the first exception response action includes: releasing the process memory.

[0218] In a possible implementation manner, the determining unit is further configured to: the process exception type is the memory overflow; determining a matching exception response rule based on the process exception type, and determining an exception response action of the target process based on the exception response rule, includes:

[0219] Determine a second exception response rule that matches the insufficient memory; wherein, the second exception response rule includes: heap memory overflow and / or garbage collection overhead exceeding a second threshold;

[0220] Determine a second exception response action for the target process based on the second exception response rule; wherein, if the second exception response rule is the heap memory overflow, the second exception response action includes: increasing the maximum heap memory size parameter, and if the second exception response rule is the garbage collection overhead exceeding the second threshold, the second exception response action includes: increasing the maximum heap memory size parameter and / or canceling the overhead limit of garbage collection.

[0221] In a possible implementation, the determining unit is further configured to: the process exception type is the CPU kernel exception; the determining a matching exception response rule based on the process exception type and determining an exception response action for the target process based on the exception response rule includes:

[0222] Determine a third exception response rule that matches the insufficient memory; wherein, the third exception response rule includes: insufficient number of cores in the CPU;

[0223] Determine a third exception response action for the target process based on the third exception response rule; wherein, the third exception response action includes: increasing the number of cores in the CPU.

[0224] Descriptions of the processing flows of the various modules in the device and the interaction flows between the various modules may refer to the relevant descriptions in the above method embodiments and will not be elaborated here.

[0225] Corresponding to Figure 1 the process monitoring method in, an embodiment of the present application further provides an electronic device 600, as Figure 6 shown, which is a schematic structural diagram of the electronic device 600 provided by the embodiment of the present application, including:

[0226] A processor 61, a memory 62, and a bus 63; the memory 62 is used to store execution instructions, including an internal memory 621 and an external memory 622; the internal memory 621 here is also called the main memory and is used to temporarily store the operation data in the processor 61 and the data exchanged with the external memory 622 such as a hard disk. The processor 61 exchanges data with the external memory 622 through the internal memory 621. When the electronic device 600 runs, the processor 61 communicates with the memory 62 through the bus 63, so that the processor 61 executes the following instructions:

[0227] When detecting that the target process is in an abnormal state, identify the process exception type of the target process;

[0228] Determine a matching exception response rule based on the process exception type, and determine an exception response action for the target process based on the exception response rule; wherein, the exception response rule is used to indicate the reason for the exception of the target process, and the exception response action is used to represent the action taken for the exception response rule;

[0229] Execute the exception response action to obtain a response result.

[0230] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the process monitoring method described in the above method embodiment. Wherein, the storage medium may be a volatile or non-volatile computer-readable storage medium.

[0231] An embodiment of the present application further provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the process monitoring method described in the above method embodiment. For details, please refer to the above method embodiment and will not be elaborated here.

[0232] Among them, the above computer program product can be specifically implemented in the form of hardware, software, or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.

[0233] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here. In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0234] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0235] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit.

[0236] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application, 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 application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0237] Finally, it should be noted that: the above-described embodiments are only specific implementation manners of the present application, used to illustrate the technical solutions of the present application, rather than limiting it. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present application can still modify the technical solutions recorded in the foregoing embodiments or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application and should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A process monitoring method, characterized in that, Including: When it is detected that the target process is in an abnormal state, identify the process abnormal type of the target process; Determine a matching abnormal response rule based on the process abnormal type, and determine the abnormal response action of the target process based on the abnormal response rule; wherein, the abnormal response rule is used to indicate the reason for the abnormality of the target process, and the abnormal response action is used to represent the action executed for the abnormal response rule; Execute the abnormal response action to obtain a response result.

2. The method according to claim 1, characterized in that, The determining the abnormal response action of the target process based on the abnormal response rule includes: Obtain multiple preset abnormal response actions corresponding to the abnormal response rule; Determine the abnormal response action of the target process among the multiple preset abnormal response actions.

3. The method according to claim 1, wherein The executing the abnormal response action to obtain a response result includes: Determine the running mode of the abnormal response action; When the running mode of the abnormal response action is automatic operation, automatically execute the abnormal response action to obtain a first response result; When it is determined that the running mode of the abnormal response action is manual operation, send a message notification to the operation and maintenance object, and determine a second response result based on the response action of the operation and maintenance object to the message notification.

4. The method according to claim 1, characterized in that, The identifying the process abnormal type of the target process includes: Obtain the abnormal alarm information of the target process; Determine the target abnormal type according to the abnormal alarm information, and determine the process abnormal type of the target process among the multi-level sub-abnormal types to which the target abnormal type belongs according to the abnormal alarm information.

5. The method according to claim 1, characterized in that The determining a matching abnormal response rule based on the process abnormal type includes: Extract the field content of the target field from the abnormal alarm information of the target process; wherein, the target field is used to indicate the reason for the abnormality of the target process; Determine the preset abnormal response rule corresponding to the field content as the matching abnormal response rule; wherein, the preset abnormal response rule is an abnormal response rule preset for the process abnormal type.

6. The method according to claim 1, wherein The process abnormal type includes: multi-level sub-abnormal types belonging to memory abnormality and / or multi-level sub-abnormal types belonging to CPU abnormality; wherein, the multi-level sub-abnormal types belonging to memory abnormality include: memory shortage and / or memory overflow, and the multi-level sub-abnormal types belonging to CPU abnormality include: CPU core abnormality.

7. The method according to claim 6, wherein The process abnormal type is the memory shortage; the determining a matching abnormal response rule based on the process abnormal type, and determining the abnormal response action of the target process based on the abnormal response rule includes: Determine a first abnormal response rule matching the memory shortage; wherein, the first abnormal response rule includes: physical memory shortage and / or large application programs occupying memory greater than a preset threshold; Determine the first abnormal response action of the target process based on the first abnormal response rule; wherein, if the first abnormal response rule is insufficient physical memory, the first abnormal response action includes: increasing the memory size and / or reducing the process memory. If the first abnormal response rule is that the memory occupied by a large application exceeds a first threshold, the first abnormal response action includes: releasing the process memory.

8. The method according to claim 6, wherein The process abnormal type is memory overflow; determining a matching abnormal response rule based on the process abnormal type, and determining the abnormal response action of the target process based on the abnormal response rule includes: Determine a second abnormal response rule that matches insufficient memory; wherein, the second abnormal response rule includes: heap memory overflow and / or garbage collection overhead exceeding a second threshold; Determine the second abnormal response action of the target process based on the second abnormal response rule; wherein, if the second abnormal response rule is heap memory overflow, the second abnormal response action includes: increasing the maximum heap memory size parameter. If the second abnormal response rule is that the garbage collection overhead exceeds the second threshold, the second abnormal response action includes: increasing the maximum heap memory size parameter and / or canceling the overhead limit of garbage collection.

9. The method according to claim 6, characterized in that The process abnormal type is CPU kernel exception; determining a matching abnormal response rule based on the process abnormal type, and determining the abnormal response action of the target process based on the abnormal response rule includes: Determine a third abnormal response rule that matches insufficient memory; wherein, the third abnormal response rule includes: insufficient number of cores in the CPU; Determine the third abnormal response action of the target process based on the third abnormal response rule; wherein, the third abnormal response action includes: increasing the number of cores in the CPU.

10. An electronic device, characterized in that, Includes: A processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of process monitoring as described in any one of claims 1 to 9 are executed.