Application program starting method and device, equipment, storage medium and product

By obtaining and executing mirror program files and loading application snapshots, the problem of slow cold start of enterprise applications is solved, enabling faster application startup and transaction activity response.

CN119621183APending Publication Date: 2025-03-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411724523.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Enterprise-level applications are slow during cold startup, which affects the response speed of transaction activities, especially in serverless environments.

Method used

Recover the application process by obtaining the mirror program file of the target application and executing the mirror startup command script; reading the application snapshot in the checkpoint folder in the mirror program file, and loading the program run file to achieve quick startup.

Benefits of technology

It significantly improves the cold start speed of applications and the response speed of transaction activities, and improves the efficiency of applications running in serverless environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621183A_ABST
    Figure CN119621183A_ABST
Patent Text Reader

Abstract

The invention discloses an application program starting method and device, equipment, a storage medium and a product, and relates to the technical field of financial science and technology. The method comprises the steps that a mirror image program file of a target application program is obtained, a mirror image starting command script of the mirror image program file is executed, and an application program process of the target application program is recovered; reading an application program snapshot of a target application program in a check point folder in the mirror image program file, and loading a program running file of the target application program to realize program starting of the target application program; wherein the mirror image program file of the target application program is generated and obtained based on the generated mirror image starting command script and the middle mirror image file; the middle mirror image file is generated and obtained based on an executable program file of the target application program. According to the technical scheme, the target application program can be directly started through the mirror image starting command script, the cold starting speed of the target application program is increased, and the response speed of an enterprise to an appearing transaction activity is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology, and in particular to an application startup method, device, equipment, storage medium and product. Background Art

[0002] The current enterprise-level application technology stack faces huge challenges in cold start due to its own technical design. Specifically, the startup process of an enterprise-level application can be divided into execution environment startup, application framework startup and business initialization, among which application framework startup and business initialization are the main factors affecting the slow startup of applications. The main reasons are: first, the framework is complex. In order to support the needs of enterprise applications, the framework has a large amount of configurable and initialization logic, which makes the entire framework startup link very long; second, the characteristics of the virtual machine itself. Because the virtual machine has the characteristics of compiling once and running everywhere, the functions such as class loading, class search and class verification will increase with the complexity of the business.

[0003] At the same time, with the development of serverless technology, it is increasingly necessary to run enterprise-level applications in a serverless environment. In order to make enterprise-level applications run better in a serverless environment, it is urgent to speed up the cold start speed of enterprise-level applications. Therefore, how to improve the startup speed of applications to speed up the speed at which enterprises respond to emerging transaction activities has become a topic that technicians in this field urgently need to study. Summary of the invention

[0004] The present invention provides an application startup method, device, equipment, storage medium and product, which can improve the cold startup speed of the target application and the response speed of the enterprise to the transaction activities that occur by obtaining the program image file of the target application.

[0005] According to one aspect of the present invention, there is provided a method for starting an application program, comprising:

[0006] Obtaining an image program file of a target application, and executing an image startup command script of the image program file to restore an application process of the target application;

[0007] Reading the application snapshot of the target application in the checkpoint folder in the image program file, and loading the program running file of the target application to start the program of the target application;

[0008] The image program file of the target application is generated based on the generated image startup command script and the intermediate image file; and the intermediate image file is generated based on the executable program file of the target application.

[0009] According to another aspect of the present invention, there is provided an application startup device, comprising:

[0010] A program process recovery module, used to obtain the image program file of the target application, and execute the image startup command script of the image program file to restore the application process of the target application;

[0011] A program startup module is used to read the application snapshot of the target application in the checkpoint folder in the image program file, load the program running file of the target application, so as to realize the program startup of the target application; wherein the image program file of the target application is generated based on the generated image startup command script and the intermediate image file; the intermediate image file is generated based on the executable program file of the target application.

