Application service self-starting method and device, storage medium and program product

By implanting the self-start service entry file in the server's service manager, automatically parsing and executing the dependencies and self-start script files of the application service, the problem of not being able to automatically restart the custom application service after the server is powered off, and the application is improved Service startup efficiency.

CN119512647APending Publication Date: 2025-02-2558 CHANG LIFE (BEIJING) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411554332.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When the existing server system restarts after a power outage, it cannot automatically restart the customized application service, and it needs to be started manually, which is inefficient.

Method used

The self-start service entry file is implanted in the server's service manager, and the configuration information of the service set is read through the file, the dependencies and self-start script files between application services are parsed, and the self-start script files are automatically executed to achieve the implementation of Self-start of the application service.

Benefits of technology

When the server automatically restarts after power outage, the self-start of the application service can be achieved, which improves the startup efficiency of the application service and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512647A_ABST
    Figure CN119512647A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application service starting method and device, a storage medium and a program product. In the method, a self-starting service entry file is implanted into a service manager, and under the condition that hardware resources of a server and the service manager are started, the service manager can automatically load the self-starting service entry file, so that configuration information of a service set is read from the self-starting service entry file, and the service set is automatically started. Analyzing a dependency relationship among a plurality of application services and a self-starting script file from the configuration information of the service set; furthermore, the self-starting script file can be automatically executed, and each container and the application service carried in each container are restarted in sequence according to the dependency relationship among the plurality of application services. According to the application service starting method and device, under the condition that power supply is restored again after non-autonomous power failure occurs in the running process of the server, self-starting of the application service can be achieved through the self-starting service entry file, the process of manually starting the application service is replaced, and therefore the starting efficiency of the application service can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a self-starting method, device, storage medium and program product for an application service. Background Art

[0002] With the continuous development of Internet technology, the ability to cope with sudden power outages and other failures of server systems has been continuously enhanced. At present, after an unexpected power outage of the server system, if a call is restored, the server system can automatically restart through a call restart mechanism.

[0003] However, when the current server system is restarted after a power outage, it can only automatically restart the server system's hardware and system services, such as network, file system mounting, logging system, firewall and other system services, but cannot automatically restart customized application services. The application services need to be started manually, which is inefficient. Summary of the invention

[0004] Multiple aspects of the present application provide an application service startup method, device, storage medium and program product, which are used to realize self-starting of application services and improve the startup efficiency of application services when power is restored after a non-autonomous power outage occurs during server operation.

[0005] An embodiment of the present application provides a method for starting an application service, which is applied to a server. The server includes a firmware program of hardware resources, an operating system, and an application service. The operating system includes at least a service manager, and the firmware program includes at least a power manager. The method includes: when power is restored after a non-autonomous power outage occurs during the operation of the server, the firmware program is run according to a self-restart function pre-enabled in the power manager to start the hardware resources of the server; when the hardware resources are started, the service manager in the operating system is run, the service manager includes a self-start service entry file, the self-start service entry file points to a service set, the configuration information of the service set includes dependencies between multiple application services belonging to the service set and a self-start script file for starting multiple application services, and the application service is carried in a container; when the self-start service entry file is loaded, the configuration information of the service set is read from the self-start service entry file, and the dependencies between multiple application services and the self-start script file are parsed from the configuration information of the service set; the self-start script file is executed, and each container and the application service carried in each container are restarted in turn according to the dependencies between the multiple application services.

[0006] An embodiment of the present application also provides an electronic device, including: a memory and a processor; the memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program to implement the steps in the above method.

[0007] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the steps in the above method.

[0008] An embodiment of the present application also provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the processor is enabled to implement the steps in the above method.

[0009] In an embodiment of the present application, a self-starting service entry file is implanted into the service manager. When the hardware resources of the server and the service manager are started, the service manager can automatically load the self-starting service entry file, thereby reading the configuration information of the service set from the self-starting service entry file, and parsing the dependencies between multiple application services and the self-starting script file from the configuration information of the service set; further, the self-starting script file can be automatically executed, and each container and the application service carried in each container can be restarted in turn according to the dependencies between multiple application services. Therefore, when the power supply is restored after a non-autonomous power outage occurs during the operation of the server, the self-starting of the application service can be realized through the self-starting service entry file, replacing the manual startup process of the application service, thereby improving the startup efficiency of the application service. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0011] Figure 1 A flowchart of a startup method based on application services provided by an exemplary embodiment of the present application;

[0012] Figure 2a A flow chart of a server startup process provided by an exemplary embodiment of the present application;

[0013] Figure 2b A flowchart of a startup process of an application service provided by an exemplary embodiment of the present application;

[0014] Figure 3 A schematic structural diagram of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0016] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0017] In response to the above-mentioned technical problem of low efficiency in starting application services after a non-autonomous power outage occurs during the operation of the server and power is restored again, in an embodiment of the present application, a self-starting service entry file is implanted in the service manager. When the hardware resources of the server and the service manager are started, the service manager can automatically load the self-starting service entry file, thereby reading the configuration information of the service set from the self-starting service entry file, and parsing the dependencies between multiple application services and the self-starting script file from the configuration information of the service set; further, the self-starting script file can be automatically executed to restart each container and the application service carried in each container in turn according to the dependencies between multiple application services. Therefore, in the case where power is restored again after a non-autonomous power outage occurs during the operation of the server, the self-starting of the application service can be achieved through the self-starting service entry file, replacing the manual startup process of the application service, thereby improving the startup efficiency of the application service.

