[go: up one dir, main page]

WO2016201620A1 - Process replacement method and device - Google Patents

Process replacement method and device Download PDF

Info

Publication number
WO2016201620A1
WO2016201620A1 PCT/CN2015/081547 CN2015081547W WO2016201620A1 WO 2016201620 A1 WO2016201620 A1 WO 2016201620A1 CN 2015081547 W CN2015081547 W CN 2015081547W WO 2016201620 A1 WO2016201620 A1 WO 2016201620A1
Authority
WO
WIPO (PCT)
Prior art keywords
shadow
child
module
preset
dynamic library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2015/081547
Other languages
French (fr)
Chinese (zh)
Inventor
侯玉柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201580031040.5A priority Critical patent/CN106462455B/en
Priority to PCT/CN2015/081547 priority patent/WO2016201620A1/en
Publication of WO2016201620A1 publication Critical patent/WO2016201620A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to the field of data processing, and more particularly to a method and apparatus for process replacement.
  • processes are the smallest granularity of software capability units deployed on the operating system.
  • the process becomes the smallest unit of software capability failure, and the specified process exits abnormally, which inevitably causes the software capability carried by the process to disappear, and finally becomes a software service failure.
  • the failure of the software system is very important.
  • the fault-tolerance efficiency of a software system often depends on the fault-tolerance efficiency of its key software capability process, and the critical process failure of the software system is generally difficult to pass through simple user data migration due to various business scenario constraints. solved.
  • the main method is to deploy the same 1+1 dual process.
  • the main process runs normally.
  • the backup process occupies the same system resources for standby.
  • the backup process takes over the main process to continue processing the service; when the backup process also fails, the entire device service is interrupted.
  • the embodiment of the invention provides a method and a device for process replacement, which are used for processing the fast replacement of a fault process without additionally occupying excessive system memory resources and task scheduling resources.
  • a first aspect of the embodiments of the present invention provides a method for process replacement, including:
  • the parent process creates a shadow process for the child process, and the shadow process is used to replace the child process when the child process fails;
  • the shadow process processes the preset part of the process and sleeps waiting Wake-up, the preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the replacement process is to replace all the initialization processes of the sub-process;
  • the parent process monitors that the child process is faulty, the parent process reclaims the child process and wakes up the shadow process;
  • the shadow process processes an initialization process in the succession process except the preset part process, and the shadow process is upgraded to the child process.
  • the step of upgrading the shadow process to the sub-process further includes:
  • the method further includes:
  • the shadow process loads the executable and linkable format ELF file, and loads the preset partial dynamic library according to the description of the ELF file, where the preset part dynamic library is a part of the dynamic library pre-specified in the replacement dynamic library, Replacing the dynamic library to replace all dynamic libraries that need to be loaded by the child process;
  • the process of processing the preset part of the shadow process specifically includes:
  • the shadow process executes a pre-processing function in the preset partial dynamic library, and processes the preset part process
  • the step of the shadow process processing the initialization process except the preset part process in the succession process further includes:
  • the shadow process loads the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file;
  • the process of the initialization process in the process of processing the replacement process except the preset part process specifically includes:
  • the shadow process executes the function other than the pre-processing function in the replacement dynamic library, and processes an initialization process in the succession process except the preset partial process.
  • a second aspect of the embodiments of the present invention provides a device for replacing a process, including:
  • the parent process module includes:
  • a child process creation unit configured to create the child process module
  • a shadow process creation unit configured to create the shadow process module for the child process module, where the shadow process module is configured to take over the child process module when the child process module fails;
  • the shadow process module includes:
  • the dormant unit is configured to process the preset part process after the shadow process creation unit creates the shadow process module, and control the shadow process module to enter a sleep state to wait for wakeup, where the preset part process is pre-processed in the succession process. Specifying a part of the initialization process that must be processed, and the succession process is to replace all initialization processes of the child process module;
  • the parent process module further includes:
  • the monitoring wakeup unit is configured to: when the fault of the child process module is monitored, recover the child process module, and wake up the shadow process module in a sleep state;
  • the shadow process module further includes:
  • the processing upgrade unit is configured to process an initialization process in the succession process except the preset part process, when the shadow process module is awake by the monitoring wake-up unit, and the shadow process module is upgraded to a sub-process module.
  • the parent process module further includes:
  • the triggering unit is configured to trigger the shadow process creation unit when monitoring that the shadow process module is upgraded to the child process module.
  • the shadow process module further includes:
  • a first loading unit configured to load an ELF file, and load a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, and the replacement dynamic
  • the library is all dynamic libraries that need to be loaded to replace the child process module;
  • the processing dormancy unit is specifically configured to: after the shadow process creation unit creates a shadow process module, execute a pre-processing function in the preset partial dynamic library loaded by the first loading unit, and process the preset part process, And controlling the shadow process module to enter a sleep state and waiting for wake-up.
  • the preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the replacement process In order to take over the entire initialization process of the sub-process module;
  • the shadow process module further includes:
  • a second loading unit configured to: when the monitoring wake-up unit wakes up the shadow process module, load the replacement dynamic library except the preset partial dynamic library loaded by the first loading unit according to the description of the ELF file ;
  • the processing upgrade unit is specifically configured to: when the shadow process module is awakened by the monitoring wake-up unit, execute another function in the succeeding dynamic library that is loaded by the second loading unit except the pre-processing function, and the processing center In the replacement process, in addition to the initialization process except the preset part process, the shadow process module is upgraded to a sub-process module.
  • a third aspect of the embodiments of the present invention provides a device for replacing a process, including:
  • the processor is configured to perform the following operations by invoking an operation instruction stored by the memory:
  • the shadow process is instructed to process a preset part of the process, and sleep is awaiting wake-up.
  • the preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, where the succession process is Replacing all initialization processes of the child process;
  • the shadow process When the shadow process is awakened, the shadow process is instructed to process an initialization process in the succession process other than the preset part process, and the shadow process is upgraded to the child process.
  • the processor further performs the following operations:
  • the processor performs the indication that the shadow process processing preset Before the operation of the partial process, the processor also performs the following operations:
  • the processor further performs the following operations before the processor performs the operation of instructing the shadow process to process an initialization process other than the preset part process in the succession process:
  • the embodiment of the present invention has the following advantages: the parent process creates a shadow process for the child process to replace the child process when the child process fails, and the shadow process only waits for the preset part process to wait for sleep. Wake-up, the preset part process is far less than all the initialization processes that need to be processed by the succeeding child process, ensuring that the shadow process only occupies very few system memory resources and task scheduling resources.
  • the parent process monitors the child process failure, the parent After the process recycles the child process, the shadow process is immediately awake. Since the shadow process has processed the partial initialization process that succeeds the child process, after being awakened, the process may be quickly upgraded to the child process by continuing to process the remaining initialization process.
  • the sub-process that takes over the fault continues to process the data, ensuring that the sub-process fails to consume the least time to handle the fault replacement, and realizes the fast processing of the fault process without excessively consuming excessive system memory resources and task scheduling resources. succeed.
  • FIG. 1 is a schematic flowchart of a method for replacing a process in an embodiment of the present invention
  • FIG. 2 is another schematic flowchart of a method for replacing a process in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a scenario of a method for process replacement in an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another scenario of a method for replacing a process in an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a device for replacing a process according to an embodiment of the present invention.
  • FIG. 6 is another schematic structural diagram of an apparatus for replacing a process in an embodiment of the present invention.
  • FIG. 7 is another schematic structural diagram of an apparatus for replacing a process in an embodiment of the present invention.
  • the embodiment of the invention provides a method and device for process replacement, which is used for processing the fast replacement of a fault process without additionally occupying excessive operating system memory resources and task scheduling resources.
  • the operating system to which the present invention is applied may be a highly reliable communication software system (embedded system) or an internet software system, such as a Linux operating system, an Android operating system, a Windows operating system, etc.
  • the operating system can be operated on the user service processing board of the communication device, the main control board, or the Internet function server, etc., which is not limited herein.
  • an embodiment of a method for process replacement in an embodiment of the present invention includes:
  • a parent process creates a shadow process for a child process, where the shadow process is used to replace the child process when the child process fails;
  • the child process is created for the parent process.
  • a shadow process is also created for the child process, and the shadow process is used to replace the child process when the child process fails.
  • the parent process can create a shadow process for all the child processes that are created, or a shadow process can be created only for the key processes in the created child process, which is not limited herein.
  • the shadow process processes the preset part process, and sleeps and waits for the wakeup.
  • the preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the replacement process is performed. In order to take over the entire initialization process of the child process;
  • the shadow process processes the preset part process in the elf loading stage, and sleeps and waits for the wakeup.
  • the preset part process is a part of the initialization process that must be processed in advance in the succession process, and the replacement process is to take over. The entire initialization process of this child process.
  • the parent process monitors that the child process is faulty, the parent process reclaims the child process and wakes up the shadow process.
  • the shadow process is in a dormant state.
  • the parent process monitors the child process failure, the parent process deactivates the child process and reclaims the child process to wake up the shadow process that takes over the child process.
  • the shadow process processes an initialization process in the succession process except the preset part process, and the shadow process is upgraded to the child process.
  • the shadow process processes the initialization process except the preset part process in the succession process, and after completing all the replacement processes, the shadow process is upgraded to the child process, and the process continues to be processed. Completed tasks.
  • the parent process creates a shadow process for the child process to replace the child process when the child process fails.
  • the shadow process only processes the preset part process and sleeps and waits for wakeup.
  • the preset part process is much less than the replacement process. All initialization processes that the child process needs to process ensure that the shadow process occupies only a small amount of system memory resources and task scheduling resources.
  • the parent process monitors the child process failure, the parent process immediately wakes up the shadow process after the child process recycles the child process.
  • the process because the shadow process has processed the partial initialization process that takes over the child process, after being woken up, it is only necessary to continue processing the remaining initialization process to quickly upgrade to the child process, and the succeeding child process continues to perform data processing. It ensures that the child process consumes the least time to handle the fault replacement, and realizes the rapid replacement of the fault process without excessively occupying too much system memory resources and task scheduling resources.
  • the shadow process is upgraded to a child process.
  • the parent process can also create a shadow process for the child process.
  • the replacement process is processed.
  • the ELF file and the dynamic library may be loaded first. The following describes the method of the process in the embodiment of the present invention. Referring to FIG. 2, another embodiment of the method for replacing the process in the embodiment of the present invention includes:
  • the parent process creates a shadow process for the child process, where the shadow process is used to replace the child process when the child process fails;
  • the child process is created by the parent process or by the shadow of the child process being recycled.
  • the process is upgraded.
  • the parent process creates a shadow process for the child process, and the shadow process is used to replace the child process when the child process fails.
  • the parent process can create a shadow process for all the child processes that are created, or a shadow process can be created only for the key processes in the created child process, which is not limited herein.
  • the sub-process fault is reclaimed, and after the shadow process is upgraded to the sub-process, the parent process creates a shadow process for the sub-process, thus forming a fault cycle replacement technology of the sub-process and the shadow process, and the fault scene loop can be achieved. Processing, even if the upgraded child process fails again, there will be a new shadow process to take over, which will not cause the entire device business to be interrupted, ensuring the stable and continuous operation of the entire device.
  • the shadow process loads an ELF file, and loads a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a pre-specified part of the replacement dynamic library.
  • the replacement dynamic library is to replace all dynamic libraries that need to be loaded by the child process;
  • an Executable and Linking Format (ELF) file is loaded, and the file describes a dynamic library that needs to be dependent, and the shadow process follows the description of the ELF file.
  • the dynamic library is loaded, and the dynamic library stores the process that the shadow process needs to execute to replace the child process, and the process can be stored as a function.
  • the dynamic process described in the ELF file can be referred to as a replacement dynamic library, and the dynamic library can be divided into multiple parts, and a part of the dynamic inventory storage must be pre-executed. Call this part of the dynamic library that must be preloaded as a preset part of the dynamic library.
  • the ELF file and the dynamic library may have a code segment, a data segment and a BSS segment, which are not limited herein.
  • the shadow process executes a pre-processing function in the preset part dynamic library, processes a preset part process, and sleeps to wait for wake-up.
  • the preset part process is a part of an initialization process that must be specified in advance in the succession process.
  • the succession process is to replace all initialization processes of the child process;
  • the preprocessing function in the preset partial dynamic library can be processed, and the pre-processing function is processed according to the pre-processing function. It can be understood that the shadow process takes over the sub-process. All initialization processes that need to be completed are called replacement processes, where A part of the initialization process that must be processed is called a preset part process, and after the shadow process executes the preset part process, sleep waits for wake-up.
  • the parent process monitors that the child process is faulty, the parent process reclaims the child process and wakes up the shadow process.
  • the shadow process is in a dormant state.
  • the parent process monitors the child process failure, the parent process deactivates the child process and reclaims the child process to wake up the shadow process that takes over the child process.
  • the shadow process loads the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file.
  • the shadow process has loaded the preset partial dynamic library described in the ELF file, and the ELF file also describes that the shadow process is replaced by the rest of the dynamic library that needs to be relied upon in the process of replacing the child process. After that, the shadow process loads the replacement dynamic library outside the preset partial dynamic library according to the description of the ELF file.
  • the shadow process executes another function in the succeeding dynamic library except the preprocessing function, and processes an initialization process in the succession process except the preset part process, where the shadow process is upgraded to the Child process.
  • the shadow process loads the replacement dynamic library outside the preset dynamic library, executing the function other than the preprocessing function in the replacement dynamic library, and processing the initialization process except the preset part process in the replacement process, and completing After all the replacement processes, the shadow process is upgraded to the child process, and the task that is not completed by the child process continues to be processed.
  • step 201 can be performed, and the parent process creates a shadow process for the child process, forming a fault cycle replacement technology of the child process and the shadow process, and ensuring all the child processes or key children. Processes always have a corresponding shadow process.
  • the shadow process in the ELF loading phase, first loads the preset partial dynamic library according to the description of the ELF file, executes the preset partial preprocessing function, processes the preset partial process, sleeps and waits for wakeup, and wakes up to continue.
  • the remaining relay dynamic library is loaded, the remaining functions are executed, and the remaining initialization processes are processed, which ensures that the shadow process only occupies very little system memory resources and task scheduling resources, and can quickly be used when the child process fails.
  • the completion takes over the loading of the dynamic library, and takes over the child process to upgrade to a new child process.
  • the parent process can also create a shadow process for the child process, thus forming a child process and shadow into
  • the fault cycle relay technology of the process can realize the loop processing of the fault scene. Even if the upgraded child process fails again, there will be a new shadow process to take over, which will not cause the entire equipment business to be interrupted, and the stability of the whole device is guaranteed. Keep running.
  • the operating system starts, the parent process 301 creates a child process 302;
  • the parent process 301 creates a shadow process 303 for the child process 302, and the shadow process completes the preset part process and sleeps to wait for wakeup;
  • the parent process 301 monitors the child process 302, recovers the child process 301, and wakes up the shadow process 302.
  • the shadow process 302 completes the subsequent initialization process and takes over the
  • the child process 301 is upgraded to a new child process 401, and at the same time, the parent process 301 creates a shadow process 402 for the upgraded child process 401.
  • an embodiment of the device in the embodiment of the present invention includes:
  • a parent process module 501 a child process module 502 and a shadow process module 503;
  • the parent process module 501 includes:
  • a child process creation unit 5011 configured to create the child process module 502
  • a shadow process creation unit 5012 configured to create the shadow process module 503 for the child process module 502, the shadow process module 503 is used to replace the child process module 502 when the child process module 502 fails;
  • the shadow process module 503 includes:
  • the dormant unit 5031 is configured to process the preset part process after the shadow process creation unit 5012 creates the shadow process module 503, and control the shadow process module 503 to enter a sleep state and wait for wakeup, where the preset part process is A part of the initialization process that must be processed in advance is specified in the succession process, and the replacement process is to replace all initialization processes of the child process module;
  • the parent process module 501 further includes:
  • the monitoring wakeup unit 5013 is configured to: when the subprocess module 502 is detected to be faulty, recover the subprocess module 502, and wake up the shadow process module 503 in a sleep state;
  • the shadow process module 503 further includes:
  • the processing upgrade unit 5032 is configured to process an initialization process in the succession process except the preset part process, when the shadow process module 503 is awake by the monitoring wakeup unit 5013, and the shadow process module 503 is upgraded to Child process module.
  • the parent process module 501 creates a shadow process module 503 for the child process module 502 to replace the child process module 502 when the child process module 502 fails.
  • the shadow process module 503 only processes the preset part process and sleeps. Waiting for waking up, the preset part process is far less than all the initialization processes that need to be processed by the sub-process module 502, ensuring that the shadow process module 503 occupies only a small amount of system memory resources and task scheduling resources, when the parent process module 501 monitors the When the child process module 502 fails, the parent process module 501 immediately waking up the shadow process module 503 after reclaiming the child process module 502.
  • the process can be quickly upgraded to the sub-process module 502 by continuing to process the remaining initialization process.
  • the sub-process module 502 that succeeds the fault continues to perform data processing, ensuring that the sub-process module 502 consumes the least time to handle the fault replacement, thereby realizing Without excessive use of excessive system memory resources and task scheduling resources Troubleshooting process quickly take over.
  • the shadow process module 503 is upgraded to the child process module 502.
  • the parent process may further create a shadow process for the child process module 502.
  • the ELF file and the dynamic library may be loaded before the processing of the replacement process. The following describes the method of the process in the embodiment of the present invention. Referring to FIG. 6, as a device in the embodiment of the present invention, the device is replaced.
  • the shadow process module 503 further includes:
  • a first loading unit 601 configured to load an ELF file, and load a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, the replacement The dynamic library is to replace all the dynamic libraries that need to be loaded by the child process module;
  • the processing sleep unit 5031 is specifically configured to: after the shadow process creation unit 5012 creates the shadow process module 503, execute a pre-processing function in the preset partial dynamic library loaded by the first loading unit 601, and process the pre-processing The partial process is controlled, and the shadow process module 503 is controlled to enter a sleep state to wait for wakeup.
  • the preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the succession process is to replace the sub-process module 502. All initialization process;
  • the shadow process module 503 further includes:
  • the second loading unit 602 is configured to: when the monitoring wakeup unit 5013 wakes up the shadow process module 503, load the preset part of the dynamic library loaded by the first loading unit 601 according to the description of the ELF file. Replacing the dynamic library;
  • the processing upgrade unit 5032 is specifically configured to: when the shadow process module 503 is awakened by the monitoring wakeup unit 5013, execute the other dynamic processing library loaded by the second loading unit 602 except the preprocessing function. a function, processing an initialization process in the succession process except the preset part process, where the shadow process module 503 is upgraded to a sub-process module;
  • the parent process module 501 may further include:
  • the triggering unit 603 is configured to trigger the shadow process creating unit 5012 when the shadow process module 503 is upgraded to the child process module.
  • the first loading unit 5033 first loads the preset partial dynamic library according to the description of the ELF file, and the processing sleep unit 5031 executes the preset partial preprocessing function, and processes the preset partial process to sleep. Waiting for wake-up, after being woken up, the second loading unit 5034 continues to load the remaining relay dynamic libraries according to the description of the ELF file, and the processing upgrade unit 5032 executes the remaining functions and processes the remaining initialization processes, ensuring that the shadow process module 503 occupies only a small amount.
  • the system memory resource and the task scheduling resource can quickly complete the loading of the dynamic library when the child process module 502 fails, and replace the child process module 502 to become the new child process module 502.
  • the triggering unit 5014 triggers the parent process module 501 to create a shadow process module 503 for the child process module 502, thus forming a fault of the child process module 502 and the shadow process module 503.
  • the loop-replacement technology can perform the loop processing of the fault scenario. Even if the upgraded sub-process module 502 fails again, a new shadow process module 503 will be replaced to replace it, which will not cause the entire device to be interrupted, thereby ensuring the entire device. Stable and continuous operation.
  • FIG. 7 another embodiment of the apparatus 700 for process replacement in the embodiment of the present invention includes:
  • processor 701 and a memory 702;
  • the processor 701 is configured to perform the following operations by calling an operation instruction stored in the memory 702:
  • the shadow process is instructed to process a preset part of the process, and sleep is awaiting wake-up.
  • the preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, where the succession process is Replacing all initialization processes of the child process;
  • the shadow process When the shadow process is awakened, the shadow process is instructed to process an initialization process in the succession process other than the preset part process, and the shadow process is upgraded to the child process.
  • the processor 701 further performs the following operations:
  • the processor 701 before the processor 701 performs the operation of indicating the process of the preset process of the shadow process, the processor 701 further performs the following operations:
  • the processor 701 When the processor 701 performs the operation of indicating the process of the preset process of the shadow process, the processor 701 performs the following operations:
  • the processor 701 further performs the following operations before the processor 701 performs the operation of instructing the shadow process to process an initialization process other than the preset part process in the succession process:
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Hardware Redundancy (AREA)

