Starting method and device for host process of target application, equipment and storage medium

The installation data is obtained through the first main process of the target application and the installation and startup of the new version is completed using the system installer, which solves the problem of abnormal interruption of the upgrade process and improves the stability and reliability of the application version upgrade.

CN118885227APending Publication Date: 2024-11-01CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410916332.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

In the prior art, the application upgrade process has abnormal interruptions, resulting in the application being unable to successfully upgrade, and the stability and reliability of the upgrade are not high.

Method used

Get installation data through the first main process of the target application, start the system installer, and the system installer terminates the operation of the first main process, installs the new version according to the installation files and scripts, and starts the second version of the new version after successful installation Main process.

Benefits of technology

Improve the reliability and stability of the application version upgrade, and avoid failures caused by interruption of the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885227A_ABST
    Figure CN118885227A_ABST
Patent Text Reader

Abstract

The invention provides a starting method and device for a host process of a target application, equipment and a storage medium. Relates to the technical field of data processing. The method comprises the steps of obtaining installation data of a target application through a first host process of the target application, starting a system installer in the electronic equipment through the first host process, terminating operation of the first host process through the system installer, and installing the target application of a new version through the system installer according to an installation file in the installation data, and executing the target script in the installation data to create a starting task capable of automatically starting the second host process of the target application of the new version, and after the target application of the new version is successfully installed, executing the starting task to start the second host process of the target application of the new version. Therefore, the installation of the new version of the target application and the starting of the host process of the new version of the target application are completed through the system installer started by the host process, and the version upgrading reliability and stability of the target application are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for starting a main process of a target application. Background Art

[0002] With the rapid development of computer technology, users can install applications with various functions in electronic devices (such as mobile phones) according to their needs. When a new version of the corresponding application exists, the version of the application in the electronic device needs to be upgraded.

[0003] In the related art, when upgrading the version of a corresponding application in an electronic device, an upgrade process is usually created separately from the main process of the application, and the upgrade process determines whether there is a new version of the application, and if there is a new version, obtains the installation data of the new version of the application, and installs the new version of the application based on the installation data. However, in this upgrade method, if the upgrade process is abnormally interrupted, the application will not be upgraded to the new version (that is, the application upgrade fails), and the stability and reliability of the application upgrade are not high. Summary of the invention

[0004] The present application provides a method, apparatus, device and storage medium for starting a main process of a target application, so as to solve the problem in the related art that the stability and reliability of application upgrade are low due to abnormal interruption of the upgrade process.

[0005] In a first aspect, the present application provides a method for starting a main process of a target application, the method being applied to an electronic device in which a target application is running, the method comprising: using a first main process of the target application to obtain installation data of the target application, wherein the installation data comprises: an installation file and a target script, wherein the installation file is used to install a new version of the target application, and the target script is used to create a startup task, and the startup task is used to start a second main process of the new version of the target application; using the first main process to start a system installer in the electronic device; using the system installer to terminate the operation of the first main process; using the system installer to install a new version of the target application according to the installation file, and execute the target script to create the startup task; after the new version of the target application is successfully installed, executing the startup task to start the second main process.

[0006] In a second aspect, the present application provides a device for starting a main process of a target application, the device being applied to an electronic device in which a target application is running, the device comprising: an acquisition module for adopting a first main process of the target application to acquire installation data of the target application, wherein the installation data comprises: an installation file and a target script, wherein the installation file is used to install a new version of the target application, and the target script is used to create a startup task, and the startup task is used to start a second main process of the new version of the target application; a startup module for adopting the first main process to start a system installer in the electronic device; a termination module for adopting the system installer to terminate the operation of the first main process; a processing module for adopting the system installer to install a new version of the target application according to the installation file, and execute the target script to create the startup task; and an execution module for executing the startup task to start the second main process after the new version of the target application is successfully installed.

[0007] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement a method for starting a main process of a target application disclosed in an embodiment of the present application.

[0008] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement a method for starting a main process of a target application disclosed in an embodiment of the present application.

[0009] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements a method for starting a main process of a target application disclosed in an embodiment of the present application.

[0010] The technical solution of this application has the following advantages or beneficial effects:

