Process management method and device based on configuration file, equipment and medium

Through the process management method based on configuration files, the problem of poor flexibility in traditional hard-coded process management is solved, and the flexibility and efficiency of process monitoring are improved to meet the needs of complex software systems.

CN119322714APending Publication Date: 2025-01-17BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411326058.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

Traditional process management methods are based on hard coding, resulting in poor flexibility, difficulty in adapting to the diverse needs of complex software systems, and high maintenance costs.

Method used

Adopt the process management method based on configuration files, start the monitoring process by receiving monitoring instructions, obtain running process information, obtain process configuration information from the configuration file library, detect exceptions and store record information, restart the abnormal process based on configuration information, and improve process management Flexibility and efficiency.

Benefits of technology

It greatly improves the flexibility and management efficiency of process monitoring, reduces maintenance costs, and adapts to the diversified needs of complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322714A_ABST
    Figure CN119322714A_ABST
Patent Text Reader

Abstract

The invention discloses a process management method and device based on a configuration file, equipment and a medium, and the method comprises the steps: if an input monitoring instruction is received, starting a monitoring process corresponding to the monitoring instruction, and obtaining running process information; acquiring process configuration information corresponding to the running process information from a preset configuration file library; detecting whether each running process is abnormal or not according to the process configuration information; if the running process is abnormal, obtaining and storing abnormal record information corresponding to the running process; restarting the abnormal running process according to the process configuration information and detecting whether each running process is abnormal or not again; and if an input termination instruction is received, stopping running the monitoring process. According to the method, the running process information is acquired, the process configuration information is acquired based on the configuration file, and the running process is subjected to anomaly detection according to the process configuration information, so that the monitoring flexibility of the running process is greatly improved, and the process management efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a process management method, device, equipment and medium based on configuration files. Background Art

[0002] In complex software systems, process management and monitoring is a very important function. Traditional process management methods are usually implemented in a hard-coded manner, which lacks flexibility and scalability. When the system becomes complex, this process management method is difficult to adapt to various different needs, and the maintenance cost will gradually increase. The traditional technical method based on hard-coded process management method has poor flexibility in process management and is difficult to meet actual application needs. Therefore, the process management method in the prior art method has the problem of poor flexibility. Summary of the invention

[0003] The embodiments of the present invention provide a process management method, apparatus, device and medium based on a configuration file, aiming to solve the problem of poor flexibility of the process management method in the prior art.

[0004] In a first aspect, an embodiment of the present invention provides a process management method based on a configuration file, wherein the method comprises:

[0005] If the input monitoring instruction is received, the monitoring process corresponding to the monitoring instruction is started and the running process information is obtained; the running process information is the process information currently running in the system;

[0006] Acquire process configuration information corresponding to the running process information from a preset configuration file library;

[0007] Detecting whether each running process is abnormal according to the process configuration information;

[0008] If there is an abnormality in the running process, obtain and store the abnormality record information corresponding to the running process;

[0009] Restarting the abnormal running process according to the process configuration information, and returning to execute the step of detecting whether each running process is abnormal according to the process configuration information;

[0010] If the input termination instruction is received, the monitoring process is stopped.

[0011] In a second aspect, an embodiment of the present invention further provides a process management device based on a configuration file, wherein the device is used to execute the process management method based on the configuration file as described in the first aspect above, and the device includes:

[0012] A running process information acquisition unit, for starting the monitoring process corresponding to the monitoring instruction and acquiring running process information if the input monitoring instruction is received; the running process information is the process information currently running in the system;

[0013] A process configuration information acquisition unit, used to acquire process configuration information corresponding to the running process information from a preset configuration file library;

[0014] An abnormality detection unit, used to detect whether each running process is abnormal according to the process configuration information;

[0015] An abnormal record information acquisition unit is used to acquire and store abnormal record information corresponding to the running process if there is an abnormality in the running process;

[0016] A running process restarting unit, used for restarting the abnormal running process according to the process configuration information, and returning to execute the step of detecting whether each running process is abnormal according to the process configuration information;

[0017] The stopping unit is used to stop the monitoring process if a termination instruction is received.

[0018] In a third aspect, an embodiment of the present invention further provides a computer device, wherein the device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0019] Memory, used to store computer programs;