Abstract

An embodiment of the invention discloses a process replacement method and device for realizing quick replacement of a faulty process without occupying excessive system memory resources and task scheduling resources. An embodiment of the present invention method comprises: a parent process creates a shadow child process for a child process; after the shadow child process is created, the shadow child process processes a preset part of a procedure and then sleeps and waits to be awakened. When the parent process detects that the child process has a fault, the parent process recalls the child process, and wakes the shadow child process; after waking, the shadow child process replaces initialized procedures apart from the preset part of the procedure, and the shadow child process is upgraded to the child process.

Description

进程接替的方法和装置Method and device for process replacement 技术领域Technical field

本发明涉及数据处理领域,尤其涉及进程接替的方法和装置。The present invention relates to the field of data processing, and more particularly to a method and apparatus for process replacement.

背景技术Background technique

无论是通信软件还是互联网软件,如何能够在系统故障情况下快速恢复业务,这是每个公司和开发人员永久面对的课题。Whether it is communication software or Internet software, how to quickly recover business in the event of a system failure is a permanent problem for every company and developer.

在各种操作系统中,进程是作为部署在操作系统上的最小粒度的软件能力单元。当然进程也就成为最小的软件能力故障单位,指定的进程异常退出,必然会使得由该进程承载的软件能力的消失,最终体现为软件业务故障。为了在软件业务故障后,软件还能继续正常运行,软件系统的故障接替效率很重要。而一个软件系统的故障接替效率,往往依赖于其关键软件能力进程的故障接替效率,且软件系统的关键进程故障一般情况下由于各种业务场景的约束,是很难通过简单的用户数据迁移来解决的。In various operating systems, processes are the smallest granularity of software capability units deployed on the operating system. Of course, the process becomes the smallest unit of software capability failure, and the specified process exits abnormally, which inevitably causes the software capability carried by the process to disappear, and finally becomes a software service failure. In order to continue the normal operation of the software after the software business failure, the failure of the software system is very important. The fault-tolerance efficiency of a software system often depends on the fault-tolerance efficiency of its key software capability process, and the critical process failure of the software system is generally difficult to pass through simple user data migration due to various business scenario constraints. solved.