[0018] A solution provided by an embodiment of the present application is described in detail below in conjunction with the accompanying drawings.

[0019] Figure 1 The flowchart of the method for starting the application service provided by the exemplary embodiment of the present application is as follows. Figure 1 As shown, the method is applied to a server, the server includes a firmware program of hardware resources, an operating system and application services, the operating system includes at least a service manager, the firmware program includes at least a power manager, and the method includes:

[0020] 101. When power is restored after an involuntary power outage during the operation of the server, the firmware program is run according to the automatic restart function pre-enabled in the power manager to start the hardware resources of the server;

[0021] 102. When the hardware resources are started, a service manager in the operating system is run. The service manager includes a self-starting service entry file. The self-starting service entry file points to a service set. Configuration information of the service set includes dependencies between multiple application services belonging to the service set and a self-starting script file for starting multiple application services. The application service is hosted in a container.

[0022] 103. When the self-start service entry file is loaded, the configuration information of the service set is read from the self-start service entry file, and the dependency relationship between multiple application services and the self-start script file are parsed from the configuration information of the service set;

[0023] 104. Execute the self-start script file to restart each container and the application service hosted in each container in sequence according to the dependency relationship between multiple application services.

[0024] A server is a specific IT device that provides computing power and runs software applications in a network environment. It provides computing or services for other clients in the network, undertakes key tasks such as data storage, forwarding, and publishing, and is an indispensable and important part of various client / server (C / S) or B / S networks. In a broad sense, a server refers to a computer system that can provide certain services to other machines in a network. In a narrow sense, a server refers specifically to certain high-performance computers that can provide services to the outside world through the network. In actual applications, the client is a terminal device, which can be a smart handheld device, such as a smart phone, a tablet computer, a laptop or a desktop computer, etc.; or, the terminal device can also be a smart wearable device, such as a smart watch, a smart bracelet, etc.; or, the terminal device can also be a smart home appliance, such as a smart TV, a smart large screen or a smart robot, etc., which is not specifically limited in this embodiment.

[0025] In addition, the server also has high performance characteristics. The high performance of the server is mainly reflected in high-speed computing power, long-term reliable operation, strong external data throughput, etc. It is the hub of the network and the core of informatization.

[0026] The above functions and performance characteristics of the server depend on the composition structure of the server. In this embodiment, the server includes a firmware program, hardware resources and software resources. The firmware program is embedded in the hardware resources and can be regarded as a part of the software resources. Among them, the firmware program is responsible for controlling the basic functions and operations of the hardware resources. For example, when the power is turned on, the hardware resources are initialized, the boot program is loaded and the operating system is started by running the firmware program. The hardware resources at least include: a processor (CPU), a memory (RAM), a storage device, a network interface card (NIC), a power supply unit (Power Supply Unit, PSU), a motherboard, a chassis and other peripheral devices and connecting cables, etc. The storage device can be, for example, a hard disk, a solid-state hard disk, etc. These hardware resources together constitute the physical basis of the server, which is responsible for executing computing tasks, storing data and processing network communications. The software resources at least include: an operating system and services. Among them, the operating system is used to provide an operating environment for the operation of software resources. The operating system can be, for example, a Windows Server, a Linux system, etc. The services at least include: system services and application services. Among them, system services refer to programs running on the kernel space of the operating system (i.e., the background) to provide core functions and support for the operating system. System services can be, for example, network services, database services, system management services, security services, Web services, system log services, time synchronization services, etc. Application services refer to custom services developed according to specific needs or business logic to provide specific business functions. Application services are usually services running at the user space level. These software resources together constitute the software foundation of the server, which is responsible for managing and scheduling hardware resources, providing services, and performing computing tasks required by users. Application services can be, for example, middleware, virtualization software, security software, backup and recovery software, monitoring and management tools, development and deployment tools, and storage management software. Application services can also be the various services contained in the target application downloaded and installed from the application management program (such as the application store) during the operation of the server.

[0027] It can be seen from the above embodiments that when the server is powered on and started, the server's firmware program is first run, and the server's hardware resources are started based on the running of the firmware program. Then, the server's operating system is started, and on the basis of the operating system providing a running environment for the service, the server's system services and application services are further started.

[0028] It should be noted that the restarting methods of system services and application services when power is restored after a non-autonomous power outage during server operation are different. For detailed startup process, please refer to the relevant description of the following embodiment, which will not be described here. It should also be noted that in actual applications, multiple system services that the application service that needs to be restarted must rely on can be started first according to the dependency relationship between them, and core functions and support application services can be provided for the application service, and then the application service can be restarted. Furthermore, for multiple system services that the application service that needs to be restarted does not need to rely on, they can be started at the same time as the system services that the application service that needs to be restarted must rely on according to the dependency relationship between them, or after the application service that needs to be restarted is started, the multiple system services that the application service that needs to be restarted does not need to rely on can be started, or they can be started at other times, and this is not limited in this embodiment. First, multiple system services that the application service that needs to be restarted must rely on are started, then the application service that needs to be restarted is started, and finally multiple system services that the application service that needs to be restarted does not rely on are started. While providing good basic conditions and space for self-restart for the application service that needs to be restarted, the application service that needs to be restarted can also restart itself as early as possible, thereby improving the startup efficiency of the application service that needs to be restarted and the server.

[0029] In an embodiment of the present application, when power is restored, after the power supply unit in the hardware resources starts to supply power, the power management unit (Power Management Unit, PMU) will detect the restoration of power and trigger a call signal to the motherboard to restart the hardware resources of the server.