[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the application startup method described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the application startup method described in any embodiment of the present invention when executed.

[0017] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the application startup method described in any embodiment of the present invention is implemented.

[0018] The technical solution of the embodiment of the present invention is to recover the application process of the target application by acquiring the image program file of the target application and executing the image startup command script of the image program file; read the application snapshot of the target application in the checkpoint folder in the image program file, load the program running file of the target application, so as to realize the program startup of the target application; wherein, the image program file of the target application is generated based on the generated image startup command script and the intermediate image file; the intermediate image file is generated based on the executable program file of the target application. In this technical solution, the image program file of the target application can be acquired and arranged in the target running environment, thereby improving the versatility of the target application; and when a transaction activity occurs, the target application can be directly started by using the image startup command script, thereby improving the cold start speed of the target application and the response speed of the enterprise to the transaction activity that occurs.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flowchart of a method for starting an application program provided according to Embodiment 1 of the present invention;

[0022] Figure 2 is a flowchart of a method for starting an application program according to Embodiment 2 of the present invention;

[0023] Figure 3 is a structural diagram of an application startup device provided according to Embodiment 3 of the present invention;

[0024] Figure 4 It is a structural schematic diagram of an electronic device that implements the application program startup method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Embodiment 1

[0028] Figure 1 A flowchart of an application startup method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where the cold startup speed of the target application is slow and a quick response to the transaction activity is required. The method can be executed by an application startup device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0029] S110: Obtain an image program file of a target application, and execute an image startup command script of the image program file to restore an application process of the target application.

[0030] Among them, the target application may refer to an application with a complex framework and operating logic that needs to be quickly started when conducting transaction activities in an enterprise. The target application may refer to an application written in different code programming languages, and the specific one may be determined based on actual usage.

[0031] The image program file may specifically refer to an image file that can directly run a target application, and may also be used to directly execute a corresponding functional module in the target application, and may be generated and constructed in advance by a technician based on actual experience.

[0032] Specifically, during the production activities of an enterprise, when carrying out specific transaction activities, it is necessary to start the internal application of the enterprise. The internal program of the enterprise usually has a complex program framework and a large amount of cumbersome operation logic. Therefore, when cold starting the internal application of the enterprise, the efficiency is extremely low, which will greatly affect the efficiency of the enterprise's transaction activities. Therefore, the program process of the target application can be restored by obtaining the pre-built image program file of the target application and directly executing the image program file through the image startup command script.

[0033] S120, reading an application snapshot of a target application in a checkpoint folder in the image program file, and loading a program running file of the target application to start the program of the target application;

[0034] The image program file of the target application is generated based on the generated image startup command script and the intermediate image file; the intermediate image file is generated based on the executable program file of the target application. The intermediate image file can be a file for storing the program code and program startup script of the target application; the executable program file can be a file for storing the executable code of the target application, such as a JAR (Java Archive) file.

[0035] The checkpoint folder may be a folder for storing checkpoint data, specifically a folder for saving the current running state of the target application and supporting functions such as fault recovery and progress saving. The application snapshot may refer to a file that suspends the application process of the target application and saves the program running file of the target application in the current running state, specifically a record file including the program running state, configuration and parameters of the target application at a specific time point.

[0036] Specifically, after the program process of the target application is restored by the mirror startup command script, the application snapshot of the target application in the mirror program file can be read, and the program code file of the target application can be loaded accordingly, and the target application can be started by compiling through the mirror startup command. Exemplary, the target application can be a content management system used to manage and publish the digital content of the enterprise, such as adding or deleting website content, documents, etc. When new content is published on the website, the application snapshot of the content management system can be read directly through the mirror program file corresponding to the content management system, and the program code file of the content management system can be loaded, and the website content addition function in the content management system can be directly executed without going through the cold start links of the application such as execution environment startup, application framework startup, and business initialization, and then the corresponding functional module can be selected and run to complete the operation of the target application.