目前,主要采用的方法为部署完全相同的1+1双进程,主进程正常运行,备份进程占用相同的系统资源进行备用(standby)。当主进程故障时,由备份进程接替主进程继续处理业务;当备份进程也出现故障时,整个设备业务中断。Currently, the main method is to deploy the same 1+1 dual process. The main process runs normally. The backup process occupies the same system resources for standby. When the main process fails, the backup process takes over the main process to continue processing the service; when the backup process also fails, the entire device service is interrupted.

在实际应用中,由于额外的增加占用相同系统资源的备份进程,增大了系统的内存开销和任务调度开销,从而降低了软件承载用户数据能力和处理能力。In practical applications, the additional backup process that occupies the same system resources increases the memory overhead and task scheduling overhead of the system, thereby reducing the software carrying user data capacity and processing capability.

发明内容Summary of the invention

本发明实施例提供了进程接替的方法和装置,用于在不额外占用过多的系统内存资源和任务调度资源的情况下,处理故障进程的快速接替。The embodiment of the invention provides a method and a device for process replacement, which are used for processing the fast replacement of a fault process without additionally occupying excessive system memory resources and task scheduling resources.

本发明实施例第一方面提供了一种进程接替的方法,包括:A first aspect of the embodiments of the present invention provides a method for process replacement, including:

父进程为子进程创建影子进程,所述影子进程用于在所述子进程故障时接替所述子进程;The parent process creates a shadow process for the child process, and the shadow process is used to replace the child process when the child process fails;

当所述影子进程被创建后,所述影子进程处理预置部分流程,并休眠等待 唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程的全部初始化流程;After the shadow process is created, the shadow process processes the preset part of the process and sleeps waiting Wake-up, the preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the replacement process is to replace all the initialization processes of the sub-process;

当所述父进程监控到所述子进程故障时,所述父进程回收所述子进程,并唤醒所述影子进程;When the parent process monitors that the child process is faulty, the parent process reclaims the child process and wakes up the shadow process;

当所述影子进程被唤醒后,所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程升级为所述子进程。After the shadow process is awakened, the shadow process processes an initialization process in the succession process except the preset part process, and the shadow process is upgraded to the child process.

结合本发明实施例的第一方面,本发明实施例第一方面的第一种实现方式中,所述影子进程升级为所述子进程的步骤之后还包括:With reference to the first aspect of the embodiments of the present invention, in the first implementation manner of the first aspect of the embodiment, the step of upgrading the shadow process to the sub-process further includes:

当所述父进程监控到所述影子进程升级到所述子进程时,触发所述父进程为子进程创建影子进程的步骤。When the parent process monitors that the shadow process is upgraded to the child process, triggering the parent process to create a shadow process for the child process.

结合本发明实施例的第一方面或第一方面的第一种实现方式,本发明实施例第一方面的第二种实现方式中,所述父进程为子进程创建影子进程的步骤之后,所述影子进程处理预置部分流程的步骤之前还包括:With reference to the first aspect of the embodiment of the present invention or the first implementation manner of the first aspect, in the second implementation manner of the first aspect of the embodiment of the present disclosure, after the parent process creates a shadow process for the child process, Before the steps of the shadow process processing the preset part process, the method further includes:

所述影子进程加载可执行与可链接格式ELF文件,按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程需要加载的全部动态库;The shadow process loads the executable and linkable format ELF file, and loads the preset partial dynamic library according to the description of the ELF file, where the preset part dynamic library is a part of the dynamic library pre-specified in the replacement dynamic library, Replacing the dynamic library to replace all dynamic libraries that need to be loaded by the child process;

所述影子进程处理预置部分流程具体包括:The process of processing the preset part of the shadow process specifically includes:

所述影子进程执行所述预置部分动态库中的预处理函数,处理所述预置部分流程;The shadow process executes a pre-processing function in the preset partial dynamic library, and processes the preset part process;

所述唤醒所述影子进程的步骤之后,所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的步骤之前还包括:After the step of waking up the shadow process, the step of the shadow process processing the initialization process except the preset part process in the succession process further includes:

所述影子进程按照所述ELF文件的描述加载除所述预置部分动态库外的所述接替动态库;The shadow process loads the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file;

所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程具体包括:The process of the initialization process in the process of processing the replacement process except the preset part process specifically includes:

所述影子进程执行所述接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程。The shadow process executes the function other than the pre-processing function in the replacement dynamic library, and processes an initialization process in the succession process except the preset partial process.

本发明实施例第二方面提供了一种进程接替的装置,包括:A second aspect of the embodiments of the present invention provides a device for replacing a process, including:

父进程模块,子进程模块和影子进程模块; a parent process module, a child process module, and a shadow process module;

所述父进程模块包括:The parent process module includes:

子进程创建单元,用于创建所述子进程模块;a child process creation unit, configured to create the child process module;

影子进程创建单元,用于为所述子进程模块创建所述影子进程模块,所述影子进程模块用于在所述子进程模块故障时接替所述子进程模块;a shadow process creation unit, configured to create the shadow process module for the child process module, where the shadow process module is configured to take over the child process module when the child process module fails;

所述影子进程模块包括:The shadow process module includes:

处理休眠单元,用于当所述影子进程创建单元创建影子进程模块后,处理预置部分流程,并控制所述影子进程模块进入休眠状态等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程模块的全部初始化流程;The dormant unit is configured to process the preset part process after the shadow process creation unit creates the shadow process module, and control the shadow process module to enter a sleep state to wait for wakeup, where the preset part process is pre-processed in the succession process. Specifying a part of the initialization process that must be processed, and the succession process is to replace all initialization processes of the child process module;

所述父进程模块还包括:The parent process module further includes:

监控唤醒单元,用于当监控到所述子进程模块故障时,回收所述子进程模块,并唤醒处于休眠状态的影子进程模块;The monitoring wakeup unit is configured to: when the fault of the child process module is monitored, recover the child process module, and wake up the shadow process module in a sleep state;

所述影子进程模块还包括:The shadow process module further includes:

处理升级单元,用于当所述影子进程模块被所述监控唤醒单元唤醒时,处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程模块升级为子进程模块。The processing upgrade unit is configured to process an initialization process in the succession process except the preset part process, when the shadow process module is awake by the monitoring wake-up unit, and the shadow process module is upgraded to a sub-process module.

结合本发明实施例的第二方面,本发明实施例第二方面的第一种实现方式中,所述父进程模块还包括:With reference to the second aspect of the embodiments of the present invention, in the first implementation manner of the second aspect of the embodiment, the parent process module further includes:

触发单元,用于当监控到所述影子进程模块升级到所述子进程模块时,触发所述影子进程创建单元。The triggering unit is configured to trigger the shadow process creation unit when monitoring that the shadow process module is upgraded to the child process module.

结合本发明实施例的第二方面或第二方面的第一种实现方式,本发明实施例第二方面的第二种实现方式中,所述影子进程模块还包括:With reference to the second aspect of the embodiment of the present invention or the first implementation manner of the second aspect, in the second implementation manner of the second aspect of the embodiment, the shadow process module further includes:

第一加载单元,用于加载ELF文件,并按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程模块需要加载的全部动态库;a first loading unit, configured to load an ELF file, and load a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, and the replacement dynamic The library is all dynamic libraries that need to be loaded to replace the child process module;

所述处理休眠单元具体用于,当所述影子进程创建单元创建影子进程模块后,执行所述第一加载单元加载的预置部分动态库中的预处理函数,处理所述预置部分流程,并控制所述影子进程模块进入休眠状态等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程 为接替所述子进程模块的全部初始化流程;The processing dormancy unit is specifically configured to: after the shadow process creation unit creates a shadow process module, execute a pre-processing function in the preset partial dynamic library loaded by the first loading unit, and process the preset part process, And controlling the shadow process module to enter a sleep state and waiting for wake-up. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the replacement process In order to take over the entire initialization process of the sub-process module;

所述影子进程模块还包括:The shadow process module further includes:

第二加载单元,用于当所述监控唤醒单元唤醒所述影子进程模块时,按照所述ELF文件的描述加载除所述第一加载单元加载的预置部分动态库外的所述接替动态库;a second loading unit, configured to: when the monitoring wake-up unit wakes up the shadow process module, load the replacement dynamic library except the preset partial dynamic library loaded by the first loading unit according to the description of the ELF file ;