[0011] The installation data of the target application is obtained through the first main process of the target application, and the system installer in the electronic device is started through the first main process, and the operation of the first main process is terminated through the system installer, and the new version of the target application is installed through the system installer according to the installation file in the installation data, and the target script in the installation data is executed to create a startup task of the second main process that can automatically start the new version of the target application, and after the new version of the target application is successfully installed, the startup task is executed to start the second main process of the new version of the target application. In this way, the installation of the new version of the target application and the startup of the main process of the new version of the target application are completed through the system installer started by the main process, which improves the reliability and stability of the version upgrade of the target application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0013] Figure 1 The process of starting the main process of the target application provided in the embodiment of the present application Figure 1 ;

[0014] Figure 2 The process of starting the main process of the target application provided in the embodiment of the present application Figure 2 ;

[0015] Figure 3 The process of starting the main process of the target application provided in the embodiment of the present application Figure 3 ;

[0016] Figure 4 A schematic diagram of the structure of a device for starting a main process of a target application provided in an embodiment of the present application;

[0017] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0018] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0019] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of relevant laws and regulations.

[0021] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0022] In the related art, when upgrading the version of a corresponding application in an electronic device, an upgrade process is usually created separately from the main process of the application, and the upgrade process determines whether there is a new version of the application, and if there is a new version, obtains the installation data of the new version of the application, and installs the new version of the application based on the installation data. However, in this upgrade method, if the upgrade process is abnormally interrupted, the application will not be upgraded to the new version (that is, the application upgrade fails), and the stability and reliability of the application upgrade are not high.

[0023] In order to improve the stability and reliability of application upgrades, the present application proposes a method for starting the main process of a target application, which proposes the following technical concepts: obtaining the installation data of the target application through the first main process of the target application, and starting the system installer in the electronic device through the first main process, and terminating the operation of the first main process through the system installer, and installing the new version of the target application according to the installation file in the installation data through the system installer, and executing the target script in the installation data to create a startup task of the second main process that can automatically start the new version of the target application, and after the new version of the target application is successfully installed, execute the startup task to start the second main process of the new version of the target application. Thus, the installation of the new version of the target application and the startup of the main process of the new version of the target application are completed through the system installer started by the main process, which improves the reliability and stability of the version upgrade of the target application.

[0024] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0025] First combine Figure 1 , an exemplary description is given of the method for starting the main process of the target application provided in an embodiment of the present application.

[0026] Figure 1 The process of starting the main process of the target application provided in the embodiment of the present application Figure 1 .

[0027] It should be noted that the method for starting the main process of the target application provided in the embodiment of the present application can be executed by a starting device for the main process of the target application, wherein the starting device for the main process of the target application can be an electronic device, or can be configured in an electronic device.

[0028] The electronic device in this embodiment also runs a target application. The target application in this embodiment can be any one of the applications installed in the electronic device. For example, the target application can be an application manager in the electronic device, which is used to manage the download and update of applications in the electronic device. It should be noted that the application manager in this example can also be called an application store, an application market, etc.

[0029] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, a server, etc. The mobile terminal can be, for example, a mobile phone, a tablet computer, a personal digital assistant, and other hardware devices with various operating systems, touch screens and / or display screens.

[0030] like Figure 1 As shown, the method for starting the main process of the target application includes the following steps:

[0031] S101, using the first main process of the target application to obtain installation data of the target application, wherein the installation data includes: an installation file and a target script, wherein the installation file is used to install a new version of the target application, and the target script is used to create a startup task, and the startup task is used to start the second main process of the new version of the target application.

[0032] The first main process refers to the main process where the old version of the target application is located, and the main process is used to implement the services provided by the old version of the target application.

[0033] The second main process refers to the main process where the new version of the target application is located, and the main process is used to implement the services provided by the new version of the target application.

[0034] In some embodiments, the first main process in this embodiment communicates with the server corresponding to the target application, and determines whether there is a new version of the target application in the server, and if so, obtains the download address of the new version of the target application and the corresponding first message digest algorithm version 5 (Message-DigestAlgorithm 5, MD5) value from the server. Then, the first main process downloads the installation data of the new version of the target application based on the download address, and determines the second MD5 value based on the downloaded installation data, and verifies the downloaded installation data through the first MD5 value and the second MD5 value, and determines that the downloaded installation data passes the verification when the first MD5 value and the second MD5 value are consistent.

[0035] It is understandable that, when the first MD5 value and the second MD5 value are inconsistent, it means that the downloaded installation data has not passed the verification, and at this time, the installation process will be terminated.

[0036] S102: Using the first main process to start a system installer in the electronic device.

[0037] S103, using the system installer to terminate the operation of the first main process.