[0030] In the embodiment of the present application, the firmware program at least includes a power manager, which can be a firmware program of the mainboard, and is used to set the function of automatically starting the server after power failure, that is, the pre-enabled self-restart function, so that when the power supply is restored again after a non-autonomous power failure occurs during the operation of the server, after the power management unit sends an electrical signal to the mainboard, the power manager responds to the electrical signal and restarts and runs according to the pre-enabled self-restart function to initialize and start the hardware resources of the server. On the one hand, the pre-enabled self-restart function based on the power manager can restart the server as soon as the power supply is restored, without the need for manual monitoring to restart the server after the power supply is restored, saving the time wasted in the monitoring process; on the other hand, there is no need for manual monitoring and manual startup of the server, which improves the restart efficiency of the server and saves labor costs. The power manager can be, for example, a Basic Input / Output System (BIOS) or a Unified Extensible Firmware Interface (UEFI).

[0031] Taking the power manager as BIOS as an example, BIOS is the first software that runs when the server starts. It is responsible for initializing the hardware and starting the operating system. APM is a function item in BIOS, which is used to manage advanced power-related features, such as automatic restart of the server after power failure. There is an option in the APM setting of BIOS to control the behavior of the server after power is restored. This option may be marked as "Power After Power Loss", "Restore on AC Power Loss", "AC Power Recovery" and other states. When this option is set to "Enab led", "Power On" or similar values, after BIOS receives the incoming call signal triggered by the power management unit after detecting the recovery of power, BIOS starts running according to the pre-enabled self-restart function to start the hardware resources of the server.

[0032] In one practical application, the non-autonomous power failure of the server may be an unexpected power failure caused by a fault in the server itself while the external power supply device is not powered off during the operation of the server. In this case, the server can automatically restart based on the self-restart function pre-enabled by the power manager. In another practical application, the non-autonomous power failure of the server may be an unexpected power failure caused by a sudden power failure of the external power supply device of the server during the operation of the server. In this case, if the external power supply device resumes power supply, the server can automatically restart based on the self-restart function pre-enabled by the power manager.

[0033] Based on the above embodiments, it can be seen that when the power supply is restored after an autonomous power outage during the operation of the server, the firmware program can be run according to the automatic restart function pre-enabled in the power manager to start the hardware resources of the server. The automatic restart function of the hardware resources can improve the overall startup efficiency of the server.

[0034] Accordingly, once the power supply is restored, the power manager will perform a power-on self-test (POST) to check whether each hardware resource is working properly. If it is determined that each hardware resource is working properly, it will initialize each hardware resource to ensure that all hardware resources can be correctly identified, configured, and ready. Specifically, the power manager's initialization process for each hardware resource includes the following steps: (1) Detecting hardware resources: The power manager will detect all connected hardware resources when it starts; (2) Configuring hardware resources: According to the settings of the power manager and the hardware resource specifications, the hardware resources are configured, such as setting memory timing, allocating I / O, etc. RQ, I / O ports, etc.; initialize device drivers and load necessary device drivers so that the operating system can control hardware devices; (3) Set up system resources: allocate system resources, such as memory address space, DMA channel, interrupt vector, etc.; (4) Hardware resource functional test: perform hardware resource functional test to ensure that all hardware resources are working properly, such as memory test, SATA / SCSI controller test, etc.; (5) Establish communication protocol: establish communication protocol for hardware resources to ensure that hardware resources can communicate with each other; (6) Boot sequence setting: determine the system boot sequence and decide which hardware resource to start the operating system from; (7) Hardware resource interface initialization: initialize system bus (such as PCIe, USB) and interface to ensure that they can transmit data; (8) Firmware program update: if necessary, update the firmware program to support new hardware resources or fix known problems; (9) Operating system preparation: prepare to hand over control to the operating system, including loading the boot loader and the operating system kernel.

[0035] Among them, the boot loader is a special software program responsible for loading the operating system or other programs into the memory when the computer starts up so that the computer can start running the operating system. The main functions of the boot loader include: Initialize hardware resources: Before the operating system takes over, the boot loader will initialize and detect hardware resources. Set up the startup environment: It configures the necessary startup environment, including memory and processor settings. Locate the operating system: The boot loader identifies the location of the operating system on the storage device. Load the operating system: Copy the kernel of the operating system and necessary startup files from the storage device to the memory. Pass startup parameters: The boot loader can pass startup parameters to the operating system, which can affect the startup behavior of the operating system. Fault detection: Some boot loader programs also include fault detection and handling functions. Boot menu: In a multi-operating system environment, the boot loader may provide a boot menu that allows users to select the operating system to start. Common boot loader programs include: GRUB (GRand Unified Bootloader), LI LO (Linux Loader), BIOS Boot loader, U-Boot, etc.

[0036] In the embodiment of the present application, the operating system at least includes: a service manager, and the service manager is used to self-start and initialize system services. It should be noted that the system services focused on in this embodiment are the basic services of the system.

[0037] Specifically, when the hardware resources are started, the service manager is run. The service manager starts the system service according to the command line in the configuration file, which is built into the service manager. These command lines define the dependencies, startup sequence, and other behaviors of the system service. Each system service has a corresponding unit file, which usually contains three parts: [Unit], [Service], and [Install]. Among them, the [Unit] part defines the description, document links, dependencies, etc. of the system service; the [Service] part defines the specific startup behavior of the system service, such as the executed command, environment variables, users, etc.; the [Install] part defines the installation information of the system service, such as the target to which the system service belongs. The service manager can execute the ExecStart command line defined in the [Service] part to start the system service according to the configuration in the unit file. Once the service is started, the service manager will manage the life cycle of the system service according to the configuration in the unit file, including restart, stop, and other operations.