所述处理升级单元具体用于,当所述影子进程模块被所述监控唤醒单元唤醒时,执行所述第二加载单元加载的接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程模块升级为子进程模块。The processing upgrade unit is specifically configured to: when the shadow process module is awakened by the monitoring wake-up unit, execute another function in the succeeding dynamic library that is loaded by the second loading unit except the pre-processing function, and the processing center In the replacement process, in addition to the initialization process except the preset part process, the shadow process module is upgraded to a sub-process module.

本发明实施例第三方面提供了一种进程接替的装置,包括:A third aspect of the embodiments of the present invention provides a device for replacing a process, including:

处理器和存储器;Processor and memory;

通过调用所述存储器存储的操作指令,所述处理器用于执行如下操作:The processor is configured to perform the following operations by invoking an operation instruction stored by the memory:

指示父进程创建子进程;Instruct the parent process to create a child process;

指示所述父进程为所述子进程创建影子进程,所述影子进程用于在所述子进程故障时接替所述子进程;Instructing the parent process to create a shadow process for the child process, the shadow process being used to replace the child process when the child process fails;

当所述影子进程被创建后,指示所述影子进程处理预置部分流程,并休眠等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程的全部初始化流程;After the shadow process is created, the shadow process is instructed to process a preset part of the process, and sleep is awaiting wake-up. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, where the succession process is Replacing all initialization processes of the child process;

当所述父进程监控到所述子进程故障时,指示操作系统内核回收所述子进程,并唤醒所述影子进程;When the parent process monitors the child process failure, instructing the operating system kernel to reclaim the child process and waking up the shadow process;

当所述影子进程被唤醒时,指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程升级为所述子进程。When the shadow process is awakened, the shadow process is instructed to process an initialization process in the succession process other than the preset part process, and the shadow process is upgraded to the child process.

结合本发明实施例的第三方面,本发明实施例第三方面的第一种实现方式中,所述处理器还执行如下操作:With reference to the third aspect of the embodiments of the present invention, in a first implementation manner of the third aspect of the embodiments, the processor further performs the following operations:

当所述父进程监控到所述影子进程升级到所述子进程时,触发所述指示所述父进程为所述子进程创建所述影子进程的操作。When the parent process monitors that the shadow process is upgraded to the child process, triggering the operation that indicates that the parent process creates the shadow process for the child process.

结合本发明实施例的第三方面或第三方面的第一种实现方式,本发明实施例第三方面的第二种实现方式中,所述处理器执行所述指示所述影子进程处理预置部分流程的操作之前,所述处理器还执行如下操作: With reference to the third aspect of the embodiment of the present invention or the first implementation manner of the third aspect, in a second implementation manner of the third aspect of the embodiments, the processor performs the indication that the shadow process processing preset Before the operation of the partial process, the processor also performs the following operations:

指示所述影子进程加载ELF文件,并按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程需要加载的全部动态库;Instructing the shadow process to load an ELF file, and loading a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, and the replacement dynamic library is Replacing all the dynamic libraries that the child process needs to load;

所述处理器执行所述指示所述影子进程处理预置部分流程的操作时,具体执行如下操作:When the processor performs the operation indicating that the shadow process processes the preset part of the process, the following operations are specifically performed:

指示所述影子进程执行加载的所述预置部分动态库中的预处理函数,处理所述预置部分流程;Instructing the shadow process to execute a pre-processing function in the preset partial dynamic library that is loaded, and processing the preset part process;

所述处理器执行所述指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的操作之前,所述处理器还执行如下操作:The processor further performs the following operations before the processor performs the operation of instructing the shadow process to process an initialization process other than the preset part process in the succession process:

指示所述影子进程按照所述ELF文件的描述加载除所述预置部分动态库外的所述接替动态库;Instructing the shadow process to load the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file;

所述处理器执行所述指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的操作时,具体执行如下操作:When the processor performs the operation of instructing the shadow process to process the initialization process except the preset part process in the succession process, the following operations are specifically performed:

指示所述影子进程执行加载的所述接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程。Instructing the shadow process to perform loading of the successor dynamic library other than the preprocessing function, and processing an initialization process in the succession process other than the preset part process.

从以上技术方案可以看出,本发明实施例具有以下优点:父进程为子进程创建用于在该子进程故障时接替该子进程的影子进程,该影子进程只处理预置部分流程就休眠等待唤醒,该预置部分流程远少于接替子进程需要处理的全部初始化流程,保证了影子进程只占用极少的系统内存资源和任务调度资源,当父进程监控到该子进程故障时,该父进程回收该子进程后,立即唤醒该影子进程,由于该影子进程已经处理了接替该子进程的部分初始化流程,因此,被唤醒后,只需继续处理剩余初始化流程即可快速升级为该子进程,接替故障的子进程继续进行数据处理,保证了子进程故障时消耗最少的时间处理故障接替,实现了在不额外占用过多的系统内存资源和任务调度资源的情况下,处理故障进程的快速接替。As can be seen from the above technical solution, the embodiment of the present invention has the following advantages: the parent process creates a shadow process for the child process to replace the child process when the child process fails, and the shadow process only waits for the preset part process to wait for sleep. Wake-up, the preset part process is far less than all the initialization processes that need to be processed by the succeeding child process, ensuring that the shadow process only occupies very few system memory resources and task scheduling resources. When the parent process monitors the child process failure, the parent After the process recycles the child process, the shadow process is immediately awake. Since the shadow process has processed the partial initialization process that succeeds the child process, after being awakened, the process may be quickly upgraded to the child process by continuing to process the remaining initialization process. The sub-process that takes over the fault continues to process the data, ensuring that the sub-process fails to consume the least time to handle the fault replacement, and realizes the fast processing of the fault process without excessively consuming excessive system memory resources and task scheduling resources. succeed.

附图说明DRAWINGS

图1为本发明实施例中进程接替的方法一个流程示意图;1 is a schematic flowchart of a method for replacing a process in an embodiment of the present invention;

图2为本发明实施例中进程接替的方法另一个流程示意图; 2 is another schematic flowchart of a method for replacing a process in an embodiment of the present invention;

图3为本发明实施例中进程接替的方法一个场景示意图;3 is a schematic diagram of a scenario of a method for process replacement in an embodiment of the present invention;

图4为本发明实施例中进程接替的方法另一个场景示意图;4 is a schematic diagram of another scenario of a method for replacing a process in an embodiment of the present invention;

图5为本发明实施例中进程接替的装置一个结构示意图;FIG. 5 is a schematic structural diagram of a device for replacing a process according to an embodiment of the present invention; FIG.

图6为本发明实施例中进程接替的装置另一个结构示意图;6 is another schematic structural diagram of an apparatus for replacing a process in an embodiment of the present invention;

图7为本发明实施例中进程接替的装置另一个结构示意图。FIG. 7 is another schematic structural diagram of an apparatus for replacing a process in an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.

本发明实施例提供了一种进程接替的方法和装置,用于在不额外占用过多的操作系统内存资源和任务调度资源的情况下,处理故障进程的快速接替。The embodiment of the invention provides a method and device for process replacement, which is used for processing the fast replacement of a fault process without additionally occupying excessive operating system memory resources and task scheduling resources.

需要说明的是,本发明应用的操作系统,既可以为可靠性高的通信软件系统(嵌入式系统),也可以为互联网软件系统,例如Linux操作系统、Android操作系统、Windows操作系统等,此处不作限定,该操作系统可以运行于通信设备的用户业务处理单板,主控单板,也可以运行于互联网功能服务器等,此处不作限定。It should be noted that the operating system to which the present invention is applied may be a highly reliable communication software system (embedded system) or an internet software system, such as a Linux operating system, an Android operating system, a Windows operating system, etc. The operating system can be operated on the user service processing board of the communication device, the main control board, or the Internet function server, etc., which is not limited herein.

请参阅图1,本发明实施例中进程接替的方法一个实施例包括:Referring to FIG. 1, an embodiment of a method for process replacement in an embodiment of the present invention includes:

101、父进程为子进程创建影子进程,所述影子进程用于在所述子进程故障时接替所述子进程;101. A parent process creates a shadow process for a child process, where the shadow process is used to replace the child process when the child process fails;

可以理解的是,该子进程为该父进程所创建。本步骤中,父进程创建子进程后,还为该子进程创建影子进程,该影子进程用于在该子进程故障时接替该子进程。It can be understood that the child process is created for the parent process. In this step, after the parent process creates the child process, a shadow process is also created for the child process, and the shadow process is used to replace the child process when the child process fails.

可以理解的是,父进程可以为创建的所有子进程创建影子进程,也可以只为创建的子进程中的关键进程创建影子进程,此处不作限定。It can be understood that the parent process can create a shadow process for all the child processes that are created, or a shadow process can be created only for the key processes in the created child process, which is not limited herein.

102、当所述影子进程被创建后,所述影子进程处理预置部分流程,并休眠等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程的全部初始化流程; After the shadow process is created, the shadow process processes the preset part process, and sleeps and waits for the wakeup. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the replacement process is performed. In order to take over the entire initialization process of the child process;

父进程创建影子进程后,该影子进程在elf加载阶段,处理预置部分流程,并休眠等待唤醒,该预置部分流程为在接替流程中预先制定必须处理的一部分初始化流程,该接替流程为接替该子进程的全部初始化流程。After the parent process creates the shadow process, the shadow process processes the preset part process in the elf loading stage, and sleeps and waits for the wakeup. The preset part process is a part of the initialization process that must be processed in advance in the succession process, and the replacement process is to take over. The entire initialization process of this child process.

103、当所述父进程监控到所述子进程故障时,所述父进程回收所述子进程,并唤醒所述影子进程;103. When the parent process monitors that the child process is faulty, the parent process reclaims the child process and wakes up the shadow process.

本步骤中,影子进程处于休眠状态,当该父进程监控到该子进程故障时,该父进程去活该子进程,并回收该子进程,唤醒接替该子进程的影子进程。In this step, the shadow process is in a dormant state. When the parent process monitors the child process failure, the parent process deactivates the child process and reclaims the child process to wake up the shadow process that takes over the child process.

104、当所述影子进程被唤醒后,所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程升级为所述子进程。After the shadow process is awakened, the shadow process processes an initialization process in the succession process except the preset part process, and the shadow process is upgraded to the child process.