[0038] S104, using the system installer to install the new version of the target application according to the installation file, and executing the target script to create a startup task.

[0039] In this embodiment, the system installer may install the new version of the target application according to the installation file, and may also execute the target script to create the startup task.

[0040] In one embodiment of the present application, in order to reduce version conflicts and storage space occupied by an old version of a target application, the system installer may also uninstall an old version of the target application before installing a new version of the target application.

[0041] In this embodiment, the system installer can obtain an uninstall script of the old version of the target application, and uninstall the old version of the target application based on the uninstall script, thereby reducing the impact of the old version of the target application on the electronic device.

[0042] S105, after the new version of the target application is successfully installed, execute a startup task to start the second main process.

[0043] In one embodiment of the present application, when the new version of the target application is successfully installed, the startup task is executed after a first preset time delay to start the second main process. Thus, by delaying the execution of the startup task, the system resources of the electronic device can be released after the installation is completed, thereby providing a better operating environment for the new version of the target application, thereby increasing the probability of successfully starting the second main process.

[0044] Among them, in this embodiment, the startup task is an operating system level task, and its corresponding priority level is relatively high. Even if there are multiple tasks to be processed currently, due to the high priority level of the startup task, the startup task will be processed first before other tasks.

[0045] Among them, the first preset time length is a time length pre-set according to actual needs. For example, the first preset time length is 3 seconds. When the new version of the target application is successfully installed, the startup task can be executed after a delay of 3 seconds to start the second main process.

[0046] In one embodiment of the present disclosure, in order to reduce the consumption of resources of the electronic device by the startup task, the startup task may be deleted after the second main process is successfully started.

[0047] The data method provided by the embodiment of the present application obtains the installation data of the target application through the first main process of the target application, and starts the system installer in the electronic device through the first main process, and terminates the operation of the first main process through the system installer, and installs the new version of the target application according to the installation file in the installation data through the system installer, and executes the target script in the installation data to create a startup task that can automatically start the second main process of the new version of the target application, and after the new version of the target application is successfully installed, the startup task is executed to start the second main process of the new version of the target application. Thus, the installation of the new version of the target application and the startup of the main process of the new version of the target application are completed through the system installer started by the main process, which improves the reliability and stability of the version upgrade of the target application.

[0048] Figure 2 The process of starting the main process of the target application provided in the embodiment of the present application Figure 2 .

[0049] like Figure 2 As shown, the method for starting the main process of the target application includes the following steps:

[0050] S201, using the first main process of the target application to obtain the installation data of the target application, wherein the installation data includes: an installation file and a target script, wherein the installation file is used to install a new version of the target application, and the target script is used to create a startup task, and the startup task is used to start the second main process of the new version of the target application.

[0051] S202: Using the first main process to start a system installer in the electronic device.

[0052] It should be noted that, for the specific description of steps S201 and S202, reference may be made to the relevant description in other embodiments, which will not be repeated here.

[0053] S203, releasing the dependency between the first main process and the process where the system installer is located.

[0054] S204, using the system installer to terminate the operation of the first main process.

[0055] In some embodiments, for example, the first main process is the first process of the target application. Accordingly, when the first main process is terminated, the process started by the first main process will also be closed. In order to subsequently install a new version of the target application based on the system installer, before the system installer is used to terminate the operation of the first main process, the dependency between the first main process and the process where the system installer is located can be released, so that the termination of the first main process will not cause the process where the system installer is located to be terminated, thereby facilitating the subsequent installation of the new version of the target application based on the system installer and the start of the second main process of the new version of the target application.

[0056] S205, using the system installer to install the new version of the target application according to the installation file, and executing the target script to create a startup task.

[0057] S206, after the new version of the target application is successfully installed, execute a startup task to start the second main process.

[0058] It should be noted that, for the specific description of S205 and S206, reference may be made to the relevant description in other embodiments, which will not be repeated here.

[0059] S207: Establish a dependency relationship between the second main process and the process started by the second main process.

[0060] In this embodiment, after starting the second main process, the second main process may sometimes be terminated. In order to avoid the processes started by the second main process continuing to exist independently after the second main process is terminated, which may easily affect the system performance of the electronic device, a dependency relationship can be established between the second main process and the processes started by the second main process, so that after the second main process is subsequently terminated, the processes started by the second main process can be terminated based on the dependency relationship.