[0038] Among them, the system manager can be, for example, systemd. systemd is both part of the operating system and can be regarded as a service management framework. Specifically: As part of the operating system: systemd is the initialization system and service manager in modern Linux systems. It runs as the first user space process (PID1) when the system starts and is responsible for starting and managing all other system services. In this role, systemd is part of the core functions of the operating system because it is directly involved in the startup and management of the system. As a service management framework: systemd provides a powerful service management framework that allows system administrators to define, start, stop and monitor system services. In this sense, systemd can be regarded as a service management tool that provides a rich set of features for the life cycle management of services. The design and implementation of systemd transcends the traditional concept of "service". It is not just a simple service, but the basis of the entire system service management. systemd introduces the concept of units, which can be of various types such as services, mount points, sockets, etc., making the management of system services more flexible and powerful. In general, systemd is a key component of the modern Linux operating system. It integrates the functions of system initialization and system service management, so it can be considered both a part of the operating system and a comprehensive service management framework.

[0039] In the above-mentioned embodiment, the service that automatically starts upon incoming calls is a system service, and the system service is started based on a configuration file built into the service manager. In order for the application service to be able to self-start when power is restored after a non-autonomous power outage occurs during the operation of the server, a self-start service entry file can be implanted in the service manager, and the self-start of the application server is executed through the self-start service entry file, which can further improve the startup efficiency of the server. Among them, the self-start service entry file can be developed based on the demand information of the server operation before the server is turned on / started, and the self-start service entry file is implanted into the server manager through the interface exposed to the outside by the service manager, so as to load the self-start service entry file during the operation of the service manager, thereby starting each container and the corresponding application service based on the self-start service entry file, thereby improving the startup efficiency of the application service.

[0040] In an embodiment of the present application, the self-starting service entry file is loaded during the operation of the service manager, so that each container and the corresponding application service are started based on the self-starting service entry file, which includes at least the following two implementation methods.

[0041] Implementation Method 1

[0042] In an embodiment of the present application, the self-start service entry file points to a service set, and the service set has configuration information, and the configuration information includes the dependency relationship between multiple application services belonging to the service set and the self-start script file for starting multiple application services. Among them, each application service can be carried in its own container. The self-start script file includes: the carrying relationship between the container and the application service, the container startup command line of each container, and the application service command line of each application service. Each container startup command line includes an image identifier, and each image identifier corresponds to a container image file. Each container image file contains all the content required to run the container, including code, runtime environment, system tools, system libraries and settings, which means that the application service and all its dependencies are packaged together to ensure the consistency of the operating environment. Each container startup command line is used to load the corresponding container image file according to the image identifier when executing each container startup command line to start the corresponding container. Each application service startup command line is used to execute the corresponding application service startup command line when the container where each application service is located is successfully started to start the application service. In addition, the configuration information of the service set also includes: the priority between multiple application services, and the priority is used to characterize the startup order of each service, so as to start the corresponding container and application service according to the startup order. Each application service can be carried in its own container, so that the application service built using the container can run in an independent user space, and the failure of a single container will not affect other containers, which can improve the elasticity and availability of the application; in addition, each application service can be carried in its own container, so that the application service can run on different operating systems and cloud platforms without a lot of modifications, so that developers can build an application and deploy it on multiple operating systems, such as running the same container on Linux and Windows. It should be noted that different application services can be carried in different containers, and some application services can also be carried in the same container, which is not limited in this embodiment. Among them, when some application services are carried in the same container, when loading into the container, if only one or part of the application services carried in the container can be loaded based on the dependency relationship, the remaining other application services of the container can be skipped for subsequent loading, and when loading into the container later, the application services that can be loaded currently are loaded based on the dependency relationship, and so on, until the application services in the container are loaded.

[0043] In actual applications, multiple engineering projects can be set up according to actual needs. Each engineering project corresponds to a service set. Each engineering project has configuration information. The configuration information of each engineering project includes: a self-starting script file of the engineering project. The self-starting script file of each engineering project includes: a container for carrying multiple applications in the corresponding service set and a project command line for starting the engineering project. The project command line is used to start the engineering project. The service set of each engineering project also has configuration information. The configuration information of each service set includes: the dependency relationship between multiple application services belonging to the service set of the engineering project, a self-starting script file for starting multiple application services in the service set, and the self-starting script file for multiple application services in the service set of each engineering project includes: the carrying relationship between the container contained in the engineering project and the application service, the container startup command line of each container, and the application service command line of each application service.

[0044] Specifically, when the hardware resources are started, the service manager in the operating system is run. During the process of running the server manager, various files in the service manager are loaded. When the self-starting service entry file is loaded, the configuration information of the service set is read from the self-starting service entry file, and the dependency relationship between multiple application services and the self-starting script file are parsed from the configuration information. Further, the self-starting script file of the service set is executed, and each container and the application service hosted in each container are restarted in sequence according to the dependency relationship between multiple application services.

