Service process hosting system and method

By designing a service process hosting system, the problem of back-end service processes being easily shut down and automatically restarted in industrial scenarios is solved, and the stable operation and automatic restart functions of process management are realized, which improves management efficiency.

CN119988077APending Publication Date: 2025-05-13CHONGQING COLLEGE OF ELECTRONICS ENG +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510085256.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In industrial scenarios, back-end service processes are easily shut down by mistake, resulting in service interruption, and traditional solutions cannot realize automatic restart and user-friendly process management.

Method used

Design a service process hosting system, including the startup process part, the process management part, the monitoring part and the back-end service part. By configuring the file to manage the process, automatically restart the abnormal exit service, and support the interaction between the monitoring part and the process management part.

Benefits of technology

Ensure that the process management part is running stably, automatically restart the abnormal exit services, reduce maintenance burden, and improve management efficiency through interactive monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988077A_ABST
    Figure CN119988077A_ABST
Patent Text Reader

Abstract

The invention provides a service process hosting system and method.The service process hosting system comprises a process starting part, a process management part, a monitoring part and a back-end service part, the process starting part controls the process management part to start, one side of the process management part is monitored by the monitoring part, and the other side of the process management part is monitored by the back-end service part; and the other side of the process management part reads the configuration file, takes the application part hosting the configuration file as a back-end service part and starts the back-end service part. According to the service process hosting system and method, it is guaranteed that the process management part runs stably all the time, hosted back-end services which exit abnormally are restarted automatically, and the process management part and the monitoring part work in an interactive mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of service processes, and in particular to a service process hosting system and method. Background Art

[0002] Backend services in industrial scenarios often do not have a running interface, but are command line programs. Once these command line programs are opened, the command line window cannot be closed. Once the window is closed, the service process will also be closed. The window may be closed by mistake, which will have a catastrophic impact on industrial production.

[0003] When the backend service is used as a system service of the operating system, no running window will appear, but such a system service cannot form a "process tree". For an engineering project, the various system services of the project appear to be scattered and difficult to manage. It is also impossible to dynamically add or delete a backend service through user-friendly customization methods such as configuration files.

[0004] If the service process ends abnormally, the traditional solution is that the maintenance personnel can only restart it manually, which is less timely. This tool can automatically restart the service process to ensure smooth production and reduce the maintenance burden. A project often has multiple backend services. So many backend services running on the server are not conducive to overall management. With this tool, more processes can be implemented according to functional division to prevent a process from having too many functions and crashing abnormally. Pre-configure the processes that need to be hosted, which are completely specified by the user. The process management part only hosts the programs in the configuration file and has no effect on other processes in the system. Summary of the invention

[0005] The purpose of the present invention is to provide a service process hosting system and method, which not only ensures that the process management part always runs stably and automatically restarts the hosted backend service that exits abnormally, but also that the process management part and the monitoring part work in an interactive manner.

[0006] To achieve the above-mentioned objectives, the present invention provides a service process hosting system and method, including a startup process part, a process management part, a monitoring part and a backend service part. The startup process part controls the startup of the process management part, one side of the process management part is monitored by the monitoring part, and the other side of the process management part reads a configuration file and uses the application part of the hosted configuration file as the backend service part and starts the backend service part.

[0007] Preferably, the startup process part is responsible for starting the process management part, and the startup process part exits after starting the process management part.

[0008] Preferably, the monitoring part sends instructions to the process management part, and the process management part provides feedback to the monitoring part after receiving the instructions.

[0009] Preferably, only one process management part can be running during the working process.

[0010] Preferably, the monitoring part provides the process management part with an end service instruction and a restart service instruction.

[0011] Preferably, the method comprises the following steps:

[0012] S1. Set the configuration file and host the configuration file to the specified application part;

[0013] S2. Start the process management part by starting the process part; when the process management part is started, it is necessary to detect the running status of other process management parts. If it is detected that other process management parts are running, the start of this process management part fails; if it is not detected that other process management parts are running, the start of this process management part is successful;

[0014] S3. After the process management part is successfully started, the process management part reads the configuration file, uses the application part of the hosting configuration file as the backend service part and starts the backend service part, and at the same time, the startup process part is closed normally. The shutdown of the startup process part will not affect the operation of the process management part;

[0015] S4. If the backend service part runs abnormally during operation, the process management part will automatically restart;

[0016] S5. After the monitoring part is started, it monitors the process management part; the monitoring part sends an end service instruction to the process management part, and the process management part ends the service after receiving the instruction and provides feedback to the monitoring part; the monitoring part sends a restart service instruction to the process management part, and the process management part restarts the service after receiving the instruction and provides feedback to the monitoring part.

[0017] Therefore, the present invention adopts the above-mentioned service process hosting system and method, which not only ensures that the process management part always runs stably and automatically restarts the hosted backend service that exits abnormally, but also that the process management part and the monitoring part work in an interactive manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of the system structure of a service process hosting system and method of the present invention;

[0019] Figure 2 The present invention provides an overall flow chart of a service process hosting system and method. DETAILED DESCRIPTION

[0020] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0021] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.

[0022] Embodiment 1

[0023] like Figure 1-Figure 2 As shown, the present invention provides a service process hosting system and method, including a startup process part, a process management part, a monitoring part and a backend service part. The startup process part controls the startup of the process management part, and the startup process part is responsible for starting the process management part. After the process management part is started, the startup process part exits.