[0061] In one embodiment of the present disclosure, when the second main process is a resident process, a daemon process corresponding to the second main process may be created, wherein the daemon process is used to determine whether the second main process exists at intervals of a second preset time, and to start the second main process if the second main process does not exist. Thus, after the second main process is accidentally terminated, the second main process may be automatically started by the daemon process, so that the second main process continues to provide corresponding services to the user.

[0062] Based on the above description, in this embodiment, during the process of upgrading from an old version of a target application to a new version of a target application, the user does not need to manually start the new version of the target application. The method can automatically start the second main process of the new version of the target application, and continue to provide the services provided by the new version of the target application through the second main process, thereby further improving the user experience of the version upgrade of the target application.

[0063] In this embodiment, before the system installer is used to terminate the running of the first main process, the dependency between the first main process and the process where the system installer is located is released, so that after the first main process is terminated, the process where the system installer is located is not terminated, so that the system installer can install a new version of the target application based on the installation file, and start the second main process of the new version of the target application, further improving the stability and reliability of the target application upgrade.

[0064] In order to clearly understand this application, the following Figure 3 The method of this embodiment is described exemplarily.

[0065] Figure 3 The process of starting the main process of the target application provided in the embodiment of the present application Figure 3 .

[0066] like Figure 3 As shown, the method may include:

[0067] S301, the first main process determines whether there is a new version of the target application in the server corresponding to the target application, and if so, executes S302.

[0068] It is understandable that if there is no new version of the target application, there is no need to upgrade the version of the target application, and the operation is terminated directly.

[0069] S302: The first main process obtains a download address of installation data of a new version of a target application and a first MD5 value of the installation data from a server.

[0070] S303: The first main process downloads the installation data based on the download address, and determines a second MD5 value of the downloaded installation data.

[0071] The file format of the downloaded installation data may be in any format. For example, when the operating system of the electronic device is a Linux operating system, the file format of the downloaded installation data may be in a deb format.

[0072] In some embodiments, in order to reduce the consumption of network resources during the download process, the server usually compresses the installation data to obtain the installation data package. Correspondingly, after downloading the installation data package, the first main process can decompress the installation data package to obtain the decompressed installation data.

[0073] S304, determining whether the first MD5 value is consistent with the second MD5 value, if they are consistent, executing S305.

[0074] It is understandable that if there is inconsistency, it means that the downloaded installation data has not passed the verification. At this time, the operation of installing the new version of the target application can be terminated.

[0075] S305: The first main process starts the system installer in the electronic device and releases the dependency between the first main process and the process where the system installer is located.

[0076] S306: The system installer uninstalls the old version of the target application, and installs the new version of the target application based on the installation file in the installation data.

[0077] S307: The system installer executes the target script in the installation data to create a startup task.

[0078] The target script is used to create a startup task.

[0079] The startup task is used to start the second main process of the new version of the target application.

[0080] S308, after the new version of the target application is successfully installed, the system installer executes a startup task to start the second main process.

[0081] In this embodiment, after the second main process is successfully started, the startup task can be deleted to reduce the occupation of resources of the electronic device.

[0082] S309: The system installer establishes a dependency relationship between the second main process and the process started by the second main process.

[0083] In this embodiment, the installation data of the target application is obtained by the first main process of the target application itself, and the new version of the target application is installed in combination with the system installer in the electronic device, and the main process of the new version of the target application is started. Thus, a method is provided for upgrading the version of the target application without an upgrade process, saving the performance consumption and maintenance cost of the upgrade process, avoiding the upgrade failure of the target application due to the interruption of the upgrade process, and improving the reliability and stability of the version upgrade of the target application.

[0084] Figure 4 A schematic diagram of the structure of a device for starting a main process of a target application provided in an embodiment of the present application.

[0085] It should be noted that the device is applied to an electronic device, and a target application is running in the electronic device.

[0086] like Figure 4 As shown, the starting device 400 of the main process of the target application may include:

[0087] The acquisition module 401 is used to adopt the first main process of the target application to obtain the installation data of the target application, wherein the installation data includes: an installation file and a target script, wherein the installation file is used to install the new version of the target application, and the target script is used to create a startup task, and the startup task is used to start the second main process of the new version of the target application.

[0088] The startup module 402 is used to start the system installer in the electronic device by using the first main process.

[0089] The termination module 403 is used to terminate the operation of the first main process using the system installer.

[0090] The processing module 404 is used to use the system installer to install the new version of the target application according to the installation file, and execute the target script to create a startup task.

