Process management method, device, equipment, storage medium and program product

By storing the process number of the child process in the memory space of the management server and monitoring its status in real time, the problem of the management server being unable to manage the process when the PID file is accidentally deleted or the process is accidentally deleted, and the reliability of process management is improved.

CN113360271BActive Publication Date: 2025-02-07WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110824208.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-21
Publication Date
2025-02-07
Estimated Expiration
2041-07-21

AI Technical Summary

Technical Problem

When the PID file of the process is deleted by mistake, or the process is deleted by mistake, the management server cannot manage the process in a timely and effective manner, resulting in management failure.

Method used

The management server receives process creation requests, creates a child process, and stores the process number of the child process in the memory space of the management server, and monitors the status of the child process in real time to ensure that even if the PID file is deleted, the management server can still pass through the memory space. The process number in the process manages the process.

Benefits of technology

Improve the reliability of the management server for process management, ensuring that even if the PID file is accidentally deleted, the management server can still effectively manage the process and avoid management failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113360271B_ABST
    Figure CN113360271B_ABST
Patent Text Reader

Abstract

The present invention discloses a process management method, device, equipment, storage medium and program product. The method comprises: a management server receives a process creation request, and creates a subprocess according to the parameters in the process creation request; stores the process number of the subprocess generated during the creation process in a memory space corresponding to the management server; and monitors the status of the subprocess based on the process number in the memory space. The present invention improves the reliability of the management server in managing the process.
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, storage medium and program product. Background Art

[0002] The intelligent process management solution is a method of process management, which solves the problem of how to effectively manage processes. In the prior art, the management server often relies on reading the PID (process number) file or checking the process list to check whether the process is alive. When the PID file of the process is deleted by mistake, or the process is deleted by mistake, the process management server may not be able to manage the process in a timely and effective manner. Summary of the invention

[0003] The main purpose of the present invention is to provide a process management method, device, equipment, storage medium and program product, aiming to solve the technical problem that when the PID file of the process is deleted by mistake, or the process is deleted by mistake, the process management server may not be able to manage the process in a timely and effective manner.

[0004] To achieve the above object, the present invention provides a process management method, which is applied to a management server and comprises the following steps:

[0005] The management server receives the process creation request and creates a child process according to the parameters in the process creation request;

[0006] The process number of the subprocess generated during the creation process is stored in the memory space corresponding to the management server;

[0007] The status of the sub-process is monitored based on the process number in the memory space.

[0008] Optionally, the step of monitoring the status of the subprocess based on the process number in the memory space includes:

[0009] Obtaining the process ID from the memory space;

[0010] The survival status of the child process is obtained by searching using the process number.

[0011] Optionally, before the step of obtaining the process ID from the memory space, the step further includes:

[0012] Using the process name of the child process to search for the survival status of the child process;

[0013] If not found, the step of obtaining the process ID from the memory space is executed.

[0014] Optionally, after the step of monitoring the status of the subprocess based on the process number in the memory space, the method further includes:

[0015] When the status monitoring result shows that the subprocess is in a running state, generating a test service request;

[0016] Sending the test service request to the subprocess and obtaining feedback information from the subprocess;

[0017] The service status of the subprocess is determined according to the feedback information.

[0018] Optionally, after the step of monitoring the status of the subprocess based on the process number in the memory space, the method further includes:

[0019] When the status monitoring result shows that the subprocess is in an abnormal shutdown state, restart the subprocess.

[0020] Optionally, the step of monitoring the status of the subprocess based on the process number in the memory space includes:

[0021] Obtaining the importance level corresponding to the subprocess;

[0022] generating a monitoring time interval corresponding to the importance level;

[0023] The status of the sub-process is monitored regularly based on the process number in the memory space according to the monitoring time interval.

[0024] Optionally, after the management server receives the process creation request and creates a child process according to the parameters in the process creation request, the method further includes:

[0025] A process closing request is received, the sub-process is closed according to the process closing request, and the process ID of the sub-process in the memory space is deleted.

[0026] To achieve the above object, the present invention further provides a process management device, which is deployed on a management server and includes:

[0027] A creation module, used to receive a process creation request and create a child process according to the parameters in the process creation request;

[0028] A storage module, used to store the process number of the subprocess generated during the creation process into the memory space corresponding to the management server;

[0029] A monitoring module is used to monitor the status of the sub-process based on the process number in the memory space.