[0045] The technical solution provided by the above-mentioned embodiment of the present application implants the self-starting service entry file into the service manager. When the hardware resources of the server and the service manager are started, the service manager can automatically load the self-starting service entry file, thereby reading the configuration information of the service set from the self-starting service entry file, and parsing the dependencies between multiple application services and the self-starting script file from the configuration information of the service set; further, the self-starting script file can be automatically executed, and each container and the application service carried in each container can be restarted in turn according to the dependencies between multiple application services. Therefore, when the power supply is restored after a non-autonomous power outage occurs during the operation of the server, the self-starting of the application service can be realized through the self-starting service entry file, replacing the manual startup process of the application service, thereby improving the startup efficiency of the application service.

[0046] In an embodiment of the present application, a self-start script file is executed, and each container and the application service carried in each container are restarted in sequence according to the dependency relationship between multiple application services, including: parsing the self-start script file to obtain the carrying relationship between the container and the application service, the container startup command line of each container, and the application service startup command line of each application service; based on the dependency relationship between multiple application services, the containers carrying each application service are traversed in sequence; for the currently traversed container, the container startup command line of the currently traversed container is executed to start the currently traversed container; after starting the currently traversed container, the application service carried in the currently traversed container is determined according to the carrying relationship between the container and the application service, and the application service startup command line of the application service is executed to restart the application service carried in the currently traversed container. Based on the dependency relationship between multiple application services, containers and services are loaded in sequence, so that the startup process of the application service can be carried out in an orderly manner, reducing the probability of a series of problems occurring during the loading process, so as to improve the restart efficiency of the server.

[0047] In an optional embodiment, based on the dependency relationships between the multiple application services, the containers carrying the respective application services are sequentially traversed, including: if there is a one-to-one dependency relationship in the dependency relationship, for the one-to-one dependency relationship, the container where the first application service that is dependent on the one-to-one dependency relationship is located is preferentially traversed, and then the container where the second application service that depends on the first application service in the one-to-one dependency relationship is located is traversed;

[0048] In another optional embodiment, based on the dependency relationships among the multiple application services, the containers carrying the respective application services are traversed in sequence, including: if there is a one-to-many dependency relationship in the dependency relationship, for the one-to-many dependency relationship, the container where the third application service that is dependent on the one-to-many dependency relationship is located is preferentially traversed, and then the multiple containers where the multiple fourth application services are located are traversed in sequence according to the priorities of the multiple fourth application services that depend on the third application service in the one-to-many dependency relationship.

[0049] Optionally, executing the container startup command line of the currently traversed container to start the currently traversed container includes: executing the container startup command line of the currently traversed container, and when running to the image identifier, loading and running the container image file corresponding to the image identifier; if the container image file runs successfully, determining that the currently traversed container is successfully started.

[0050] Optionally, when the currently traversed container is successfully started, the application service startup command includes a code identifier, then the application service startup command line of the application service is executed to restart the application service carried in the currently traversed container, including: executing the application service startup command line of the application service, and when the code identifier is run, loading and running the service code file corresponding to the code identifier; when the service code file runs successfully, determining that the application service is successfully started.

[0051] Further optionally, the software resources also include: a status monitor, which is used to monitor the operating data of each container and the application service carried by each container, and issue an alarm message when the operating data is abnormal. Based on this, during the operation process after the restart of multiple application services, the status monitor can be used to regularly monitor the operating data of each container; when it is detected that the operating data of any container does not meet the operating data standard, it is determined that any container is in a faulty state; the container restart command line of the container is executed to start any container; further, the application service startup command line corresponding to the application service carried by any container is executed to start the application service carried by any container. At the same time, during the operation process after the restart of multiple application services, the status monitor can also be used to regularly monitor the operating data of the application services carried by each application container; when it is detected that the operating data of any application service does not meet the operating data standard, it is determined that any application service is in a faulty state; the application service startup command line of any application service is executed to start any application service.

[0052] Further optionally, the software resource also includes: a timer, and the state monitor is bound to the timer and is used to time the state detector. In addition, the operation data standard includes a first operation data standard for each container and a second operation data standard for each application service. Based on this, the operation data of each application service is regularly monitored using the state monitor, including: triggering the state monitor to obtain the first operation data of each container and the second operation data of each application service each time the preset timing period of the timer is reached. Correspondingly, when it is monitored that the operation data of any application service does not meet the operation data standard, it is determined that any application service is in a fault state, including: obtaining a first judgment result of whether the container operation data of each container meets the corresponding container operation data standard; if the first judgment result is yes, then continue to obtain a second judgment result of whether the application service operation data standard of each application service meets the corresponding application service operation data standard; if the second judgment result for any application service is no, it is determined that any application service is in a fault state.

[0053] Further optionally, executing an application service restart command line to start any application service includes: when it is determined that any application service is in a faulty state, executing the application service restart command line to restart any application service in a faulty state; if the first judgment result is no, executing the container restart command line to restart the container in a faulty state; when the startup of the container in the faulty state is completed, obtaining a third judgment result of whether the running data of the application service carried by the container in the faulty state meets the corresponding application service running data; if the third judgment result is no, executing the application service restart command line to restart the application service carried by the container in the faulty state.

[0054] Implementation Method 2

[0055] In order to ensure that the service manager can provide enough space for loading the configuration files of system services, and also to enable the application service to self-start when the power is restored after a non-autonomous power outage occurs during the operation of the server, a self-start service entry file can be implanted in the service manager. However, the self-start service entry file only contains the service set startup command line of at least one service set, and the self-start service entry file does not contain the configuration information of the service set in Example 1. The configuration information file of the service set is stored in other locations outside the service manager. Storing the configuration information file of each service set outside the service manager and using the built-in service set command line of the service manager to start the service set outside the service manager can reduce the space occupied by the service manager, thereby ensuring that the service manager can provide enough space for loading the configuration files of system services.