[0020] The processor is used to implement the steps of the process management method based on the configuration file described in the first aspect when executing the program stored in the memory.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the process management method based on the configuration file as described in the first aspect above are implemented.

[0022] The embodiment of the present invention provides a process management method, device, equipment and medium based on a configuration file, the method comprising: if an input monitoring instruction is received, starting a monitoring process corresponding to the monitoring instruction and obtaining running process information; obtaining process configuration information corresponding to the running process information from a preset configuration file library; detecting whether each running process is abnormal according to the process configuration information; if there is an abnormality in the running process, obtaining and storing abnormal record information corresponding to the running process; restarting the abnormal running process according to the process configuration information and detecting whether each running process is abnormal again; if an input termination instruction is received, stopping the running monitoring process. The above method, by obtaining running process information and obtaining process configuration information based on the configuration file, performs abnormality detection on the running process according to the process configuration information, greatly improves the flexibility of monitoring the running process and improves the efficiency of process management. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0024] Figure 1 A method flow chart of a process management method based on a configuration file provided by an embodiment of the present invention;

[0025] Figure 2 A schematic block diagram of a process management device based on a configuration file provided by an embodiment of the present invention;

[0026] Figure 3 It is a schematic block diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0029] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0031] See also Figure 1 As shown in the figure, the embodiment of the present invention provides a process management method based on a configuration file, which is applied to a terminal device and is executed by an application software installed in the terminal device. The terminal device can be a laptop, a desktop computer, a tablet computer, a mobile phone or other devices, and the terminal device can also be a vehicle-mounted multimedia terminal, a vehicle-mounted intelligent terminal or other devices configured in a car. Figure 1 As shown, the method includes steps S110 to S160.

[0032] S110: If the input monitoring instruction is received, start the monitoring process corresponding to the monitoring instruction and obtain the running process information.

[0033] If the input monitoring instruction is received, the monitoring process corresponding to the monitoring instruction is started and the running process information is obtained. The running process information is the process information currently running in the system. The user can input the monitoring instruction, and the terminal device starts the corresponding monitoring process according to the monitoring instruction. The monitoring instruction is configured with the monitoring process program address. According to the monitoring process program address configured in the monitoring instruction, the corresponding monitoring process program is obtained for operation, thereby starting the corresponding monitoring process. The running process currently running in the system and the specific information of each running process are obtained through the monitoring process, thereby obtaining the running process information.

[0034] The running process information obtained includes at least the process name, system resource occupancy information, and startup time. The system resource occupancy information includes processor (CPU) resource occupancy, memory occupancy, cache occupancy, network throughput occupancy, number of file handles, etc. The system resource occupancy information is the real-time occupancy information of the running process on the system resources obtained from the system side, that is, the system resource occupancy information is updated in real time according to the running status of the running process.

[0035] S120: Acquire process configuration information corresponding to the running process information from a preset configuration file library.

[0036] The process configuration information corresponding to the running process information is obtained from a preset configuration file library. The terminal device is provided with a configuration file library, which contains multiple process configuration files, each of which corresponds to a process that can be started and run. According to the running process contained in the running process information, the process configuration file corresponding to the running process can be obtained from the configuration file library and the file content therein can be read to obtain the corresponding process configuration information.

[0037] In a specific embodiment, step S120 includes sub-steps: obtaining a process configuration file corresponding to each running process from the configuration file library according to the identification information of each running process in the running process information; and parsing each process configuration file to obtain process configuration information corresponding to the running process information.

[0038] Each process configuration file in the configuration file library corresponds to an identification information, which can be matched with the identification information of the process configuration file according to the identification information of each running process in the running process information, wherein the process identification can be the process name. A process configuration file whose identification information is the same as the identification information of each running process is obtained, and the file content in the obtained process configuration file is parsed to obtain the process configuration information. Specifically, the process of parsing the process configuration file includes: identifying the configuration items in the process configuration file, and reading the parameter value corresponding to each configuration item; wherein the configuration items contained in the process configuration file include process type, dependency, parent-child process, startup command, restart strategy, heartbeat detection interval, anomaly detection threshold, etc. The anomaly detection threshold can include file handle threshold, processor resource occupancy threshold, memory occupancy threshold, cache occupancy threshold, etc. The process configuration file also records the file modification time. The dependency relationship is the upstream process information that the currently running process must depend on. The parent-child process is the child process information that runs with the currently running process (with the currently running process as the parent process). The start command is the program instruction to start the process to run. The restart strategy is the strategy information that needs to be executed when the process is abnormal and needs to be restarted.