[0030] To achieve the above-mentioned purpose, the present invention also provides a process management device, which includes: a memory, a processor, and a process management program stored in the memory and executable on the processor, and the process management program implements the steps of the process management method described above when executed by the processor.

[0031] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, on which a process management program is stored, and when the process management program is executed by a processor, the steps of the process management method described above are implemented.

[0032] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the process management method described above are implemented.

[0033] In the present invention, a process creation request is received by a management server, and a child process is created according to the parameters in the process creation request, so that the management server as a parent process can perceive the status of the managed process in real time, and then the process number of the child process generated during the creation process is stored in the memory space corresponding to the management server, and the status of the child process is monitored based on the process number in the memory space, so that even if the PID file of the process is deleted, the management server can obtain the process number of the process from its memory space to manage the process, thereby further improving the reliability of the management server to manage the process. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present invention;

[0035] Figure 2 It is a flowchart of the first embodiment of the process management method of the present invention;

[0036] Figure 3 A schematic diagram of a process management flow involved in an embodiment of the present invention;

[0037] Figure 4 Schematic diagram of functional modules of a preferred embodiment of the process management device of the present invention.

[0038] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0039] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0040] like Figure 1 As shown, Figure 1It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0041] It should be noted that the process management device in the embodiment of the present invention can be a smart phone, a personal computer, a server and other devices, and no specific limitation is made here.

[0042] like Figure 1 As shown, the process management device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0043] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the process management device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0044] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a process management program. The operating system is a program that manages and controls the hardware and software resources of the device and supports the operation of the process management program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the process management program stored in the memory 1005 and perform the following operations:

[0045] Receive a process creation request, and create a child process according to the parameters in the process creation request;

[0046] The process number of the subprocess generated during the creation process is stored in the memory space corresponding to the management server;

[0047] The status of the sub-process is monitored based on the process number in the memory space.

[0048] Furthermore, the step of monitoring the status of the subprocess based on the process number in the memory space includes:

[0049] Obtaining the process ID from the memory space;

[0050] The survival status of the child process is obtained by searching using the process number.

[0051] Furthermore, before the step of obtaining the process ID from the memory space, the processor 1001 may also be used to call a process management program stored in the memory 1005 and perform the following operations:

[0052] Using the process name of the child process to search for the survival status of the child process;

[0053] If not found, the step of obtaining the process ID from the memory space is executed.

[0054] Further, after the step of monitoring the status of the sub-process based on the process number in the memory space, the processor 1001 may also be used to call a process management program stored in the memory 1005 and perform the following operations:

[0055] When the status monitoring result shows that the subprocess is in a running state, generating a test service request;

[0056] Sending the test service request to the subprocess and obtaining feedback information from the subprocess;

[0057] The service status of the subprocess is determined according to the feedback information.

[0058] Further, after the step of monitoring the status of the sub-process based on the process number in the memory space, the processor 1001 may also be used to call a process management program stored in the memory 1005 and perform the following operations:

[0059] When the status monitoring result shows that the subprocess is in an abnormal shutdown state, restart the subprocess.

[0060] Furthermore, the step of monitoring the status of the subprocess based on the process number in the memory space includes:

[0061] Obtaining the importance level corresponding to the subprocess;

[0062] generating a monitoring time interval corresponding to the importance level;

[0063] The status of the sub-process is monitored regularly based on the process number in the memory space according to the monitoring time interval.

[0064] Further, after the management server receives the process creation request and creates a child process according to the parameters in the process creation request, the processor 1001 may also be used to call the process management program stored in the memory 1005 and perform the following operations:

[0065] A process closing request is received, the sub-process is closed according to the process closing request, and the process ID of the sub-process in the memory space is deleted.

[0066] Based on the above structure, various embodiments of the process management method are proposed.

[0067] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the process management method of the present invention.

[0068] The embodiment of the present invention provides an embodiment of the process management method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here. The process management method of the present invention is applied to the management server. The management server can run as a process in devices such as smart phones, personal computers and servers. The following embodiments are described with the management server as the execution subject. In this embodiment, the process management method includes:

[0069] Step S10, the management server receives the process creation request and creates a child process according to the parameters in the process creation request;

[0070] In this embodiment, the management server is a process whose function is to manage other processes, that is, to provide process management services to other processes, and is further referred to as the management server. A process is a running activity of a program with independent functions on a certain data set. The management activities of the management server on the process include creating (starting) a process, checking the process status, restarting a process, and closing a process.