[0037] The technical solution of the embodiment of the present invention is to recover the application process of the target application by acquiring the image program file of the target application and executing the image startup command script of the image program file; read the application snapshot of the target application in the checkpoint folder in the image program file, load the program running file of the target application, so as to realize the program startup of the target application; wherein, the image program file of the target application is generated based on the generated image startup command script and the intermediate image file; the intermediate image file is generated based on the executable program file of the target application. In this technical solution, the image program file of the target application can be acquired and arranged in the target running environment, thereby improving the versatility of the target application; and when a transaction activity occurs, the target application can be directly started by using the image startup command script, thereby improving the cold start speed of the target application and the response speed of the enterprise to the transaction activity that occurs.

[0038] Embodiment 2

[0039] Figure 2 A flowchart of a method for starting an application program provided in Embodiment 2 of the present invention is provided. Figure 2 This is a flow chart of an application startup method provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment further optimizes the above application startup method.

[0040] Furthermore, before the step of "obtaining the image program file of the target application, and executing the image startup command script of the image program file to restore the application process of the target application", add the step of "obtaining the executable program file of the target application; starting the executable program file, and after the executable program file is started, creating an intermediate image file; generating an image startup command script, and generating an image program file according to the image startup command script and the intermediate image file; the image startup command script is used to execute and restore the application process." to improve the method of accelerating the cold start speed of the target application. Figure 2 As shown, the method includes:

[0041] S210: Obtain the executable program file of the target application.

[0042] The executable program file of the target application may be obtained by the technicians in advance according to actual needs, and the application needs to be optimized for startup, and the executable code file of the application is obtained accordingly.

[0043] S220: Start the executable program file, and after the executable program file is started, create an intermediate image file.

[0044] Specifically, the intermediate image file can be created by pausing the program process of the target application after the executable program file of the target application is started, and saving the program code file of the suspended target application to the checkpoint folder as the intermediate image file.

[0045] Optionally, starting an executable program file, and after the executable program file is started, creating an intermediate image file, includes: starting an executable program file, and after the executable program file is started, creating an application snapshot of the target application, and storing the application snapshot of the target application in a checkpoint folder; generating a target container based on the checkpoint folder and the executable program file of the target application; and exporting the target container to obtain the intermediate image file.

[0046] Among them, the application snapshot can be a method for capturing the current state of the application, which can be used to recover data when a problem occurs in the application, and can also be used to analyze and adjust the performance of the application. Specifically, after the executable program file of the target application is started, the program process of the target application is paused, and the program state, configuration and data of the target application in the paused state are recorded, and the file generated according to the recording result is used as the application snapshot.

[0047] Among them, the checkpoint folder can be a folder for storing the intermediate state of the application. Specifically, after the program process of the target application is suspended, an application snapshot of the target application that has been started can be created in the checkpoint folder. Furthermore, an intermediate image file storing the program code of the target application can be generated based on the checkpoint folder and the executable program file of the target application. By starting the executable program file of the target application and creating an application snapshot of the target application after the program file is started to generate a target container and obtain an intermediate image file, the containerization of the target application is realized, which can improve the versatility of the target application in different application scenarios.

[0048] Optionally, start the executable program file, and after the executable program file is started, create an application snapshot of the target application, and store the application snapshot of the target application in a checkpoint folder, including: starting the executable program file, polling the health status check endpoint, and after the health status check endpoint determines that the target application has been started, start a preset sleep timer; if the current time point meets the end condition of the sleep timer, pause the target application, and store the program running files generated by the target application during the startup process in the form of an application snapshot in the checkpoint folder.

[0049] The health status detection endpoint can be an endpoint in the application for reporting the current running status. Specifically, it can be determined whether the current application has been started based on the feedback parameters received by the polling detection health status check endpoint. For example, when the status code 200 is fed back, it can be determined that the target application has been started and is in a healthy state; when the status code is not 200, it can be determined that the target application has failed to start.