[0091] The execution module 405 is used to execute the startup task to start the second main process after the new version of the target application is successfully installed.

[0092] In one embodiment of the present application, the device may further include:

[0093] The relationship release module is used to release the dependency relationship between the first main process and the process where the system installer is located before the system installer is used to terminate the operation of the first main process.

[0094] In one embodiment of the present application, the device may further include:

[0095] The relationship establishing module is used to establish a dependency relationship between the second main process and the process started by the second main process.

[0096] In one embodiment of the present application, the execution module 405 is specifically used to: when the new version of the target application is successfully installed, execute the startup task after a first preset time delay to start the second main process.

[0097] In one embodiment of the present application, the device may further include:

[0098] The deletion module is used to delete the startup task after the second main process is successfully started.

[0099] In one embodiment of the present application, the device may further include:

[0100] The process creation module is used to create a daemon process corresponding to the second main process, wherein the daemon process is used to determine whether the second main process exists at intervals of a second preset time, and to start the second main process if the second main process does not exist.

[0101] In one embodiment of the present application, the device may further include:

[0102] The uninstall module is used to uninstall the old version of the target application using the system installer before installing the new version of the target application according to the installation file using the system installer.

[0103] The device for starting the main process of the target application provided in the embodiment of the present application can be used to execute the technical solution of the method for starting the main process of the target application in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0104] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the processing module 404 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above processing module 404. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0105] Figure 5 The electronic device in this embodiment may be a terminal device or a server.

[0106] like Figure 5 As shown, the electronic device may include: a transceiver 121 , a processor 122 , and a memory 123 .

[0107] The processor 122 executes the computer execution instructions stored in the memory, so that the processor 122 executes the scheme in the above embodiment. The processor 122 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0108] The memory 123 is connected to the processor 122 via a system bus and completes communication between them. The memory 123 is used to store computer program instructions.

[0109] The transceiver 121 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.

[0110] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.

[0111] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the method for starting the main process of the target application in the above embodiment.

[0112] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the technical solution of the method for starting the main process of the target application in the above embodiment.

[0113] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the method for starting the main process of the target application in the above embodiment.

[0114] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0115] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for starting a main process of a target application, characterized in that: The method is applied to an electronic device, in which a target application is running, and the method includes: Using the first main process of the target application to obtain installation data of the target application, wherein the installation data includes: an installation file and a target script, wherein the installation file is used to install a new version of the target application, and the target script is used to create a startup task, and the startup task is used to start a second main process of the new version of the target application; Using the first main process to start the system installer in the electronic device; Using the system installer to terminate the operation of the first main process; Using the system installer to install a new version of the target application according to the installation file, and executing the target script to create the startup task; After the new version of the target application is successfully installed, the startup task is executed to start the second main process.

2. The method according to claim 1, characterized in that Before terminating the running of the first main process by using the system installer, the method further includes: The dependency relationship between the first main process and the process where the system installer is located is removed.

3. The method according to claim 2, characterized in that The method further comprises: A dependency relationship is established between the second main process and the process started by the second main process.

4. The method according to claim 1, characterized in that After the new version of the target application is successfully installed, executing the startup task to start the second main process includes: When the new version of the target application is successfully installed, the startup task is executed after a first preset time delay to start the second main process.

5. The method according to claim 1, characterized in that The method further comprises: After the second main process is successfully started, the startup task is deleted.

6. The method according to claim 1, characterized in that The method further comprises: A daemon process corresponding to the second main process is created, wherein the daemon process is used to determine whether the second main process exists at intervals of a second preset time length, and to start the second main process if the second main process does not exist.

7. The method according to claim 1, characterized in that Before installing the new version of the target application according to the installation file using the system installer, the method further includes: The system installer is used to uninstall the old version of the target application.

8. A device for starting a main process of a target application, characterized in that: The device is applied to an electronic device, in which a target application is running, and the device includes: an acquisition module, configured to acquire installation data of the target application by using the first main process of the target application, wherein the installation data includes: an installation file and a target script, wherein the installation file is used to install a new version of the target application, and the target script is used to create a startup task, and the startup task is used to start a second main process of the new version of the target application; A startup module, used for starting a system installer in the electronic device using the first main process; A termination module, used to terminate the operation of the first main process using the system installer; A processing module, configured to use the system installer to install a new version of the target application according to the installation file, and execute the target script to create the startup task; The execution module is used to execute the startup task after the new version of the target application is successfully installed to start the second main process.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.