当该影子进程被唤醒后,该影子进程处理该接替流程中除该预置部分流程外的初始化流程,完成全部的接替流程后,该影子进程即升级为了该子进程,继续处理该子进程未完成的任务。After the shadow process is awakened, the shadow process processes the initialization process except the preset part process in the succession process, and after completing all the replacement processes, the shadow process is upgraded to the child process, and the process continues to be processed. Completed tasks.

本发明实施例中父进程为子进程创建用于在该子进程故障时接替该子进程的影子进程,该影子进程只处理预置部分流程就休眠等待唤醒,该预置部分流程远少于接替子进程需要处理的全部初始化流程,保证了影子进程只占用极少的系统内存资源和任务调度资源,当父进程监控到该子进程故障时,该父进程回收该子进程后,立即唤醒该影子进程,由于该影子进程已经处理了接替该子进程的部分初始化流程,因此,被唤醒后,只需继续处理剩余初始化流程即可快速升级为该子进程,接替故障的子进程继续进行数据处理,保证了子进程故障时消耗最少的时间处理故障接替,实现了在不额外占用过多的系统内存资源和任务调度资源的情况下,处理故障进程的快速接替。In the embodiment of the present invention, the parent process creates a shadow process for the child process to replace the child process when the child process fails. The shadow process only processes the preset part process and sleeps and waits for wakeup. The preset part process is much less than the replacement process. All initialization processes that the child process needs to process ensure that the shadow process occupies only a small amount of system memory resources and task scheduling resources. When the parent process monitors the child process failure, the parent process immediately wakes up the shadow process after the child process recycles the child process. The process, because the shadow process has processed the partial initialization process that takes over the child process, after being woken up, it is only necessary to continue processing the remaining initialization process to quickly upgrade to the child process, and the succeeding child process continues to perform data processing. It ensures that the child process consumes the least time to handle the fault replacement, and realizes the rapid replacement of the fault process without excessively occupying too much system memory resources and task scheduling resources.

上面实施例中,影子进程升级为子进程,在实际应用中,影子进程升级为子进程之后,父进程还可以再为子进程创建一个影子进程,进一步的,在实际应用中,处理接替流程前可以先加载ELF文件和动态库,下面对本发明实施例中的进程接替的方法进行具体描述,请参阅图2,本发明实施例中进程接替的方法另一个实施例包括:In the above embodiment, the shadow process is upgraded to a child process. In the actual application, after the shadow process is upgraded to the child process, the parent process can also create a shadow process for the child process. Further, in the actual application, before the replacement process is processed. The ELF file and the dynamic library may be loaded first. The following describes the method of the process in the embodiment of the present invention. Referring to FIG. 2, another embodiment of the method for replacing the process in the embodiment of the present invention includes:

201、父进程为子进程创建影子进程,所述影子进程用于在所述子进程故障时接替所述子进程;201. The parent process creates a shadow process for the child process, where the shadow process is used to replace the child process when the child process fails;

需要说明的是,该子进程为该父进程所创建,或由被回收的子进程的影子 进程升级得到。本步骤中,父进程为子进程创建影子进程,该影子进程用于在该子进程故障时接替该子进程。It should be noted that the child process is created by the parent process or by the shadow of the child process being recycled. The process is upgraded. In this step, the parent process creates a shadow process for the child process, and the shadow process is used to replace the child process when the child process fails.

可以理解的是,父进程可以为创建的所有子进程创建影子进程,也可以只为创建的子进程中的关键进程创建影子进程,此处不作限定。It can be understood that the parent process can create a shadow process for all the child processes that are created, or a shadow process can be created only for the key processes in the created child process, which is not limited herein.

可以理解的是,子进程故障被回收,影子进程升级为子进程后,父进程再为该子进程创建影子进程,如此形成了子进程与影子进程的故障循环接替技术,能够做到故障场景循环处理,即使升级后的子进程再次故障,也还会有新的影子进程来接替它,不会造成整个设备业务中断,保障了整个设备的稳定持续运行。It can be understood that the sub-process fault is reclaimed, and after the shadow process is upgraded to the sub-process, the parent process creates a shadow process for the sub-process, thus forming a fault cycle replacement technology of the sub-process and the shadow process, and the fault scene loop can be achieved. Processing, even if the upgraded child process fails again, there will be a new shadow process to take over, which will not cause the entire device business to be interrupted, ensuring the stable and continuous operation of the entire device.

202、当所述影子进程被创建后,所述影子进程加载ELF文件,按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程需要加载的全部动态库;202. After the shadow process is created, the shadow process loads an ELF file, and loads a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a pre-specified part of the replacement dynamic library. a dynamic library, the replacement dynamic library is to replace all dynamic libraries that need to be loaded by the child process;

需要说明的是,该影子进程被创建后,会加载可执行与可链接格式(Executable and Linking Format,ELF)文件,该文件中描述有需要依赖的动态库,该影子进程按照该ELF文件的描述加载动态库,动态库中存储有该影子进程接替子进程需要执行的流程,该流程可以以函数的方式存储。可以将该ELF文件中描述的影子进程接替子进程需要依赖的全部动态库称为接替动态库,该接替动态库可以分为多个部分,指定其中一部分动态库存储必须预先执行的初始化流程,可以称这部分必须预先加载的动态库为预置部分动态库。It should be noted that after the shadow process is created, an Executable and Linking Format (ELF) file is loaded, and the file describes a dynamic library that needs to be dependent, and the shadow process follows the description of the ELF file. The dynamic library is loaded, and the dynamic library stores the process that the shadow process needs to execute to replace the child process, and the process can be stored as a function. The dynamic process described in the ELF file can be referred to as a replacement dynamic library, and the dynamic library can be divided into multiple parts, and a part of the dynamic inventory storage must be pre-executed. Call this part of the dynamic library that must be preloaded as a preset part of the dynamic library.

可以理解的是,在进程栈空间中,该ELF文件与动态库均可以有代码段,数据段和BSS段组成,此处不作限定。It can be understood that, in the process stack space, the ELF file and the dynamic library may have a code segment, a data segment and a BSS segment, which are not limited herein.

203、所述影子进程执行所述预置部分动态库中的预处理函数,处理预置部分流程,并休眠等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程的全部初始化流程;203. The shadow process executes a pre-processing function in the preset part dynamic library, processes a preset part process, and sleeps to wait for wake-up. The preset part process is a part of an initialization process that must be specified in advance in the succession process. The succession process is to replace all initialization processes of the child process;

ELF加载阶段,影子进程加载预置部分动态库后,可以处理该预置部分动态库中的预处理函数,按照该预处理函数处理预置部分流程,可以理解的是,将影子进程接替子进程需要完成的全部初始化流程称为接替流程,其中预先指 定必须处理的一部分初始化流程称为预置部分流程,则影子进程执行该预置部分流程后,休眠等待唤醒。In the ELF loading phase, after the shadow process loads the preset partial dynamic library, the preprocessing function in the preset partial dynamic library can be processed, and the pre-processing function is processed according to the pre-processing function. It can be understood that the shadow process takes over the sub-process. All initialization processes that need to be completed are called replacement processes, where A part of the initialization process that must be processed is called a preset part process, and after the shadow process executes the preset part process, sleep waits for wake-up.

204、当所述父进程监控到所述子进程故障时,所述父进程回收所述子进程,并唤醒所述影子进程;204. When the parent process monitors that the child process is faulty, the parent process reclaims the child process and wakes up the shadow process.

本步骤中,影子进程处于休眠状态,当该父进程监控到该子进程故障时,该父进程去活该子进程,并回收该子进程,唤醒接替该子进程的影子进程。In this step, the shadow process is in a dormant state. When the parent process monitors the child process failure, the parent process deactivates the child process and reclaims the child process to wake up the shadow process that takes over the child process.

205、当所述影子进程被唤醒后,所述影子进程按照所述ELF文件的描述加载除所述预置部分动态库外的所述接替动态库;205. After the shadow process is awakened, the shadow process loads the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file.

可以理解的是,影子进程已经加载了ELF文件中描述的预置部分动态库,该ELF文件中还描述有影子进程接替子进程过程中需要依赖的接替动态库的其余部分,则影子进程被唤醒后,该影子进程按照该ELF文件的描述加载出该预置部分动态库外的该接替动态库。It can be understood that the shadow process has loaded the preset partial dynamic library described in the ELF file, and the ELF file also describes that the shadow process is replaced by the rest of the dynamic library that needs to be relied upon in the process of replacing the child process. After that, the shadow process loads the replacement dynamic library outside the preset partial dynamic library according to the description of the ELF file.

206、所述影子进程执行所述接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程升级为所述子进程。206. The shadow process executes another function in the succeeding dynamic library except the preprocessing function, and processes an initialization process in the succession process except the preset part process, where the shadow process is upgraded to the Child process.

影子进程加载完出预置部分动态库外的接替动态库后,执行该接替动态库中除该预处理函数外的其他函数,处理该接替流程中除该预置部分流程外的初始化流程,完成全部的接替流程后,该影子进程即升级为了该子进程,继续处理该子进程未完成的任务。After the shadow process loads the replacement dynamic library outside the preset dynamic library, executing the function other than the preprocessing function in the replacement dynamic library, and processing the initialization process except the preset part process in the replacement process, and completing After all the replacement processes, the shadow process is upgraded to the child process, and the task that is not completed by the child process continues to be processed.

可以理解的是,该影子进程升级成为子进程后,可以执行步骤201,该父进程为该子进程创建影子进程,形成了子进程与影子进程的故障循环接替技术,保证所有子进程或关键子进程,始终有一个相应的影子进程。It can be understood that after the shadow process is upgraded to be a child process, step 201 can be performed, and the parent process creates a shadow process for the child process, forming a fault cycle replacement technology of the child process and the shadow process, and ensuring all the child processes or key children. Processes always have a corresponding shadow process.