[0050] Among them, the sleep timer may refer to the duration of keeping the target application in the current running state after the application is started, and specifically may be used to ensure that the target application is started and the running state is healthy. Among them, the program running file may include the program code of the target application and the configuration parameter information of the target application during the running process, and the configuration parameter information may include the command line parameters, configuration file parameters, environment variables and database parameter information of the target application. Specifically, it may be that after determining that the application is started, the sleep timer is started. Exemplarily, the sleep timer may be 5 seconds, and the specific sleep timer may be set by the technician based on experience. If the running state of the target application within 5 seconds is healthy, it can be determined that the target application is started and the program process of the target application is paused, and an application snapshot is generated according to the running data generated by the target application during the running process, and saved in the checkpoint folder. Polling detection can be performed through the health status check endpoint in the target application to determine whether the target application is started, which can improve the accuracy of the running state of the acquired target application to a certain extent and ensure that the target application is started.

[0051] Optionally, an executable program file is started, and after the executable program file is started, an application snapshot of the target application is created, and the application snapshot of the target application is stored in a checkpoint folder, including: adding a detection identifier parameter to the executable program file to obtain the added executable program file; starting the added executable program file, and polling the detection identifier parameter during the startup process; if the detection identifier parameter is started normally, pausing the target application, and storing the program running file generated by the target application during the startup process in the form of an application snapshot in the checkpoint folder.

[0052] Among them, the detection identifier parameter can be a parameter that can directly determine the running state of the target application during the running process of the target application. Exemplarily, the detection identifier parameter can be added to the executable file of the target application to identify the IP (Internet Protocol Address) address corresponding to the target application. For example, if the IP address corresponding to the target application is 128.168.1.1, the detection identifier parameter can be used to determine whether the target application has established a connection with the server through the IP address, and can request network data through the IP address, and whether the state of the network connection is normal. If the network connection state has a connection timeout and cannot establish a connection with the server, it can be determined that the detection identifier parameter fails to start, that is, the target application fails to start; if the network connection state is normal, it can be connected to the server and network data can be obtained, it can be determined that the detection identifier parameter is started normally, that is, the target application is started. Then, after the target application is started, the application process of the target application can be suspended, and the program running files generated by the target application during the startup process can be stored in the checkpoint folder in the form of application snapshots. Optionally, by adding a detection identifier parameter to the executable program file of the target application, after starting the executable program file, it is possible to directly determine whether the startup of the target application is normal based on whether the detection identifier parameter is started normally, thereby improving the operational efficiency of obtaining the running status of the target application and improving the reliability of the obtained status information.

[0053] Optionally, a target container is generated based on a checkpoint folder and an executable program file of a target application, including: creating an initial container, and copying the executable program file of the target application to the initial container to obtain an intermediate container; generating a startup script based on the folder address of the checkpoint folder; generating a target container based on the startup script and the intermediate container; wherein the startup script is used to load the application snapshot under the checkpoint file after the target container is started.

[0054] Among them, the container can be represented as a lightweight and portable virtualization technology, which can be used to package application programs and corresponding program running configuration parameters, such as command line parameters, environment variables, and database parameter information.

[0055] Specifically, an initial container may be created, the parameter files required to run the target application are packaged into an executable program file, and the file is copied and pasted into the checkpoint folder in the initial container to obtain an intermediate container storing the executable program file of the target application. Furthermore, a startup script for the executable program file may be generated, and the startup script is associated with the executable program file to generate a target container. By creating an initial container, the executable program file of the target application is copied into the initial container, and a startup script is generated based on the executable program file, and the startup script is associated with the executable program file to generate a target container for the target application, thereby realizing the containerization operation of the target application; the target application and the program running file may be sandboxed and directly stored in the hard disk, which greatly reduces the occupation of device memory resources by the target application in the absence of transactions.

[0056] S230, generating an image startup command script, and generating an image program file according to the image startup command script and the intermediate image file; the image startup command script is used to execute the recovery application process.

[0057] Specifically, generating the image program file may be to load and restore the application snapshot stored in the checkpoint folder through the image startup command script, and compile the program code file of the target application recorded in the intermediate image file to obtain the image program file. Specifically, it may be to construct a new image text file, obtain the application snapshot of the target application that has been started according to the intermediate image file, and then compile the program code file of the target application by specifying the default command executed when the container is started as the image startup command script, and generate the image program file of the target application.