[0071] After the management server is started, it receives a process creation request. The process creation request may be sent by other processes, that is, other processes, as clients corresponding to the management server, request the management server to create a process service. The process creation request may carry the process name of the process to be created and other parameters required for creating the process. For example, a user clicks on an APP icon on the desktop in a mobile terminal. The click operation triggers the corresponding process to generate a process creation request corresponding to the APP, and sends the request to the management server, so that the management server starts the process corresponding to the APP according to the request.

[0072] After receiving the process creation request, the management server creates a child process according to the parameters in the process creation request. That is, the management server, as the parent process, derives a child process according to the parameters in the process creation request and starts the child process, which is the process requested to be created by the process creation request. Since the management server is the parent process of the created process (child process), the management server can know the survival status of the created process, so as to manage the process.

[0073] Step S20, storing the process number of the subprocess generated during the creation process into the memory space corresponding to the management server;

[0074] Furthermore, the management server stores the process ID (PID, processID) generated during the creation of the child process in the memory space corresponding to the management server. Among them, PID is the code name of each process. Each process has a unique PID, which is randomly assigned by the system when the process is running and does not represent a specific process. After the process is terminated, the PID will be recycled and may be assigned to another new process. The memory space corresponding to the management server is allocated separately to the management server in the memory space of the device when the management server is started to store the process ID of the managed process. When the management server is closed, the memory space will be released. Since the management server stores the process ID of the child process in its dedicated memory space, other processes cannot access the memory space, so that the process ID will not be deleted by mistake, thereby improving the reliability of the management server to manage the process.

[0075] Furthermore, in order to avoid the loss of process numbers of each sub-process stored in the memory space due to anomalies in the management server, the management server can synchronize the process numbers to the external storage space. When the management server cannot find the process number corresponding to the sub-process in the memory space, the management server can reload the process numbers of each sub-process from the external storage space, and then manage the sub-processes according to the process numbers.

[0076] Step S30: monitor the status of the sub-process based on the process ID in the memory space.

[0077] The management server monitors the status of the child process based on the process number in the memory space. Specifically, the management server can use the process number to search the process list for the child process to determine the survival status of the child process, or use other query commands that query the child process status based on the process number to query the status of the child process. It should be noted that the management server, as a parent process, can know the status of the child process based on the relationship between the parent process and the child process, so it can improve the management reliability of the process by the management server to a certain extent. When the child process is abnormally closed but the management server is not aware of it, the management server can obtain the process number of the child process from the memory space and monitor the status of the child process according to the process number, thereby further improving the management reliability of the process by the management server.

[0078] In this embodiment, the management server receives a process creation request, creates a child process according to the parameters in the process creation request, and "includes" the process to be started as a child process of the management server, so that the management server, as the parent process, can perceive the status of the managed process in real time; and then, by storing the process number of the child process generated during the creation process in the memory space corresponding to the management server, the status of the child process is monitored based on the process number in the memory space, so that even if the PID file of the process is deleted, the management server can obtain the process number of the process from its memory space to manage the process, thereby further improving the reliability of the management server's management of the process.

[0079] Furthermore, in one embodiment, the method further comprises:

[0080] Step S40: When the status monitoring result shows that the sub-process is in an abnormally closed state, restart the sub-process.

[0081] When the management server monitors the status of the child process and the result shows that the child process is in an abnormal shutdown state, the management server can restart the child process, that is, restart it, to ensure that the child process continues to work normally. It should be noted that if the process number generated after the child process is restarted is changed, the management server can use the new process number to replace the old process number in the memory space, so as to manage the child process according to the new process number.

[0082] Furthermore, in one embodiment, the method further comprises:

[0083] Step S50, receiving a process closing request, closing the sub-process according to the process closing request, and deleting the process ID of the sub-process in the memory space.

[0084] The management server receives a process closing request. The process closing request may be sent by other processes, that is, other processes, as clients corresponding to the management server, request the management server to close the process. The process closing request may carry the process name of the process to be closed and other parameters required to close the process. For example, a user clicks the exit button on the APP page in a mobile terminal. The click operation triggers the corresponding process to generate a process closing request corresponding to the APP, and sends the request to the management server, so that the management server closes the process corresponding to the APP according to the request.

[0085] After receiving the process closing request, the management server closes the subprocess requested to be closed by the process closing request. Specifically, the management server can find the process name carried in the process closing request and close the process corresponding to the process name. Furthermore, after closing the subprocess, the management server can delete the process number corresponding to the subprocess in the memory space to release the memory space so that the memory space can be used to store the process number of the new process to avoid insufficient resources caused by the memory space being occupied.