本发明实施例中,在ELF加载阶段,影子进程按照ELF文件的描述先加载预置部分动态库,执行其中的预置部分预处理函数,处理预置部分流程后休眠等待唤醒,被唤醒后继续按照该ELF文件的描述加载剩余的接替动态库,执行剩余的函数并处理剩余的初始化流程,保证了影子进程只占用极少的系统内存资源和任务调度资源,同时又能够在子进程故障时快速的完成接替动态库的加载,接替子进程升级成为新的子进程。进一步的,在影子进程升级成为子进程后,父进程还可以为该子进程创建影子进程,如此形成了子进程与影子进 程的故障循环接替技术,能够做到故障场景循环处理,即使升级后的子进程再次故障,也还会有新的影子进程来接替它,不会造成整个设备业务中断,保障了整个设备的稳定持续运行。In the embodiment of the present invention, in the ELF loading phase, the shadow process first loads the preset partial dynamic library according to the description of the ELF file, executes the preset partial preprocessing function, processes the preset partial process, sleeps and waits for wakeup, and wakes up to continue. According to the description of the ELF file, the remaining relay dynamic library is loaded, the remaining functions are executed, and the remaining initialization processes are processed, which ensures that the shadow process only occupies very little system memory resources and task scheduling resources, and can quickly be used when the child process fails. The completion takes over the loading of the dynamic library, and takes over the child process to upgrade to a new child process. Further, after the shadow process is upgraded to become a child process, the parent process can also create a shadow process for the child process, thus forming a child process and shadow into The fault cycle relay technology of the process can realize the loop processing of the fault scene. Even if the upgraded child process fails again, there will be a new shadow process to take over, which will not cause the entire equipment business to be interrupted, and the stability of the whole device is guaranteed. Keep running.

为便于理解,下面以一具体应用场景对本发明实施例中进程接替的方法进行具体描述:For ease of understanding, the following describes the method of process replacement in the embodiment of the present invention in a specific application scenario:

如图3所示,操作系统启动,父进程301创建子进程302;As shown in Figure 3, the operating system starts, the parent process 301 creates a child process 302;

同时,父进程301为该子进程302创建影子进程303,该影子进程完成预置部分流程并休眠等待唤醒;At the same time, the parent process 301 creates a shadow process 303 for the child process 302, and the shadow process completes the preset part process and sleeps to wait for wakeup;

如图4所示,若该子进程301故障,父进程301监控到该子进程302故障后,回收该子进程301,并唤醒该影子进程302,该影子进程302完成后续的初始化流程并接替该子进程301,升级成为新的子进程401,同时,该父进程301为该升级的子进程401创建影子进程402。As shown in FIG. 4, if the child process 301 fails, the parent process 301 monitors the child process 302, recovers the child process 301, and wakes up the shadow process 302. The shadow process 302 completes the subsequent initialization process and takes over the The child process 301 is upgraded to a new child process 401, and at the same time, the parent process 301 creates a shadow process 402 for the upgraded child process 401.

下面对本发明实施例中进程接替的装置进程描述,请参阅图5,本发明实施例中进程接替的装置一个实施例包括:The following is a description of the process of the process in the embodiment of the present invention. Referring to FIG. 5, an embodiment of the device in the embodiment of the present invention includes:

父进程模块501,子进程模块502和影子进程模块503;a parent process module 501, a child process module 502 and a shadow process module 503;

所述父进程模块501包括:The parent process module 501 includes:

子进程创建单元5011,用于创建所述子进程模块502;a child process creation unit 5011, configured to create the child process module 502;

影子进程创建单元5012,用于为所述子进程模块502创建所述影子进程模块503,所述影子进程模块503用于在所述子进程模块502故障时接替所述子进程模块502;a shadow process creation unit 5012, configured to create the shadow process module 503 for the child process module 502, the shadow process module 503 is used to replace the child process module 502 when the child process module 502 fails;

所述影子进程模块503包括:The shadow process module 503 includes:

处理休眠单元5031,用于当所述影子进程创建单元5012创建影子进程模块503后,处理预置部分流程,并控制所述影子进程模块503进入休眠状态等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程模块的全部初始化流程;The dormant unit 5031 is configured to process the preset part process after the shadow process creation unit 5012 creates the shadow process module 503, and control the shadow process module 503 to enter a sleep state and wait for wakeup, where the preset part process is A part of the initialization process that must be processed in advance is specified in the succession process, and the replacement process is to replace all initialization processes of the child process module;

所述父进程模块501还包括:The parent process module 501 further includes:

监控唤醒单元5013,用于当监控到所述子进程模块502故障时,回收所述子进程模块502,并唤醒处于休眠状态的影子进程模块503;The monitoring wakeup unit 5013 is configured to: when the subprocess module 502 is detected to be faulty, recover the subprocess module 502, and wake up the shadow process module 503 in a sleep state;

所述影子进程模块503还包括: The shadow process module 503 further includes:

处理升级单元5032,用于当所述影子进程模块503被所述监控唤醒单元5013唤醒时,处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程模块503升级为子进程模块。The processing upgrade unit 5032 is configured to process an initialization process in the succession process except the preset part process, when the shadow process module 503 is awake by the monitoring wakeup unit 5013, and the shadow process module 503 is upgraded to Child process module.

本发明实施例中父进程模块501为子进程模块502创建用于在该子进程模块502故障时接替该子进程模块502的影子进程模块503,该影子进程模块503只处理预置部分流程就休眠等待唤醒,该预置部分流程远少于接替子进程模块502需要处理的全部初始化流程,保证了影子进程模块503只占用极少的系统内存资源和任务调度资源,当父进程模块501监控到该子进程模块502故障时,该父进程模块501回收该子进程模块502后,立即唤醒该影子进程模块503,由于该影子进程模块503已经处理了接替子进程模块502的部分初始化流程,因此,被唤醒后,只需继续处理剩余初始化流程即可快速升级为子进程模块502,接替故障的子进程模块502继续进行数据处理,保证了子进程模块502故障时消耗最少的时间处理故障接替,实现了在不额外占用过多的系统内存资源和任务调度资源的情况下,处理故障进程的快速接替。In the embodiment of the present invention, the parent process module 501 creates a shadow process module 503 for the child process module 502 to replace the child process module 502 when the child process module 502 fails. The shadow process module 503 only processes the preset part process and sleeps. Waiting for waking up, the preset part process is far less than all the initialization processes that need to be processed by the sub-process module 502, ensuring that the shadow process module 503 occupies only a small amount of system memory resources and task scheduling resources, when the parent process module 501 monitors the When the child process module 502 fails, the parent process module 501 immediately waking up the shadow process module 503 after reclaiming the child process module 502. Since the shadow process module 503 has processed the partial initialization process of the successor process module 502, After waking up, the process can be quickly upgraded to the sub-process module 502 by continuing to process the remaining initialization process. The sub-process module 502 that succeeds the fault continues to perform data processing, ensuring that the sub-process module 502 consumes the least time to handle the fault replacement, thereby realizing Without excessive use of excessive system memory resources and task scheduling resources Troubleshooting process quickly take over.

上面实施例中,影子进程模块503升级为子进程模块502,在实际应用中,影子进程模块503升级为子进程模块502之后,父进程还可以再为子进程模块502创建一个影子进程,进一步的,在实际应用中,处理接替流程前可以先加载ELF文件和动态库,下面对本发明实施例中的进程接替的方法进行具体描述,请参阅图6,作为本发明实施例中进程接替的装置另一个实施例,上述影子进程模块503还包括:In the above embodiment, the shadow process module 503 is upgraded to the child process module 502. In the actual application, after the shadow process module 503 is upgraded to the child process module 502, the parent process may further create a shadow process for the child process module 502. In an actual application, the ELF file and the dynamic library may be loaded before the processing of the replacement process. The following describes the method of the process in the embodiment of the present invention. Referring to FIG. 6, as a device in the embodiment of the present invention, the device is replaced. In one embodiment, the shadow process module 503 further includes:

第一加载单元601,用于加载ELF文件,并按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程模块需要加载的全部动态库;a first loading unit 601, configured to load an ELF file, and load a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, the replacement The dynamic library is to replace all the dynamic libraries that need to be loaded by the child process module;

所述处理休眠单元5031具体用于,当所述影子进程创建单元5012创建影子进程模块503后,执行所述第一加载单元601加载的预置部分动态库中的预处理函数,处理所述预置部分流程,并控制所述影子进程模块503进入休眠状态等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程模块502的全部初始化流程;The processing sleep unit 5031 is specifically configured to: after the shadow process creation unit 5012 creates the shadow process module 503, execute a pre-processing function in the preset partial dynamic library loaded by the first loading unit 601, and process the pre-processing The partial process is controlled, and the shadow process module 503 is controlled to enter a sleep state to wait for wakeup. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the succession process is to replace the sub-process module 502. All initialization process;

所述影子进程模块503还包括: The shadow process module 503 further includes:

第二加载单元602,用于当所述监控唤醒单元5013唤醒所述影子进程模块503时,按照所述ELF文件的描述加载除所述第一加载单元601加载的预置部分动态库外的所述接替动态库;The second loading unit 602 is configured to: when the monitoring wakeup unit 5013 wakes up the shadow process module 503, load the preset part of the dynamic library loaded by the first loading unit 601 according to the description of the ELF file. Replacing the dynamic library;

所述处理升级单元5032具体用于,当所述影子进程模块503被所述监控唤醒单元5013唤醒时,执行所述第二加载单元602加载的接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程模块503升级为子进程模块;The processing upgrade unit 5032 is specifically configured to: when the shadow process module 503 is awakened by the monitoring wakeup unit 5013, execute the other dynamic processing library loaded by the second loading unit 602 except the preprocessing function. a function, processing an initialization process in the succession process except the preset part process, where the shadow process module 503 is upgraded to a sub-process module;

可选的,该父进程模块501还可以包括:Optionally, the parent process module 501 may further include:

触发单元603,用于当监控到所述影子进程模块503升级到子进程模块时,触发所述影子进程创建单元5012。The triggering unit 603 is configured to trigger the shadow process creating unit 5012 when the shadow process module 503 is upgraded to the child process module.

本发明实施例中,在ELF加载阶段,第一加载单元5033按照ELF文件的描述先加载预置部分动态库,处理休眠单元5031执行其中的预置部分预处理函数,处理预置部分流程后休眠等待唤醒,被唤醒后第二加载单元5034继续按照该ELF文件的描述加载剩余的接替动态库,处理升级单元5032执行剩余的函数并处理剩余的初始化流程,保证了影子进程模块503只占用极少的系统内存资源和任务调度资源,同时又能够在子进程模块502故障时快速的完成接替动态库的加载,接替子进程模块502升级成为新的子进程模块502。进一步的,在影子进程模块503升级成为子进程模块502后,触发单元5014触发父进程模块501为该子进程模块502创建影子进程模块503,如此形成了子进程模块502与影子进程模块503的故障循环接替技术,能够做到故障场景循环处理,即使升级后的子进程模块502再次故障,也还会有新的影子进程模块503来接替它,不会造成整个设备业务中断,保障了整个设备的稳定持续运行。In the embodiment of the present invention, in the ELF loading phase, the first loading unit 5033 first loads the preset partial dynamic library according to the description of the ELF file, and the processing sleep unit 5031 executes the preset partial preprocessing function, and processes the preset partial process to sleep. Waiting for wake-up, after being woken up, the second loading unit 5034 continues to load the remaining relay dynamic libraries according to the description of the ELF file, and the processing upgrade unit 5032 executes the remaining functions and processes the remaining initialization processes, ensuring that the shadow process module 503 occupies only a small amount. The system memory resource and the task scheduling resource, and at the same time, can quickly complete the loading of the dynamic library when the child process module 502 fails, and replace the child process module 502 to become the new child process module 502. Further, after the shadow process module 503 is upgraded to the child process module 502, the triggering unit 5014 triggers the parent process module 501 to create a shadow process module 503 for the child process module 502, thus forming a fault of the child process module 502 and the shadow process module 503. The loop-replacement technology can perform the loop processing of the fault scenario. Even if the upgraded sub-process module 502 fails again, a new shadow process module 503 will be replaced to replace it, which will not cause the entire device to be interrupted, thereby ensuring the entire device. Stable and continuous operation.