[0056] Among them, each service set startup command line contains the service set identifier, and the service set identifier points to the corresponding service set, that is, each service set startup command line is used to start the corresponding service set based on the service set identifier carried by itself. When executing each service set startup command line, the configuration information file of the service set will be loaded into the service manager for parsing based on the service set identifier carried in the server command line, or the configuration file will be parsed at the storage location of the configuration information file using each service set startup command line, and other command lines carried in the configuration information will be triggered based on the parsed configuration information. The self-starting of the application server is executed through the self-starting service entry file, which can further improve the startup efficiency of the server. Among them, the self-starting service entry file can be developed based on the demand information of the server operation before the server is turned on / started, and the self-starting service entry file is implanted into the server manager through the interface exposed to the outside by the service manager, so as to load the self-starting service entry file during the operation of the service manager, thereby starting each container and the corresponding application service based on the self-starting service entry file, and improving the startup efficiency of the application service.

[0057] Furthermore, the self-starting service entry file is implanted into the server manager through the interface exposed to the outside by the service manager, so that the self-starting service entry file can be loaded during the operation of the service manager, and the specific process of starting each container and the corresponding application service based on the self-starting service entry file can be found in the relevant description in the above-mentioned implementation mode 1, which will not be repeated here.

[0058] At this point, when power is restored after a non-autonomous power outage during server operation, the server's hardware resources and software resources are successfully started and run normally based on the application service startup method provided in the above embodiments, thereby improving the startup efficiency of application services and servers and saving labor costs.

[0059] In order to facilitate the understanding of the above technical solution, the following takes the operating system as the Linux system, the service manager as the Systemd, and the power manager as the BIOS file as an example. Figure 2a and Figure 2b The technical solutions provided by the above embodiments are described in detail in two stages: the self-starting of the application service after a non-autonomous power outage occurs during the operation of the server and the power is restored again, and the self-restarting of the application service after a failure during the operation of the application service. Figure 2a The flowchart is a flowchart of the self-starting process of the application service after the power supply is restored after a non-autonomous power outage occurs during the operation of the server. Figure 2b This is a flowchart of the automatic restart of an application service after a failure during the operation of the application service.

[0060] like Figure 2a As shown, after a non-autonomous power outage occurs during the operation of the server and power is restored again, the power supply unit in the hardware resources starts to supply power, and the firmware program embedded in the motherboard, that is, the BIOS power manager starts running based on the preset self-restart function, thereby starting the hardware resources of the server.

[0061] In the process of starting the server's hardware resources, the BIOS power manager performs a power-on self-test service to check whether all hardware resources are running normally and initialize the hardware resources. Specifically, the BIOS firmware program determines a hardware resource that can be used to load the boot program according to the boot sequence set in the CMOS, and uses the hardware resource to load the boot program to prepare the computer's hardware environment so that the operating system can be loaded to start the Linux operating system. More specifically, the BIOS firmware program loads the boot program in the first sector (such as MBR) of the specified device or the EFI system partition (such as ESP). For UEFI systems, the firmware loads the boot program in the .efi file format. Boot programs (such as GRUB, Bootmgr, etc.) are loaded into the memory for execution, and they are responsible for the further operating system loading process. The boot program loads the operating system kernel and necessary startup files, and then hands over control to the operating system kernel to complete the startup process. After the operating system is started, part of the BIOS firmware program's functions (such as disk reading and writing) continue to reside in the memory to provide basic system services to the operating system and other software.

[0062] During the process of starting the operating system, the Systemd service manager in the operating system is run. During the process of running the Systemd service manager, various files in the Systemd service manager are loaded. First, the system service file is loaded to start the necessary system services. In addition, while the system service file is loaded or after the necessary system services are started, the self-starting service entry file is loaded, the configuration information of the service set is read from the self-starting service entry file, and the dependency relationship between multiple application services and the self-starting script file are parsed from the configuration information of the service set; the self-starting script file is executed, and each container and the application service hosted in each container are restarted in turn according to the dependency relationship between multiple application services.

[0063] As shown in FIG2 , during the operation of the application service, the state monitor is used to periodically monitor the operation data of the application service. When the preset timing period of each timer is reached, the state monitor is triggered to obtain the first operation data of each container and the second operation data of each application service, and obtain the first judgment result of whether the container operation data of each container meets the corresponding container operation data standard; if the first judgment result is yes, then continue to obtain the second judgment result of whether the application service operation data standard of each application service meets the corresponding application service operation data standard; if the second judgment result for any application service is no, it is determined that any application service is in a fault state.

[0064] When it is determined that any application service is in a faulty state, execute an application service restart command line to restart any application service; if the first judgment result is no, execute a container restart command line to restart the container in the faulty state; when the startup of the container in the faulty state is completed, obtain a third judgment result of whether the running data of the application service carried by the container in the faulty state meets the corresponding application service running data; if the third judgment result is no, execute the application service restart command line to restart the application service carried by the container in the faulty state.

[0065] Figure 3 The following is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. Figure 3 As shown, it includes: a memory 30a and a processor 30b; the memory 30a is used to store a computer program; the processor 30b is coupled to the memory 30a and is used to execute the computer program to implement the following steps:

[0066] When power is restored after a non-autonomous power outage during server operation, the firmware program is run according to the self-restart function pre-enabled in the power manager to start the server's hardware resources; when the hardware resources are started, the service manager in the operating system is run, the service manager includes a self-start service entry file, the self-start service entry file points to a service set, the configuration information of the service set includes the dependency relationship between multiple application services belonging to the service set and a self-start script file for starting multiple application services, and the application services are hosted in a container; when the self-start service entry file is loaded, the configuration information of the service set is read from the self-start service entry file, and the dependency relationship between multiple application services and the self-start script file are parsed from the configuration information of the service set; the self-start script file is executed, and each container and the application service hosted in each container are restarted in turn according to the dependency relationship between multiple application services.

[0067] In an embodiment of the present application, the self-start script file includes: the hosting relationship between the container and the application service, the container startup command line of each container, and the application service startup command line of each application service; when the processor 30b executes the self-start script file and restarts each container and the application service hosted in each container in turn according to the dependency relationship between multiple application services, it is specifically used to: parse the self-start script file to obtain the hosting relationship between the container and the application service, the container startup command line of each container, and the application service startup command line of each application service; based on the dependency relationship between multiple application services, traverse the containers hosting each application service in turn; for the currently traversed container, execute the container startup command line of the currently traversed container to start the currently traversed container; after starting the currently traversed container, determine the application service hosted in the currently traversed container according to the hosting relationship between the container and the application service, and execute the application service startup command line of the application service to restart the application service hosted in the currently traversed container.

[0068] Further optionally, the configuration information of the service set also includes: the priorities of multiple application services; when the processor 30b traverses the containers carrying each application service in sequence based on the dependency relationship between the multiple application services, it is specifically used to: if there is a one-to-one dependency in the dependency relationship, for the one-to-one dependency, give priority to traversing the container where the first application service that is dependent on the one-to-one dependency is located, and then traverse the container where the second application service that depends on the first application service in the one-to-one dependency is located; if there is a one-to-many dependency in the dependency relationship, for the one-to-many dependency, give priority to traversing the container where the third application service that is dependent on the one-to-many dependency is located, and then traverse the multiple containers where the multiple fourth application services are located in sequence according to the priorities of the multiple fourth application services that depend on the third application service in the one-to-many dependency.

[0069] In some embodiments, if the processor 30b includes an image identifier in the container startup command line, then the container startup command line of the currently traversed container is executed to start the currently traversed container, specifically for: executing the container startup command line of the currently traversed container, and when the image identifier is reached, loading and running the container image file corresponding to the image identifier; if the container image file runs successfully, determining that the currently traversed container is successfully started; if the application service startup command includes a code identifier, then the application service startup command line of the application service is executed to restart the application service carried in the currently traversed container, including: executing the application service startup command line of the application service, and when the code identifier is reached, loading and running the service code file corresponding to the code identifier; if the service code file runs successfully, determining that the application service is successfully started.

[0070] Further optionally, before the server runs, the processor 30b is also specifically used to: develop a self-starting service entry file based on the demand information of the server operation; and implant the self-starting service entry file into the server manager through the interface exposed to the outside by the service manager to facilitate loading the self-starting service entry file during the operation of the service manager.

[0071] In some embodiments, multiple application services correspond to application service restart command lines. Based on this, the processor 30b is also used to use a status monitor to regularly monitor the operation data of each application service during the operation process after the multiple application services are restarted; when it is detected that the operation data of any application service does not meet the operation data standard, determine that any application service is in a fault state; and execute the application service restart command line to start any application service.

[0072] In some embodiments, multiple application services correspond to container restart command lines, the status monitor is bound to a timer, and the operation data standard includes a first operation data standard for each container and a second operation data standard for each application service. Based on this, when the processor 30b uses the status monitor to regularly monitor the operation data of each application service, it is specifically used to: trigger the status monitor to obtain the first operation data of each container and the second operation data of each application service when the preset timing period of the timer is reached each time.

[0073] Correspondingly, when the processor 30b monitors that the running data of any application service does not meet the running data standard, in the process of determining that any application service is in a fault state, it is specifically used to: obtain a first judgment result of whether the container running data of each container meets the corresponding container running data standard; if the first judgment result is yes, continue to obtain a second judgment result of whether the application service running data standard of each application service meets the corresponding application service running data standard; if the second judgment result for any application service is no, it is determined that any application service is in a fault state.

[0074] In some embodiments, when the processor 30b executes an application service restart command line to start any application service, it is specifically used to: when it is determined that any application service is in a faulty state, execute the application service restart command line to restart any application service in a faulty state; if the first judgment result is no, execute the container restart command line to restart the container in a faulty state; when the startup of the container in a faulty state is completed, obtain a third judgment result of whether the running data of the application service carried by the container in the faulty state meets the corresponding application service running data; if the third judgment result is no, execute the application service restart command line to restart the application service carried by the container in the faulty state.

[0075] Furthermore, if Figure 3As shown, the server also includes: a communication component 30c, a display 30d, a power component 30e, an audio component 30f and other components. Figure 3 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 3 Components shown.

[0076] The detailed implementation and beneficial effects of the electronic device provided in the embodiments of the present application have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0077] The exemplary embodiments of the present application further provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is caused to implement the steps in the above-mentioned method embodiments.

[0078] An exemplary embodiment of the present application further provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the processor is enabled to implement the steps in the above-mentioned method embodiments.

[0079] The above-mentioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0080] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (Ultra Wide Band, UWB) technology, Bluetooth (BlueTooth, BT) technology and other technologies.

[0081] The above-mentioned display includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0082] The power supply assembly provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.