[0086] Further, in one embodiment, step S30 includes:

[0087] Step S301, obtaining the process ID from the memory space;

[0088] Step S302: Use the process ID to search and obtain the survival status of the child process.

[0089] After creating a child process and storing the process number of the child process in the memory space, the management server can obtain the process number of the child process from the memory space, and use the process number to find the survival status of the child process. Specifically, the management server can carry the process number in a preset query command, and use the query command to find the survival status of the child process. Among them, there may be two survival states of the child process, one is in the running state, and the other is in the abnormal shutdown state. When the survival state is in the running state, the management server can do nothing, or query again after a certain interval; when the survival state is in the abnormal shutdown state, the management server can restart the child process, that is, restart it, to ensure that the child process continues to work normally.

[0090] Further, based on the above first embodiment, a second embodiment of the process management method of the present invention is proposed. In this embodiment, the method further includes:

[0091] Step S303, using the process name of the child process to search for the survival status of the child process;

[0092] Step S304: If not found, execute the step of obtaining the process ID from the memory space.

[0093] In this embodiment, the process management server may first use the process name of the child process to search for the survival status of the child process. Specifically, the management server may carry the process name in a preset query command, and use the query command to search for the survival status of the child process. If the survival status of the child process is not found using the process name, or the survival status found is in an abnormal shutdown state, the management server may obtain the process number of the child process from the memory space, and use the process number to search for the survival status of the child process. Through double query, the query accuracy of the process survival status can be improved, thereby improving the reliability of process management.

[0094] Furthermore, in one embodiment, the process number may be used for searching first. If the found survival status is in an abnormal shutdown state or is not found, the management server may use the process name of the child process to search for the survival status of the child process. Through double query, the query accuracy of the process survival status can be improved, thereby improving the reliability of process management.

[0095] Furthermore, when the survival status obtained after the double query is in an abnormal shutdown state, the management server can restart the child process, that is, restart it, to ensure that the child process continues to work normally.

[0096] Further, based on the above-mentioned first and / or second embodiments, a third embodiment of the process management method of the present invention is proposed. In this embodiment, the method further includes:

[0097] Step S60, when the status monitoring result shows that the subprocess is in a running state, generating a test service request;

[0098] After the management server monitors the state of the process through the process number in the memory space, the state monitoring result can be obtained. For example, the survival state of the subprocess is monitored. When the survival state is that the subprocess is in a running state, the management server can further generate a test service request to test whether the service of the subprocess is normal. Among them, the test service request can be a request pre-set in the management server, specifically, a corresponding service request is set for each service that can be provided by each subprocess, and is used to request the service of the subprocess. Since the request is not sent by the client of the subprocess, but is generated by the management server and used to test whether the service of the subprocess is normal, in this embodiment, the service request is called a test service request. It should be noted that the management server obtains the test service request corresponding to the subprocess from each pre-set test service request. Alternatively, in other embodiments, the test service request can also be temporarily generated by the management server according to a pre-configured service request generation rule. Different generation rules can be set for different subprocesses. The management server obtains the service request generation rule corresponding to the subprocess and generates a test service request according to the rule.

[0099] Step S70, sending the test service request to the sub-process and obtaining feedback information from the sub-process;

[0100] After generating the test service request, the management server sends the test service request to the child process. That is, the management server, as the client of the child process, requests the service from the child process. After receiving the test service request, the child process performs the corresponding service according to the content of the test service request and feeds back the result to the management server. The management server obtains the feedback information fed back by the child process. For example, when the child process is the process corresponding to an APP program, the test service request generated by the management server can be to open a page in the APP and obtain the information in the page.

[0101] Step S80: determining the service status of the sub-process according to the feedback information.

[0102] After receiving the feedback information from the child process, the management server determines the service status of the child process based on the feedback information. Specifically, the feedback information may be data returned after the service is successfully executed, or it may be prompt information of service failure. If the feedback information received by the management server is prompt information of service failure, the management server can determine that the service status of the child process is abnormal; if the feedback information received by the management server is data returned after the service is successfully executed, the management server can match the data with the correct feedback data of the pre-set test service request. If they are the same, the service status of the child process is determined to be normal; if they are different, the service status of the child process is determined to be abnormal.

[0103] Furthermore, the management server may also send multiple test service requests to the child process, and only when the results obtained multiple times are that the service status of the child process is abnormal, does it determine that the service status of the child process is abnormal.