请参阅图7,本发明实施例中进程接替的装置700另一个实施例包括:Referring to FIG. 7, another embodiment of the apparatus 700 for process replacement in the embodiment of the present invention includes:

处理器701和存储器702;a processor 701 and a memory 702;

通过调用所述存储器702存储的操作指令,所述处理器701用于执行如下操作:The processor 701 is configured to perform the following operations by calling an operation instruction stored in the memory 702:

指示父进程创建子进程;Instruct the parent process to create a child process;

指示所述父进程为所述子进程创建影子进程,所述影子进程用于在所述子进程故障时接替所述子进程; Instructing the parent process to create a shadow process for the child process, the shadow process being used to replace the child process when the child process fails;

当所述影子进程被创建后,指示所述影子进程处理预置部分流程,并休眠等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程的全部初始化流程;After the shadow process is created, the shadow process is instructed to process a preset part of the process, and sleep is awaiting wake-up. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, where the succession process is Replacing all initialization processes of the child process;

当所述父进程监控到所述子进程故障时,指示操作系统内核回收所述子进程,并唤醒所述影子进程;When the parent process monitors the child process failure, instructing the operating system kernel to reclaim the child process and waking up the shadow process;

当所述影子进程被唤醒时,指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程升级为所述子进程。When the shadow process is awakened, the shadow process is instructed to process an initialization process in the succession process other than the preset part process, and the shadow process is upgraded to the child process.

本发明的一些实施例中,所述处理器701还执行如下操作:In some embodiments of the present invention, the processor 701 further performs the following operations:

当所述父进程监控到所述影子进程升级到所述子进程时,触发所述指示所述父进程为所述子进程创建所述影子进程的操作。When the parent process monitors that the shadow process is upgraded to the child process, triggering the operation that indicates that the parent process creates the shadow process for the child process.

本发明的一些实施例中,所述处理器701执行所述指示所述影子进程处理预置部分流程的操作之前,所述处理器701还执行如下操作:In some embodiments of the present invention, before the processor 701 performs the operation of indicating the process of the preset process of the shadow process, the processor 701 further performs the following operations:

指示所述影子进程加载ELF文件,并按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程需要加载的全部动态库;Instructing the shadow process to load an ELF file, and loading a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, and the replacement dynamic library is Replacing all the dynamic libraries that the child process needs to load;

所述处理器701执行所述指示所述影子进程处理预置部分流程的操作时,具体执行如下操作:When the processor 701 performs the operation of indicating the process of the preset process of the shadow process, the processor 701 performs the following operations:

指示所述影子进程执行加载的所述预置部分动态库中的预处理函数,处理所述预置部分流程;Instructing the shadow process to execute a pre-processing function in the preset partial dynamic library that is loaded, and processing the preset part process;

所述处理器701执行所述指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的操作之前,所述处理器701还执行如下操作:The processor 701 further performs the following operations before the processor 701 performs the operation of instructing the shadow process to process an initialization process other than the preset part process in the succession process:

指示所述影子进程按照所述ELF文件的描述加载除所述预置部分动态库外的所述接替动态库;Instructing the shadow process to load the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file;

所述处理器701执行所述指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的操作时,具体执行如下操作:When the processor 701 performs the operation of instructing the shadow process to process the initialization process except the preset part process in the succession process, the following operations are specifically performed:

指示所述影子进程执行加载的所述接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程。Instructing the shadow process to perform loading of the successor dynamic library other than the preprocessing function, and processing an initialization process in the succession process other than the preset part process.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程, 在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment. I will not repeat them here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱 离本发明各实施例技术方案的精神和范围。 The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the embodiments are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not detract from the essence of the corresponding technical solutions. The spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

一种进程接替的方法,其特征在于,包括:A method of process replacement, comprising: 父进程为子进程创建影子进程,所述影子进程用于在所述子进程故障时接替所述子进程;The parent process creates a shadow process for the child process, and the shadow process is used to replace the child process when the child process fails; 当所述影子进程被创建后,所述影子进程处理预置部分流程,并休眠等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程的全部初始化流程;After the shadow process is created, the shadow process processes the preset part process and sleeps to wait for the wakeup. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, and the replacement process is to take over. All initialization processes of the child process; 当所述父进程监控到所述子进程故障时,所述父进程回收所述子进程,并唤醒所述影子进程;When the parent process monitors that the child process is faulty, the parent process reclaims the child process and wakes up the shadow process; 当所述影子进程被唤醒后,所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程升级为所述子进程。After the shadow process is awakened, the shadow process processes an initialization process in the succession process except the preset part process, and the shadow process is upgraded to the child process. 根据权利要求1所述的方法,其特征在于,所述影子进程升级为所述子进程的步骤之后还包括:The method according to claim 1, wherein the step of upgrading the shadow process to the child process further comprises: 当所述父进程监控到所述影子进程升级到所述子进程时,触发所述父进程为子进程创建影子进程的步骤。When the parent process monitors that the shadow process is upgraded to the child process, triggering the parent process to create a shadow process for the child process. 根据权利要求1或2所述的方法,其特征在于,所述父进程为子进程创建影子进程的步骤之后,所述影子进程处理预置部分流程的步骤之前还包括:The method according to claim 1 or 2, wherein after the step of the parent process to create a shadow process for the child process, the step of the shadow process processing the preset part process further comprises: 所述影子进程加载可执行与可链接格式ELF文件,按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程需要加载的全部动态库;The shadow process loads the executable and linkable format ELF file, and loads the preset partial dynamic library according to the description of the ELF file, where the preset part dynamic library is a part of the dynamic library pre-specified in the replacement dynamic library, Replacing the dynamic library to replace all dynamic libraries that need to be loaded by the child process; 所述影子进程处理预置部分流程具体包括:The process of processing the preset part of the shadow process specifically includes: 所述影子进程执行所述预置部分动态库中的预处理函数,处理所述预置部分流程;The shadow process executes a pre-processing function in the preset partial dynamic library, and processes the preset part process; 所述唤醒所述影子进程的步骤之后,所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的步骤之前还包括:After the step of waking up the shadow process, the step of the shadow process processing the initialization process except the preset part process in the succession process further includes: 所述影子进程按照所述ELF文件的描述加载除所述预置部分动态库外的所述接替动态库;The shadow process loads the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file; 所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程 具体包括:The shadow process processes an initialization process in the succession process except the preset part process Specifically include: 所述影子进程执行所述接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程。The shadow process executes the function other than the pre-processing function in the replacement dynamic library, and processes an initialization process in the succession process except the preset partial process. 一种进程接替的装置,其特征在于,包括:A device for replacing a process, comprising: 父进程模块,子进程模块和影子进程模块;a parent process module, a child process module, and a shadow process module; 所述父进程模块包括:The parent process module includes: 子进程创建单元,用于创建所述子进程模块;a child process creation unit, configured to create the child process module; 影子进程创建单元,用于为所述子进程模块创建所述影子进程模块,所述影子进程模块用于在所述子进程模块故障时接替所述子进程模块;a shadow process creation unit, configured to create the shadow process module for the child process module, where the shadow process module is configured to take over the child process module when the child process module fails; 所述影子进程模块包括:The shadow process module includes: 处理休眠单元,用于当所述影子进程创建单元创建影子进程模块后,处理预置部分流程,并控制所述影子进程模块进入休眠状态等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程模块的全部初始化流程;The dormant unit is configured to process the preset part process after the shadow process creation unit creates the shadow process module, and control the shadow process module to enter a sleep state to wait for wakeup, where the preset part process is pre-processed in the succession process. Specifying a part of the initialization process that must be processed, and the succession process is to replace all initialization processes of the child process module; 所述父进程模块还包括:The parent process module further includes: 监控唤醒单元,用于当监控到所述子进程模块故障时,回收所述子进程模块,并唤醒处于休眠状态的影子进程模块;The monitoring wakeup unit is configured to: when the fault of the child process module is monitored, recover the child process module, and wake up the shadow process module in a sleep state; 所述影子进程模块还包括:The shadow process module further includes: 处理升级单元,用于当所述影子进程模块被所述监控唤醒单元唤醒时,处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程模块升级为子进程模块。The processing upgrade unit is configured to process an initialization process in the succession process except the preset part process, when the shadow process module is awake by the monitoring wake-up unit, and the shadow process module is upgraded to a sub-process module. 根据权利要求4所述的装置,其特征在于,所述父进程模块还包括:The device according to claim 4, wherein the parent process module further comprises: 触发单元,用于当监控到所述影子进程模块升级到所述子进程模块时,触发所述影子进程创建单元。The triggering unit is configured to trigger the shadow process creation unit when monitoring that the shadow process module is upgraded to the child process module. 根据权利要求4或5所述的装置,其特征在于,所述影子进程模块还包括:The device according to claim 4 or 5, wherein the shadow process module further comprises: 第一加载单元,用于加载ELF文件,并按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程模块需要加载的全部动态库; a first loading unit, configured to load an ELF file, and load a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, and the replacement dynamic The library is all dynamic libraries that need to be loaded to replace the child process module; 所述处理休眠单元具体用于,当所述影子进程创建单元创建影子进程模块后,执行所述第一加载单元加载的预置部分动态库中的预处理函数,处理所述预置部分流程,并控制所述影子进程模块进入休眠状态等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程模块的全部初始化流程;The processing dormancy unit is specifically configured to: after the shadow process creation unit creates a shadow process module, execute a pre-processing function in the preset partial dynamic library loaded by the first loading unit, and process the preset part process, And controlling the shadow process module to enter a sleep state and waiting for wake-up. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, where the succession process is to replace all initialization processes of the sub-process module; 所述影子进程模块还包括:The shadow process module further includes: 第二加载单元,用于当所述监控唤醒单元唤醒所述影子进程模块时,按照所述ELF文件的描述加载除所述第一加载单元加载的预置部分动态库外的所述接替动态库;a second loading unit, configured to: when the monitoring wake-up unit wakes up the shadow process module, load the replacement dynamic library except the preset partial dynamic library loaded by the first loading unit according to the description of the ELF file ; 所述处理升级单元具体用于,当所述影子进程模块被所述监控唤醒单元唤醒时,执行所述第二加载单元加载的接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程模块升级为子进程模块。The processing upgrade unit is specifically configured to: when the shadow process module is awakened by the monitoring wake-up unit, execute another function in the succeeding dynamic library that is loaded by the second loading unit except the pre-processing function, and the processing center In the replacement process, in addition to the initialization process except the preset part process, the shadow process module is upgraded to a sub-process module. 一种进程接替的装置,其特征在于,包括:A device for replacing a process, comprising: 处理器和存储器;Processor and memory; 通过调用所述存储器存储的操作指令,所述处理器用于执行如下操作:The processor is configured to perform the following operations by invoking an operation instruction stored by the memory: 指示父进程创建子进程;Instruct the parent process to create a child process; 指示所述父进程为所述子进程创建影子进程,所述影子进程用于在所述子进程故障时接替所述子进程;Instructing the parent process to create a shadow process for the child process, the shadow process being used to replace the child process when the child process fails; 当所述影子进程被创建后,指示所述影子进程处理预置部分流程,并休眠等待唤醒,所述预置部分流程为在接替流程中预先指定必须处理的一部分初始化流程,所述接替流程为接替所述子进程的全部初始化流程;After the shadow process is created, the shadow process is instructed to process a preset part of the process, and sleep is awaiting wake-up. The preset part process is to pre-specify a part of the initialization process that must be processed in the succession process, where the succession process is Replacing all initialization processes of the child process; 当所述父进程监控到所述子进程故障时,指示操作系统内核回收所述子进程,并唤醒所述影子进程;When the parent process monitors the child process failure, instructing the operating system kernel to reclaim the child process and waking up the shadow process; 当所述影子进程被唤醒时,指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程,所述影子进程升级为所述子进程。When the shadow process is awakened, the shadow process is instructed to process an initialization process in the succession process other than the preset part process, and the shadow process is upgraded to the child process. 根据权利要求7所述的装置,其特征在于,所述处理器还执行如下操作:The apparatus according to claim 7, wherein said processor further performs the following operations: 当所述父进程监控到所述影子进程升级到所述子进程时,触发所述指示所 述父进程为所述子进程创建所述影子进程的操作。When the parent process monitors that the shadow process is upgraded to the child process, triggering the indication The parent process creates an operation of the shadow process for the child process. 根据权利要求7或8所述的装置,其特征在于,所述处理器执行所述指示所述影子进程处理预置部分流程的操作之前,所述处理器还执行如下操作:The apparatus according to claim 7 or 8, wherein the processor further performs the following operations before the processor performs the operation of indicating the process of the preset process of the shadow process: 指示所述影子进程加载ELF文件,并按照所述ELF文件的描述加载预置部分动态库,所述预置部分动态库为在接替动态库中预先指定的一部分动态库,所述接替动态库为接替所述子进程需要加载的全部动态库;Instructing the shadow process to load an ELF file, and loading a preset partial dynamic library according to the description of the ELF file, where the preset partial dynamic library is a part of a dynamic library pre-specified in the replacement dynamic library, and the replacement dynamic library is Replacing all the dynamic libraries that the child process needs to load; 所述处理器执行所述指示所述影子进程处理预置部分流程的操作时,具体执行如下操作:When the processor performs the operation indicating that the shadow process processes the preset part of the process, the following operations are specifically performed: 指示所述影子进程执行加载的所述预置部分动态库中的预处理函数,处理所述预置部分流程;Instructing the shadow process to execute a pre-processing function in the preset partial dynamic library that is loaded, and processing the preset part process; 所述处理器执行所述指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的操作之前,所述处理器还执行如下操作:The processor further performs the following operations before the processor performs the operation of instructing the shadow process to process an initialization process other than the preset part process in the succession process: 指示所述影子进程按照所述ELF文件的描述加载除所述预置部分动态库外的所述接替动态库;Instructing the shadow process to load the replacement dynamic library except the preset partial dynamic library according to the description of the ELF file; 所述处理器执行所述指示所述影子进程处理所述接替流程中除所述预置部分流程外的初始化流程的操作时,具体执行如下操作:When the processor performs the operation of instructing the shadow process to process the initialization process except the preset part process in the succession process, the following operations are specifically performed: 指示所述影子进程执行加载的所述接替动态库中除所述预处理函数外的其他函数,处理所述接替流程中除所述预置部分流程外的初始化流程。 Instructing the shadow process to perform loading of the successor dynamic library other than the preprocessing function, and processing an initialization process in the succession process other than the preset part process.
PCT/CN2015/081547 2015-06-16 2015-06-16 Process replacement method and device Ceased WO2016201620A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580031040.5A CN106462455B (en) 2015-06-16 2015-06-16 The method and apparatus that process is taken over
PCT/CN2015/081547 WO2016201620A1 (en) 2015-06-16 2015-06-16 Process replacement method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/081547 WO2016201620A1 (en) 2015-06-16 2015-06-16 Process replacement method and device