[0024] One side of the process management part is monitored by the monitoring part. The monitoring part sends instructions to the process management part. The monitoring part sets end service instructions and restart service instructions to the process management part. After receiving the instructions, the process management part gives feedback to the monitoring part. Only one process management part can run during the working process.

[0025] The other side of the process management part reads the configuration file and uses the application part of the hosting configuration file as the backend service part and starts the backend service part.

[0026] The following steps are involved:

[0027] S1. Set the configuration file and host the configuration file to the specified application part;

[0028] S2. Start the process management part by starting the process part; when the process management part is started, it is necessary to detect the running status of other process management parts. If it is detected that other process management parts are running, the start of this process management part fails; if it is not detected that other process management parts are running, the start of this process management part is successful;

[0029] S3. After the process management part is successfully started, the process management part reads the configuration file, uses the application part of the hosting configuration file as the backend service part and starts the backend service part, and at the same time, the startup process part is closed normally. The shutdown of the startup process part will not affect the operation of the process management part;

[0030] S4. If the backend service part runs abnormally during operation, the process management part will automatically restart the backend service part;

[0031] S5. After the monitoring part is started, it monitors the process management part; the monitoring part sends a service termination instruction to the process management part, and the process management part terminates the service after receiving the instruction and gives feedback to the monitoring part; the monitoring part sends a service restart instruction to the process management part, and the process management part restarts the service after receiving the instruction and gives feedback to the monitoring part. The instructions between the monitoring part and the process management part include: checking the process status; terminating a specified managed process; starting a specified managed process; terminating all managed processes; restarting all managed processes; terminating all managed processes and terminating the process management part at the same time; and exiting the monitoring part only.

[0032] The startup process part is responsible for starting the process management part, and automatically exits after the startup to ensure that the process management part is always stationed and running in the backend. If the process part is not started and the process management part is directly started, the process management part cannot be stationed in the backend and the running window will remain in the frontend. Once the window is closed, the process management part and its managed parts will be closed. The process management part will automatically restart the managed process that exits abnormally without manual intervention.

[0033] The monitoring part sends instructions to the process management part, and the process management part responds to the corresponding instructions and feeds back the results to the monitoring part so that the user can understand the execution status of the process. Send commands in an interactive way and get status feedback of the managed process.

[0034] Running the startup process part will start the process management part. The process management part first detects whether there are other process management parts running. If there are, the startup fails. If not, it reads the configuration file and starts each backend service part in sequence according to the configuration order, so that these backend service parts become subprocesses of the process management part, forming a process tree; if the process part is not started, the process management part can also be formed by running the process management part directly in the command line, but the command line window where the process management part is located cannot be closed. Once closed, the entire process tree will be closed; after the process management part is started, the started process part is converted to a backend service, and the startup process part will exit normally. At this time, the window where the command line of the startup process part is located can be closed, and the process tree of the process management part will not be affected in any way, so that it can be kept stationed and running at the back end of the operating system. During this period, if any managed process ends abnormally, the process management part will automatically restart it to ensure that all managed processes are in a running state and the industrial process proceeds smoothly. After the process management part is started, the monitoring part can be used at any time to interactively communicate with the process management part to obtain the status of the managed process or control the start and stop of the process.

[0035] Therefore, the present invention adopts the above-mentioned service process hosting system and method, which not only ensures that the process management part always runs stably and automatically restarts the hosted backend service that exits abnormally, but also that the process management part and the monitoring part work in an interactive manner.

[0036] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A service process hosting system, characterized in that: It includes a starting process part, a process management part, a monitoring part and a backend service part. The starting process part controls the starting of the process management part. One side of the process management part is monitored by the monitoring part. The other side of the process management part reads the configuration file and uses the application part of the hosted configuration file as the backend service part and starts the backend service part.

2. A service process hosting system according to claim 1, characterized in that: The start-up process part is responsible for starting the process management part, and after starting the process management part, the start-up process part exits.

3. A service process hosting system according to claim 1, characterized in that: The monitoring part sends instructions to the process management part, and the process management part gives feedback to the monitoring part after receiving the instructions.

4. A service process hosting system according to claim 1, characterized in that: Only one process management part can be running during the work process.

5. A service process hosting system according to claim 3, characterized in that: The monitoring part has end service instructions and restart service instructions for the process management part.

6. A method for a service process hosting system as claimed in claims 1-5, characterized in that: The following steps are involved: S1. Set the configuration file and host the configuration file to the specified application part; S2. Start the process management part by starting the process part; when the process management part is started, it is necessary to detect the running status of other process management parts. If it is detected that other process management parts are running, the start of this process management part fails; if it is not detected that other process management parts are running, the start of this process management part is successful; S3. After the process management part is successfully started, the process management part reads the configuration file, uses the application part of the hosting configuration file as the backend service part and starts the backend service part, and at the same time, the startup process part is closed normally. The shutdown of the startup process part will not affect the operation of the process management part; S4. If the backend service part runs abnormally during operation, the process management part will automatically restart the backend service part; S5. After the monitoring part is started, it monitors the process management part; the monitoring part sends an end service instruction to the process management part, and the process management part ends the service after receiving the instruction and provides feedback to the monitoring part; the monitoring part sends a restart service instruction to the process management part, and the process management part restarts the service after receiving the instruction and provides feedback to the monitoring part.