[0058] S240: Obtain an image program file of the target application, and execute an image startup command script of the image program file to restore the application process of the target application.

[0059] S250, reading an application snapshot of a target application in a checkpoint folder in the image program file, and loading a program run file of the target application to start the program of the target application; wherein the image program file of the target application is generated based on a generated image startup command script and an intermediate image file; and the intermediate image file is generated based on an executable program file of the target application.

[0060] The technical solution of the embodiment of the present invention is to obtain the executable program file of the target application; start the executable program file, and after the executable program file is started, create an intermediate image file; generate an image startup command script, and generate an image program file according to the image startup command script and the intermediate image file; the image startup command script is used to execute the recovery application process. In this technical solution, the image program file of the target application can be generated according to the executable program file of the target application, and the image program file can be arranged in the target operating environment, which can improve the versatility of the target application; the generated image program file can be stored in the hard disk, does not need to occupy the memory resources of the terminal device and can be reused, and then when a transaction activity occurs, the target application can be directly started using the image startup command script, which improves the cold start speed of the target application and the response speed of the enterprise to the transaction activity that occurs.

[0061] Embodiment 3

[0062] Figure 3 The schematic diagram of the structure of an application startup device provided in the third embodiment of the present invention is shown in FIG. The application startup device provided in the embodiment of the present invention is applicable to the situation where the cold startup speed of the target application is slow and a quick response to the transaction activity is required. The application startup device can be implemented in the form of hardware and / or software, such as Figure 3 As shown, it specifically includes: a program process recovery module 310 and a program startup module 320. Among them,

[0063] A program process recovery module 310 is used to obtain an image program file of a target application and execute an image startup command script of the image program file to recover the application process of the target application;

[0064] A program startup module 320, configured to read the application snapshot of the target application in the checkpoint folder in the image program file, and load the program running file of the target application to start the program of the target application;

[0065] The image program file of the target application is generated based on the generated image startup command script and the intermediate image file; and the intermediate image file is generated based on the executable program file of the target application.

[0066] In this technical solution, the image program file of the target application can be obtained and deployed in the target operating environment, thereby improving the versatility of the target application. When transaction activities occur, the target application can be directly started using the image startup command script, thereby improving the cold start speed of the target application and the enterprise's response speed to occurring transaction activities.

[0067] Optionally, the device further comprises:

[0068] An executable program file acquisition module, used for acquiring the executable program file of the target application before acquiring the image program file of the target application;

[0069] An intermediate image file creation module, used to start the executable program file and create an intermediate image file after the executable program file is started;

[0070] The image program file generation module is used to generate an image startup command script, and generate an image program file according to the image startup command script and the intermediate image file; the image startup command script is used to execute the recovery application process.

[0071] Optional, intermediate image file creation module, including:

[0072] an application snapshot creation unit, configured to start the executable program file, and after the executable program file is started, create an application snapshot of the target application, and store the application snapshot of the target application in the checkpoint folder;

[0073] A target container generation unit, configured to generate a target container according to the checkpoint folder and the executable program file of the target application;

[0074] The target container exporting unit is used to export the target container to obtain an intermediate image file.

[0075] Optional, application snapshot creation unit, specifically used for:

[0076] Starting the executable program file, polling and detecting the health status check endpoint, and starting a preset sleep timer after the health status check power-off determines that the target application has been started;

[0077] If the current time point meets the end condition of the sleep timer, the target application is paused, and the program running file generated by the target application during the startup process is stored in the checkpoint folder in the form of the application snapshot.

[0078] Optional, application snapshot creation unit, specifically used for:

[0079] Adding a detection identifier parameter to the executable program file to obtain the added executable program file;

[0080] Starting the added executable program file, and polling and detecting the detection identifier parameter during the starting process;

[0081] If the detection identifier parameter is started normally, the target application is paused, and the program running file generated by the target application during the startup process is stored in the checkpoint folder in the form of the application snapshot.