[0039] S130: Detect whether each running process is abnormal according to the process configuration information.

[0040] Whether each running process is abnormal is detected according to the process configuration information. Each running process is detected according to the process configuration information, thereby obtaining detection information of whether the running process is abnormal.

[0041] In a specific embodiment, step S130 includes sub-steps: determining the process type of each running process according to the process configuration information and judging whether each running process exits abnormally; if any of the running processes exits abnormally, judging that the running process has an abnormality; if the running process does not exit abnormally, judging whether the running process is a foreground process according to the process type; if the running process is a foreground process, judging whether the heartbeat detection of the running process is abnormal according to the configuration parameters of the running process in the process configuration information; if the heartbeat detection of the running process is abnormal, judging that the running process has an abnormality; if the running process is not a foreground process or the heartbeat detection of the running process is not abnormal, judging whether the system resource occupancy of the running process is abnormal according to the configuration parameters of the running process in the process configuration information, so as to judge whether the running process has an abnormality.

[0042] Furthermore, the running type of each running process can be determined according to the process configuration information, and the running type of the running process can be a foreground process or a background process. To determine whether each running process exits abnormally, it can be determined whether the processor resource occupancy, memory occupancy, cache occupancy and network throughput occupancy of each running process are all "0" at the same time. If the processor resource occupancy, memory occupancy, cache occupancy and network throughput occupancy of the running process are all zero at the same time, it indicates that the running process exits abnormally. If any running process exits abnormally, it can be determined that the abnormally exited running process has an abnormality.

[0043] If all running processes do not exit abnormally, it is further determined whether the process type of the running process is a foreground process. If the running process is a foreground process, it is necessary to perform a heartbeat detection on the running process according to the configuration parameters in the process configuration information, and determine whether the heartbeat detection is abnormal. Among them, the heartbeat detection interval of the running process can be obtained from the process configuration information, and a heartbeat packet is sent to the running process according to the heartbeat detection interval, so as to realize the heartbeat detection of the running process. If the heartbeat detection of the running process is abnormal, it is determined that the running process is abnormal.

[0044] If the running process is not a foreground process, or the running process is a foreground process but the heartbeat detection of the running process is normal, the configuration parameters of the running process in the process configuration information are obtained, and it is determined whether the system resource usage of the running process is abnormal. If the system resource usage of the running process is abnormal, it is determined that the running process is abnormal; if the system resource usage of the running process is normal, it is determined that the running process is not abnormal.

[0045] In a specific embodiment, judging whether the heartbeat detection of the running process is abnormal according to the configuration parameters of the running process in the process configuration information includes: sending a heartbeat packet of a corresponding frequency to the running process according to the heartbeat detection interval in the configuration parameters; judging whether feedback information fed back by the running process according to the heartbeat packet matches the heartbeat packet, so as to judge whether the heartbeat detection of the running process is abnormal.

[0046] Specifically, the heartbeat detection interval corresponding to the running process can be obtained from the configuration parameters of the process configuration information, and a heartbeat packet is sent to the running process according to the heartbeat detection interval. For example, if the heartbeat detection interval is 0.1 seconds, a heartbeat packet is sent to the running program every 0.1 seconds. The running program receives the heartbeat packet and feeds back a feedback message, and determines whether the feedback information of the heartbeat packet matches the heartbeat packet corresponding to the feedback information. Specifically, it can be determined whether the time interval between the sending time of the feedback information and the sending time of the heartbeat packet is less than the preset delay time, and whether the status code in the feedback information matches the status request information in the heartbeat packet, thereby determining whether the heartbeat detection is abnormal. If the time interval is less than the preset delay time, and the status code matches the status request information, it is determined that the heartbeat packet matches the feedback information, and it can also be determined that the heartbeat detection of the running process is normal. If the interval time is not less than the preset delay time, or the status code does not match the status request information, it is determined that the heartbeat packet does not match the feedback information, and it can also be determined that the heartbeat detection of the running process is abnormal.