[0104] Furthermore, when the management server determines that the service status of the sub-process is an abnormal state, the management server may restart the sub-process so that the sub-process runs again and provides normal services.

[0105] In this embodiment, when the management server monitors the status of the sub-process and determines that the sub-process is in a running state, it further acts as the server of the sub-process, generates a test service request corresponding to the service of the sub-process, and sends the test service request to the sub-process to test whether the service of the sub-process is normal, so that the management server can further detect requests in which the sub-process is in a running state but the service is abnormal, thereby ensuring the availability of the sub-process service and further improving the reliability of process management.

[0106] Further, based on the above-mentioned first, second and / or third embodiments, a fourth embodiment of the process management method of the present invention is proposed. In this embodiment, step S30 includes:

[0107] Step S305, obtaining the importance level corresponding to the subprocess;

[0108] In this embodiment, the importance level corresponding to the sub-process can be set in advance, and the basis for setting the importance level can be the urgency of the user's demand for the service provided by the sub-process. The higher the urgency, the higher the importance level corresponding to the sub-process, and the lower the urgency, the lower the importance level corresponding to the sub-process. For example, the importance level of the sub-process corresponding to the instant messaging APP is greater than the importance level of the sub-process corresponding to the video playback APP.

[0109] After creating a child process, the management server can obtain the importance level corresponding to the child process.

[0110] Step S306, generating a monitoring time interval corresponding to the importance level;

[0111] The management server generates a monitoring time interval corresponding to the importance level of the subprocess. Specifically, the management server may pre-set monitoring time intervals corresponding to different importance levels, and the management server may directly obtain the monitoring time interval corresponding to the importance level of the subprocess. The higher the importance level, the shorter the corresponding monitoring time interval, and the lower the importance level, the longer the corresponding monitoring time interval. In other embodiments, the management server may also calculate the monitoring time interval using the importance level according to a certain formula. For example, if the importance level is a number greater than or equal to 1, the calculation formula may be monitoring time interval (seconds) = importance level * k + b, where k and b are parameters set as needed, such as k = -0.1.

[0112] Step S307: monitor the status of the sub-process based on the process number in the memory space at regular intervals according to the monitoring time.

[0113] After calculating the monitoring time interval, the management server periodically monitors the status of the child process based on the process number in the memory space according to the monitoring time interval. For example, if the monitoring time interval is 0.1 seconds, the management server monitors the status of the child process every 0.1 seconds.

[0114] In this embodiment, the importance level of the sub-process is obtained by the management server, and a monitoring time interval corresponding to the sub-process is generated according to the importance level. The status of the sub-process is monitored regularly based on the process number in the memory space according to the monitoring time interval, so that the management server can manage the sub-processes with higher urgency for user needs with higher reliability, and the management server can save resource consumption for sub-processes with lower urgency for user needs.

[0115] In one embodiment, the management server can be configured as follows: Figure 3 The process shown manages the process. Specifically, when a process creation request is received, the child process is started; the child process ID, that is, the PID of the child process is obtained, and recorded in the core warehouse, that is, saved in the memory space corresponding to the management server; as the parent process of the child process, the management server can perceive the status of the child process in real time; on the other hand, the management server can also actively monitor the child process regularly, including querying the survival status of the child process through the PID and / or process name, and testing whether the service of the child process is normal through the test service request; when the child process is found to be abnormal, such as abnormal closure or service abnormality, the management server restarts the child process; the management server receives the request sent by the client and manages the process, for example, when a process closing request is received, the corresponding child process is closed, and when a process creation request is received, the corresponding child process is created.

[0116] In addition, the embodiment of the present invention also provides a process management device, which is deployed on the management server. Figure 4 , the device comprises:

[0117] The creation module 10 is used to receive a process creation request and create a child process according to the parameters in the process creation request;

[0118] The storage module 20 is used to store the process number of the subprocess generated during the creation process into the memory space corresponding to the management server;

[0119] The monitoring module 30 is used to monitor the status of the sub-process based on the process number in the memory space.

[0120] Furthermore, the monitoring module 30 includes:

[0121] A first acquisition unit, used for acquiring the process ID from the memory space;

[0122] The first search unit is used to use the process number to search and obtain the survival status of the child process.

[0123] Furthermore, the monitoring module 30 also includes:

[0124] A second search unit, configured to use the process name of the child process to search for the survival status of the child process;

[0125] The first acquisition unit is also used to execute the step of acquiring the process ID from the memory space if the process ID is not found.