Publications (1)

Publication Number Publication Date
WO2016201620A1 true WO2016201620A1 (en) 2016-12-22

Family

ID=57544718

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081547 Ceased WO2016201620A1 (en) 2015-06-16 2015-06-16 Process replacement method and device

Country Status (2)

Country Link
CN (1) CN106462455B (en)
WO (1) WO2016201620A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018191888A1 (en) * 2017-04-19 2018-10-25 广东欧珀移动通信有限公司 Method and device for accelerated startup of application, and terminal
CN109710463A (en) * 2018-12-27 2019-05-03 亚信科技(中国)有限公司 A task scheduling method and device
US11941455B2 (en) * 2019-12-13 2024-03-26 Micron Technology, Inc. Shadow computations in base stations
CN111158725B (en) * 2019-12-30 2024-01-23 上海达梦数据库有限公司 Program upgrading method, device, terminal and storage medium
CN112148477B (en) * 2020-08-28 2024-07-16 杭州安恒信息技术股份有限公司 Service process processing method, electronic device and storage medium
CN113064748B (en) * 2021-04-08 2023-02-28 中国第一汽车股份有限公司 Process succession method, device, electronic equipment and storage medium
CN113778998A (en) * 2021-09-28 2021-12-10 北京安华金和科技有限公司 A kind of database agent fault prevention processing method and device
CN114610478B (en) * 2022-01-05 2025-06-06 上海电气风电集团股份有限公司 Data acquisition control method, control system, electronic equipment and medium for wind farm
CN114721596A (en) * 2022-04-06 2022-07-08 上海电气风电集团股份有限公司 Wind power plant data distributed storage system, method, device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0629949A2 (en) * 1993-06-14 1994-12-21 International Business Machines Corporation System and method of recovering from process failure in a write lock control system
US20040078625A1 (en) * 2002-01-24 2004-04-22 Avici Systems, Inc. System and method for fault tolerant data communication
CN101179432A (en) * 2007-12-13 2008-05-14 浪潮电子信息产业股份有限公司 A Method of Realizing System High Availability in Multi-machine Environment
CN103020242A (en) * 2012-12-19 2013-04-03 中国人民解放军第二炮兵装备研究院第四研究所 Data synchronization method based on oracle database

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1714545A (en) * 2002-01-24 2005-12-28 艾维西系统公司 System and method for fault tolerant data communication
CN102497288A (en) * 2011-12-13 2012-06-13 华为技术有限公司 Dual-server backup method and dual system implementation device
CN102917015A (en) * 2012-09-10 2013-02-06 浪潮(北京)电子信息产业有限公司 Method and device for virtualizing tolerance intrusion based on cloud computing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0629949A2 (en) * 1993-06-14 1994-12-21 International Business Machines Corporation System and method of recovering from process failure in a write lock control system
US20040078625A1 (en) * 2002-01-24 2004-04-22 Avici Systems, Inc. System and method for fault tolerant data communication
CN101179432A (en) * 2007-12-13 2008-05-14 浪潮电子信息产业股份有限公司 A Method of Realizing System High Availability in Multi-machine Environment
CN103020242A (en) * 2012-12-19 2013-04-03 中国人民解放军第二炮兵装备研究院第四研究所 Data synchronization method based on oracle database

Also Published As

Publication number Publication date
CN106462455B (en) 2019-11-01
CN106462455A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106462455B (en) The method and apparatus that process is taken over
CN102789305B (en) Postpone hang
CN103324500B (en) A kind of method and device reclaiming internal memory
CN105468717B (en) Database operation method and device
US9489213B2 (en) Shutdown method, startup method, and communication terminal
US9152205B2 (en) Mechanism for facilitating faster suspend/resume operations in computing systems
CN111290834A (en) Method, device and equipment for realizing high availability of service based on cloud management platform
US9696988B2 (en) Upgrade processing method, apparatus and system for CPLD
CN102819466B (en) The disposal route of operating system exception and device thereof
KR20070008668A (en) Dynamic Movement of Virtual Machine Computer Programs
CN111552489A (en) User mode file system hot upgrade method, device, server and medium
CN106020976A (en) Method and apparatus for offloading out of memory processing process to user space
CN109976886B (en) Kernel remote switching method and device
US20190004818A1 (en) Method of UEFI Shell for Supporting Power Saving Mode and Computer System thereof
CN111290767A (en) Container group update method and system with fast business recovery function
US20040177242A1 (en) Dynamic computer system reset architecture
CN112783570A (en) Application migration method, system and medium based on service grid
CN105589756A (en) Batch processing cluster system and method
WO2002084487A2 (en) Method and apparatus for performing failure recovery in a java platform
CN105930190B (en) A kind of program self-start method and device based on operating system
CN114721876A (en) Data backup method, device and medium
CN105049936B (en) Method and device for switching on and off
JP5673666B2 (en) Multi-core processor system, interrupt program, and interrupt method
CN108762986A (en) A kind of method and system for preventing abnormal power-down from leading to configuration loss
CN111399940A (en) Data processing method of intelligent system, storage medium and intelligent terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15895193

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15895193

Country of ref document: EP

Kind code of ref document: A1