[0047] In a specific embodiment, judging whether the system resource usage of the running process is abnormal based on the configuration parameters of the running process in the process configuration information to determine whether the running process is abnormal includes: obtaining the system resource usage information of the running process; judging whether the system resource usage information matches the parameter range in the configuration parameters to judge whether the system resource usage of the running process is abnormal.

[0048] Furthermore, the specific process of determining whether the system resource usage of the running process is abnormal includes obtaining the system resource usage information of the running process in the running process information, obtaining the abnormal detection threshold corresponding to the system resource usage information in the process configuration information as the configuration parameter, and determining whether each resource usage value in the system resource usage information is within the corresponding parameter range in the configuration parameter, thereby determining whether the system resource usage information matches the parameter range in the configuration parameter. If each resource usage value in the system resource usage information is within the corresponding parameter range, it is determined that the system resource usage information matches the parameter range in the configuration parameter, that is, it is determined that the system resource usage of the running program is not abnormal; if any resource usage value is not within the corresponding parameter range, it is determined that the system resource usage information does not match the parameter range in the configuration parameter, that is, it is determined that the system resource usage of the running program is abnormal.

[0049] S140: If there is an abnormality in the running process, obtain and store abnormal record information corresponding to the running process.

[0050] If there is an abnormality in the running process, the abnormality record information corresponding to the running process is obtained and stored. In order to facilitate the management personnel to analyze and view the specific information of the abnormal running of the running process, when there is an abnormality in the running program, the abnormality record information corresponding to the running program can be obtained and stored in the terminal device, so as to facilitate the analysis of the cause of the abnormality by viewing the stored abnormality record information.

[0051] In a specific embodiment, step S140 includes sub-steps: obtaining exception information during the running process of the running process; obtaining stack information corresponding to the running process in the cache area; and combining the exception information and the stack information into exception record information.

[0052] Specifically, the abnormal information of the running process during the running process can be obtained. The abnormal information is the various values ​​of the running process during the abnormal process, such as abnormal time, data reading and writing information, etc. The stack information corresponding to the running process in the cache area is further obtained. The cache area can be a storage area allocated in the RAM (volatile memory, Random Access Memory) in the terminal device and dedicated to the use of the running process. The running process needs to schedule the data information stored in the cache area during the running process. Therefore, in order to facilitate in-depth analysis of the running process with abnormalities, the stack information stored therein can be obtained, and the abnormal information and the stack information can be combined into the abnormal record information of the running process.

[0053] S150: Restart the abnormal running process according to the process configuration information, and return to execute the step of detecting whether each running process is abnormal according to the process configuration information.

[0054] Restart the abnormal running process according to the process configuration information, and return to execute the step of detecting whether each running process is abnormal according to the process configuration information. The running process with abnormality can be restarted according to the process configuration information, and after the process is restarted, the above step S130 can be returned to execute, thereby realizing real-time monitoring of the running process.

[0055] The specific process of restarting a running process includes first terminating the running process, and the terminal device recovers the system resources allocated to the running process, so that the running process is forced to terminate. Restart the upstream process that the running process must rely on according to the dependency relationship of the running process, and restart the running process according to the startup command and the restart policy; for example, the restart policy includes the restart interval length, and after the running process is terminated and exceeds the restart interval length, the running process is restarted by executing the startup command. Start the child process accompanying the running process according to the parent-child process.

[0056] In a specific embodiment, after restarting the abnormal running process according to the process configuration information, it also includes: judging whether the process configuration file of the running process has changed according to the process configuration information; if the process configuration file of the running process has changed, returning to execute the step of obtaining the running process information.

[0057] Furthermore, after the abnormal running process is restarted, it is also possible to determine whether the process configuration file of the running process has been modified, such as determining whether the file modification time of the process configuration file is before the restart time of the running process. If the file modification time of the process configuration file is not before the restart time of the running process, it is determined that the process configuration file has been changed; otherwise, it is determined that the process configuration file has not been changed.

[0058] If the process configuration file is changed, it is necessary to return to the step of obtaining the running process information and re-acquire the process configuration information. If the process configuration file is not changed, it is necessary to return to the above step S130.