[0126] Furthermore, the device also includes:

[0127] A generating module, used for generating a test service request when the status monitoring result indicates that the subprocess is in a running state;

[0128] A sending module, used for sending the test service request to the sub-process and obtaining feedback information of the sub-process;

[0129] A determination module is used to determine the service status of the sub-process according to the feedback information.

[0130] Furthermore, the device also includes:

[0131] The restart module is used to restart the sub-process when the status monitoring result shows that the sub-process is in an abnormal closed state.

[0132] Furthermore, the monitoring module 30 includes:

[0133] A second obtaining unit, configured to obtain an importance level corresponding to the subprocess;

[0134] A generating unit, configured to generate a monitoring time interval corresponding to the importance level;

[0135] A monitoring unit is used to monitor the status of the sub-process based on the process number in the memory space at regular intervals according to the monitoring time.

[0136] Furthermore, the device also includes:

[0137] The deletion module is used to receive a process closing request, close the sub-process according to the process closing request, and delete the process number of the sub-process in the memory space.

[0138] The expanded content of the specific implementation mode of the process management device of the present invention is basically the same as the various embodiments of the above-mentioned process management method, and will not be elaborated here.

[0139] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a process management program is stored. When the process management program is executed by a processor, the steps of the process management method described below are implemented.

[0140] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the process management method described above are implemented.

[0141] The various embodiments of the process management device, computer-readable storage medium, and computer program product of the present invention may all refer to the various embodiments of the process management method of the present invention, and will not be described in detail here.

[0142] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0143] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0145] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A process management method, characterized in that: Applied to the management server, the method comprises the following steps: The management server receives the process creation request and creates a child process according to the parameters in the process creation request; The process number of the subprocess generated during the creation process is stored in the memory space corresponding to the management server; Performing status monitoring on the subprocess based on the process number in the memory space; The step of monitoring the status of the subprocess based on the process number in the memory space includes: Using the process name of the child process to search for the survival status of the child process; If not found, obtaining the process ID from the memory space; Using the process number to find out the survival status of the child process; The step of monitoring the status of the subprocess based on the process number in the memory space comprises: Obtaining the importance level corresponding to the subprocess; generating a monitoring time interval corresponding to the importance level; Regularly monitoring the status of the subprocess based on the process number in the memory space according to the monitoring time interval; When the status monitoring result shows that the subprocess is in a running state, generating a test service request; Sending the test service request to the subprocess and obtaining feedback information of the subprocess, wherein the feedback information includes data returned after successful service execution and / or prompt information of service execution failure; The service status of the subprocess is determined according to the feedback information.

2. The process management method according to claim 1, characterized in that: After the step of monitoring the status of the subprocess based on the process number in the memory space, the method further includes: When the status monitoring result shows that the subprocess is in an abnormal shutdown state, restart the subprocess.

3. The process management method according to claim 1 or 2, characterized in that: After the management server receives the process creation request and creates a child process according to the parameters in the process creation request, the process further includes: A process closing request is received, the sub-process is closed according to the process closing request, and the process ID of the sub-process in the memory space is deleted.

4. A process management device, characterized in that: The device is deployed on a management server, and includes: A creation module, used to receive a process creation request and create a child process according to the parameters in the process creation request; A storage module, used to store the process number of the subprocess generated during the creation process into the memory space corresponding to the management server; A monitoring module, used to obtain the importance level corresponding to the sub-process; generate a monitoring time interval corresponding to the importance level; regularly monitor the status of the sub-process based on the process number in the memory space according to the monitoring time interval; the monitoring module is specifically used to use the process name of the sub-process to search for the survival status of the sub-process; if not found, obtain the process number from the memory space; use the process number to search and obtain the survival status of the sub-process; The device also includes: When the status monitoring result shows that the sub-process is in a running state, a test service request is generated; the test service request is sent to the sub-process, and feedback information of the sub-process is obtained, wherein the feedback information includes data returned after the service is successfully executed, and / or prompt information of the service execution failure; the service status of the sub-process is determined according to the feedback information.

5. A process management device, characterized in that: The process management device comprises: a memory, a processor, and a process management program stored in the memory and executable on the processor. When the process management program is executed by the processor, the steps of the process management method according to any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a process management program, and when the process management program is executed by the processor, the steps of the process management method according to any one of claims 1 to 3 are implemented.

7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Process guarding method and device, electronic equipment and computer storage medium

    CN111400081A