[0083] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0084] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, compact disk read-only memory (Compact Disk Read-Only Memory, CD-ROM), optical storage, etc.) that contain computer-usable program code.

[0085] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0088] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0089] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

[0090] Computer-readable media include permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0091] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0092] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for starting an application service, characterized in that: Applied to a server, the server includes a firmware program of hardware resources, an operating system and application services, the operating system includes at least a service manager, the firmware program includes at least a power manager, and the method includes: When the server is powered on again after a non-autonomous power outage occurs during operation, the firmware program is run according to the self-restart function pre-enabled in the power manager to start the hardware resources of the server; When the hardware resource startup is completed, the service manager in the operating system is run, the service manager includes a self-starting service entry file, the self-starting service entry file points to a service set, the configuration information of the service set includes dependencies between multiple application services belonging to the service set and a self-starting script file for starting the multiple application services, and the application service is carried in a container; When loaded into the self-start service entry file, the configuration information of the service set is read from the self-start service entry file, and the dependency relationship between the multiple application services and the self-start script file are parsed from the configuration information of the service set; The self-start script file is executed to restart each container and the application service carried in each container in sequence according to the dependency relationship between the multiple application services.

2. The method according to claim 1, characterized in that The self-start script file includes: the hosting relationship between the container and the application service, the container startup command line of each container and the application service startup command line of each application service; Executing the self-start script file, and restarting each container and the application service carried in each container in sequence according to the dependency relationship between the multiple application services, includes: Parsing the self-start script file to obtain the bearing relationship between the container and the application service, the container startup command line of each container, and the application service startup command line of each application service; Based on the dependency relationship between the multiple application services, traverse the containers carrying the respective application services in sequence; For the currently traversed container, execute the container startup command line of the currently traversed container to start the currently traversed container; after starting the currently traversed container, determine the application service hosted in the currently traversed container according to the hosting relationship between the container and the application service, and execute the application service startup command line of the application service to restart the application service hosted in the currently traversed container.

3. The method according to claim 2, characterized in that The configuration information of the service set also includes: the priorities of the multiple application services; Based on the dependency relationship between the multiple application services, traversing the containers carrying the respective application services in sequence includes: If there is a one-to-one dependency in the dependency relationship, for the one-to-one dependency, the container where the first application service that is dependent on the one-to-one dependency is located is traversed first, and then the container where the second application service that depends on the first application service in the one-to-one dependency is located is traversed; If there is a one-to-many dependency in the dependency relationship, for the one-to-many dependency, the container where the third application service that is dependent on the one-to-many dependency is located is traversed first, and then the multiple containers where the multiple fourth application services are located are traversed in sequence according to the priorities of the multiple fourth application services that depend on the third application service in the one-to-many dependency.

4. The method according to claim 3, characterized in that If the container startup command line includes an image identifier, the container startup command line of the currently traversed container is executed to start the currently traversed container, including: Execute the container startup command line of the currently traversed container, and when the image identifier is reached, load and run the container image file corresponding to the image identifier; If the container image file runs successfully, determine that the currently traversed container is successfully started; The application service startup command includes a code identifier, and the application service startup command line of the application service is executed to restart the application service carried in the currently traversed container, including: Execute the application service startup command line of the application service, and when the code identifier is encountered, load and run the service code file corresponding to the code identifier; In the case where the service code file runs successfully, it is determined that the application service is successfully started.

5. The method according to claim 1, characterized in that Before the server is run, it also includes: Develop the self-start service entry file based on the demand information of the server operation; The self-starting service entry file is implanted into the server manager through the interface exposed to the outside by the service manager, so as to load the self-starting service entry file during the operation of the service manager.

6. The method according to any one of claims 1 to 5, characterized in that: The multiple application services correspond to application service restart command lines; the method further includes: During the operation of the multiple application services after restart, periodically monitoring the operation data of each application service using a status monitor; When it is monitored that the operation data of any application service does not meet the operation data standard, determining that the any application service is in a fault state; Execute the application service restart command line to start any of the application services.

7. The method according to claim 6, characterized in that The multiple application services correspond to container restart command lines, the status monitor is bound to a timer, and the operation data standard includes a first operation data standard for each container and a second operation data standard for each application service; Use status monitors to regularly monitor the operating data of each application service, including: When each preset timing period of the timer arrives, trigger the status monitor to obtain the first operation data of each container and the second operation data of each application service; Accordingly, when it is monitored that the operation data of any application service does not meet the operation data standard, determining that the any application service is in a fault state includes: Obtaining a first judgment result of whether the container operation data of each container meets a corresponding container operation data standard; If the first judgment result is yes, continue to obtain the second judgment result of whether the application service operation data standard of each application service meets the corresponding application service operation data standard; if the second judgment result for any of the application services is no, determine that any of the application services is in a fault state.

8. The method according to claim 7, characterized in that Executing the application service restart command line to start any of the application services includes: When it is determined that any of the application services is in a fault state, executing the application service restart command line to restart any of the application services; If the first judgment result is no, the container restart command line is executed to restart the container in the faulty state; when the startup of the container in the faulty state is completed, a third judgment result is obtained to determine whether the running data of the application service carried by the container in the faulty state meets the corresponding application service running data; if the third judgment result is no, the application service restart command line is executed to restart the application service carried by the container in the faulty state.

9. An electronic device, characterized in that: include: Memory and processor; The memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program to implement the steps in the method according to any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to implement the steps in the method according to any one of claims 1 to 8.

11. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the processor is enabled to implement the steps in any one of the methods of claims 1-8.