[0059] S160: If the input termination instruction is received, stop running the monitoring process.

[0060] If the input termination instruction is received, the monitoring process is stopped. Further, if the terminal device receives the input termination instruction, the monitoring process is stopped and the monitoring management flow of the process is exited.

[0061] In the process management method based on the configuration file disclosed in the above embodiment, the method includes: if the input monitoring instruction is received, start the monitoring process corresponding to the monitoring instruction and obtain the running process information; obtain the process configuration information corresponding to the running process information from the preset configuration file library; detect whether each running process is abnormal according to the process configuration information; if there is an abnormality in the running process, obtain and store the abnormal record information corresponding to the running process; restart the abnormal running process according to the process configuration information and detect whether each running process is abnormal again; if the input termination instruction is received, stop the running monitoring process. The above method, by obtaining the running process information and obtaining the process configuration information based on the configuration file, performs abnormality detection on the running process according to the process configuration information, greatly improves the flexibility of monitoring the running process and improves the efficiency of process management.

[0062] The embodiment of the present invention also provides a process management device based on a configuration file, which can be configured in a terminal device and is used to execute any embodiment of the process management method based on a configuration file. Figure 2 , Figure 2 A schematic block diagram of a process management device based on a configuration file provided in an embodiment of the present invention.

[0063] like Figure 2 As shown, the process management device 100 based on the configuration file includes a running process information acquisition unit 110, a process configuration information acquisition unit 120, an abnormality detection unit 130, an abnormality record information acquisition unit 140, a running process restart unit 150 and a stopping unit 160.

[0064] The running process information acquisition unit 110 is used to start the monitoring process corresponding to the monitoring instruction and acquire the running process information if the input monitoring instruction is received; the running process information is the process information currently running in the system.

[0065] The process configuration information acquisition unit 120 is used to acquire the process configuration information corresponding to the running process information from a preset configuration file library.

[0066] The abnormality detection unit 130 is used to detect whether each running process is abnormal according to the process configuration information.

[0067] The abnormal record information acquisition unit 140 is used to acquire and store abnormal record information corresponding to the running process if there is an abnormality in the running process.

[0068] The running process restarting unit 150 is used to restart the abnormal running process according to the process configuration information, and return to execute the step of detecting whether each running process is abnormal according to the process configuration information.

[0069] The stopping unit 160 is configured to stop the monitoring process if a termination instruction is received.

[0070] The configuration file-based process management device provided in the embodiment of the present invention applies the above-mentioned configuration file-based process management method. If an input monitoring instruction is received, the monitoring process corresponding to the monitoring instruction is started and the running process information is obtained; the process configuration information corresponding to the running process information is obtained from the preset configuration file library; whether each running process is abnormal is detected according to the process configuration information; if there is an abnormality in the running process, the abnormal record information corresponding to the running process is obtained and stored; the abnormal running process is restarted according to the process configuration information and each running process is detected again to see if it is abnormal; if an input termination instruction is received, the running monitoring process is stopped. The above-mentioned method, by obtaining the running process information and obtaining the process configuration information based on the configuration file, performs abnormality detection on the running process according to the process configuration information, greatly improves the flexibility of monitoring the running process and improves the efficiency of process management.

[0071] The above-mentioned process management device based on configuration files can be implemented in the form of a computer program, and the computer program can be used in Figure 3 Runs on the computer device shown.

[0072] See also Figure 3 , Figure 3 The computer device provided in the embodiment of the present invention is a schematic block diagram. The computer device may be a terminal device for executing a process management method based on a configuration file to monitor and manage the system running process.

[0073] See also Figure 3 The computer device 500 includes a processor 502 , a memory and a communication interface 505 connected via a communication bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .

[0074] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute a process management method based on a configuration file, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.

[0075] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0076] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the process management method based on the configuration file.

[0077] The communication interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will appreciate that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0078] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned process management method based on the configuration file.

[0079] Those skilled in the art will understand that Figure 3 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 3 The embodiments shown are consistent and will not be described again here.

[0080] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0081] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps included in the above-mentioned process management method based on a configuration file are implemented.

[0082] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0083] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.

[0084] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0085] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0086] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk.