[0082] Optionally, the target container generation unit is used to:

[0083] Creating an initial container, and copying the executable program file of the target application to the initial container to obtain an intermediate container;

[0084] Generate a startup script according to the folder address of the checkpoint folder;

[0085] A target container is generated according to the startup script and the intermediate container; wherein the startup script is used to load the application snapshot under the checkpoint file after the target container is started.

[0086] The application startup device provided in the embodiment of the present invention can execute the application startup method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0087] Embodiment 4

[0088] Figure 4 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0089] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0090] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0091] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as an application startup method.

[0092] In some embodiments, the application startup method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the application startup method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the application startup method in any other appropriate manner (e.g., by means of firmware).

[0093] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0094] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0095] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0096] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0097] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0098] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0099] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0100] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for starting an application, characterized in that: include: Obtaining an image program file of a target application, and executing an image startup command script of the image program file to restore an application process of the target application; Reading the application snapshot of the target application in the checkpoint folder in the image program file, and loading the program running file of the target application to start the program of the target application; The image program file of the target application is generated based on the generated image startup command script and the intermediate image file; The intermediate image file is generated based on the executable program file of the target application.

2. The method according to claim 1, characterized in that Before obtaining the image program file of the target application, the method further includes: Obtaining the executable program file of the target application; Starting the executable program file, and after the executable program file is started, creating an intermediate image file; Generate an image startup command script, and generate an image program file according to the image startup command script and the intermediate image file; the image startup command script is used to execute the recovery application process.

3. The method according to claim 2, characterized in that The step of starting the executable program file and creating an intermediate image file after the executable program file is started includes: Starting the executable program file, and after the executable program file is started, creating an application snapshot of the target application, and storing the application snapshot of the target application in the checkpoint folder; Generate a target container according to the checkpoint folder and the executable program file of the target application; The target container is exported to obtain an intermediate image file.

4. The method according to claim 3, characterized in that The starting of the executable program file, and after the execution of the executable program file is completed, creating an application snapshot of the target application, and storing the application snapshot of the target application in the checkpoint folder, comprises: Starting the executable program file, polling and detecting the health status check endpoint, and starting a preset sleep timer after the health status check endpoint determines that the target application has been started; If the current time point meets the end condition of the sleep timer, the target application is paused, and the program running file generated by the target application during the startup process is stored in the checkpoint folder in the form of the application snapshot.

5. The method according to claim 3, characterized in that: The starting of the executable program file, and after the execution of the executable program file is completed, creating an application snapshot of the target application, and storing the application snapshot of the target application in the checkpoint folder, comprises: Adding a detection identifier parameter to the executable program file to obtain the added executable program file; Starting the added executable program file, and polling and detecting the detection identifier parameter during the starting process; If the detection identifier parameter is started normally, the target application is paused, and the program running file generated by the target application during the startup process is stored in the checkpoint folder in the form of the application snapshot.

6. The method according to claim 3, characterized in that The step of generating a target container according to the checkpoint folder and the executable program file of the target application program includes: Creating an initial container, and copying the executable program file of the target application to the initial container to obtain an intermediate container; Generate a startup script according to the folder address of the checkpoint folder; Generate a target container according to the startup script and the intermediate container; The startup script is used to load the application snapshot under the checkpoint file after the target container is started.

7. An application startup device, characterized in that: include: A program process recovery module, used to obtain the image program file of the target application, and execute the image startup command script of the image program file to restore the application process of the target application; A program startup module, used to read the application snapshot of the target application in the checkpoint folder in the image program file, load the program running file of the target application, so as to realize the program startup of the target application; wherein the image program file of the target application is generated based on the generated image startup command script and the intermediate image file; The intermediate image file is generated based on the executable program file of the target application.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the application startup method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the application startup method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the application startup method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Firmware loading method, control circuit, medium and program product

    CN121116414A

  • A firmware loading method, control circuit, medium and program product

    CN121116414B