[0087] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A process management method based on a configuration file, characterized in that: The method comprises: If the input monitoring instruction is received, the monitoring process corresponding to the monitoring instruction is started and the running process information is obtained; the running process information is the process information currently running in the system; Acquire process configuration information corresponding to the running process information from a preset configuration file library; Detecting whether each running process is abnormal according to the process configuration information; If there is an abnormality in the running process, obtain and store the abnormality record information corresponding to the running process; Restarting the abnormal running process according to the process configuration information, and returning to execute the step of detecting whether each running process is abnormal according to the process configuration information; If the input termination instruction is received, the monitoring process is stopped.

2. The process management method based on configuration files according to claim 1, characterized in that: The acquiring the process configuration information corresponding to the running process information from the preset configuration file library includes: Acquire a process configuration file corresponding to each running process from the configuration file library according to the identification information of each running process in the running process information; Each of the process configuration files is parsed to obtain process configuration information corresponding to the running process information.

3. The process management method based on configuration files according to claim 2 is characterized in that: After restarting the abnormal running process according to the process configuration information, the method further includes: Determining whether a process configuration file of the running process has changed according to the process configuration information; If the process configuration file of the running process is changed, return to the step of obtaining the running process information.

4. The process management method based on configuration files according to claim 1, characterized in that: The detecting whether each running process is abnormal according to the process configuration information includes: Determine the process type of each running process according to the process configuration information and judge whether each running process exits abnormally; If any of the running processes exits abnormally, it is determined that the running process is abnormal; The running process does not exit abnormally, and whether the running process is a foreground process is determined according to the process type; If the running process is a foreground process, judging whether the heartbeat detection of the running process is abnormal according to the configuration parameters of the running process in the process configuration information; If the heartbeat detection of the running process is abnormal, it is determined that the running process is abnormal; If the running process is not a foreground process or the heartbeat detection of the running process is normal, determine whether the system resource usage of the running process is abnormal based on the configuration parameters of the running process in the process configuration information to determine whether the running process is abnormal.

5. The process management method based on configuration files according to claim 4 is characterized in that: The determining whether the heartbeat detection of the running process is abnormal according to the configuration parameters of the running process in the process configuration information includes: Send a heartbeat packet of a corresponding frequency to the running process according to the heartbeat detection interval in the configuration parameters; It is determined whether the feedback information fed back by the running process according to the heartbeat packet matches the heartbeat packet, so as to determine whether the heartbeat detection of the running process is abnormal.

6. The process management method based on configuration files according to claim 4, characterized in that: The determining whether the system resource usage of the running process is abnormal according to the configuration parameters of the running process in the process configuration information, so as to determine whether the running process is abnormal, includes: Obtaining system resource usage information of the running process; It is determined whether the system resource occupancy information matches the parameter range in the configuration parameters to determine whether the system resource occupancy of the running process is abnormal.

7. The process management method based on configuration files according to claim 1, characterized in that: The acquiring and storing the abnormal record information corresponding to the running process includes: Obtaining abnormal information during the running process; Obtaining stack information corresponding to the running process in the cache area; The exception information and the stack information are combined into exception record information.

8. A process management device based on a configuration file, characterized in that: The process management device based on the configuration file is used to execute the process management method based on the configuration file according to any one of claims 1 to 7, and the device includes: A running process information acquisition unit, for starting the monitoring process corresponding to the monitoring instruction and acquiring running process information if the input monitoring instruction is received; the running process information is the process information currently running in the system; A process configuration information acquisition unit, used to acquire process configuration information corresponding to the running process information from a preset configuration file library; An abnormality detection unit, used to detect whether each running process is abnormal according to the process configuration information; An abnormal record information acquisition unit is used to acquire and store abnormal record information corresponding to the running process if there is an abnormality in the running process; A running process restarting unit, used for restarting the abnormal running process according to the process configuration information, and returning to execute the step of detecting whether each running process is abnormal according to the process configuration information; The stopping unit is used to stop the monitoring process if a termination instruction is received.

9. A computer device, characterized in that: The device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the process management method based on the configuration file described in any one of claims 1 to 7 when executing the program stored in the memory.

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 process management method based on the configuration file are implemented as described in any one of claims 1 to 7.