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

By obtaining and recovering the memory snapshot files of the application and running the compiled program files directly in the virtual machine environment, the problem of long application startup time in the virtual machine environment is solved, and a fast and efficient startup process is achieved.

CN119105811APending Publication Date: 2024-12-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310672771.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

When an existing application starts in a virtual machine environment, it needs to execute the main function, resulting in a long startup time and affects efficiency.

Method used

By obtaining the application's program files and memory snapshot files, compiling the program files and restoring the system service status, directly running the compiled program files in the virtual machine environment, skipping the execution process of the initialization function, and achieving rapid startup.

Benefits of technology

It significantly shortens the startup time of the application, improves the startup efficiency, and avoids excessive time spent on executing the initialization function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105811A_ABST
    Figure CN119105811A_ABST
Patent Text Reader

Abstract

The invention relates to an application program starting method and device, computer equipment, a storage medium and a computer program product. The application program can be an electronic map, and the method comprises the steps that in response to a first program starting operation, a program file and a memory snapshot file corresponding to the application program are obtained; the application program runs in an environment system provided by the virtual machine for executing the binary format file; compiling the program file to obtain a compiled program file used for running in the environment system; based on the memory snapshot file, recovering a system service state in the memory; the system service state is a state which is generated and stored when an initialization function of a system service required by the application program is executed; and jumping out of the execution process of the initialization function according to the system service state, and directly running the compiled program file in the environment system so as to realize the starting of the application program. By adopting the method, the starting time of the application program can be effectively shortened, so that the starting efficiency of the application program is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of computer technology and Internet technology, users are using applications more and more frequently. Through applications, users can enjoy various online business services, including online shopping, navigation, video, and game services.

[0003] Many applications usually need to run in the system environment provided by the virtual machine. When starting the application, it is usually necessary to first execute a main function associated with the application to provide the required system services for the application and then start the application. However, the execution of the main function takes a long time, which results in a long application startup time and affects the startup efficiency of the application. Summary of the invention

[0004] Based on this, it is necessary to provide an application startup method, device, computer equipment, computer readable storage medium and computer program product to address the above technical problems, which can effectively reduce the startup time of the application and thus improve the startup efficiency of the application.

[0005] In a first aspect, the present application provides a method for starting an application. The method comprises:

[0006] In response to the first program startup operation, a program file and a memory snapshot file corresponding to an application program are acquired; the application program is run in an environment system provided by a virtual machine for executing binary format files;

[0007] Compiling the program file to obtain a compiled program file for running in the environment system;

[0008] Based on the memory snapshot file, restoring the system service state in the memory; the system service state is a state generated and saved when executing the initialization function of the system service required by the application;

[0009] The execution flow of the initialization function is jumped out according to the system service status, and the compiled program file is directly run in the environment system to realize the startup of the application program.

[0010] In a second aspect, the present application also provides a device for starting an application program. The device comprises:

[0011] An acquisition module, used for acquiring a program file and a memory snapshot file corresponding to an application program in response to a program startup operation; the application program is run in an environment system provided by a virtual machine for executing binary format files;

[0012] A compiling module, used for compiling the program file to obtain a compiled program file for running in the environment system;

[0013] A recovery module, used to restore the system service state in the memory based on the memory snapshot file; the system service state is a state generated and saved when executing the initialization function of the system service required by the application;

[0014] The startup module is used to jump out of the execution process of the initialization function according to the system service status, and directly run the compiled program file in the environment system to realize the startup of the application.

[0015] In one embodiment, the acquisition module is further used to acquire a program file corresponding to the application in response to the first program startup operation; when it is determined to use a memory snapshot file, acquire the memory snapshot file corresponding to the application.

[0016] In one embodiment, the device further comprises:

[0017] An initialization module, configured to execute the initialization function when it is determined that the memory snapshot file is not to be used, and initialize the system service through the initialization function;

[0018] The startup module is further used to run the compiled program file in the environment system after completing the initialization of the system service to realize the startup of the application program.

[0019] In one embodiment, the device further comprises:

[0020] The acquisition module is further used to acquire the engine resource package and tool chain file associated with the application in the process of acquiring the program file and the memory snapshot file;

[0021] A first execution module, configured to execute the toolchain file to provide compiler and system interface services to the application;

[0022] A first parsing module is used to parse the engine resource package to obtain a rendering service provided to the application; the system service includes the rendering service and the system interface service;

[0023] The compiling module is further used to compile the program file through the compiler to obtain a compiled program file for running in the environment system.

[0024] In one embodiment, the memory snapshot file includes a first memory snapshot file corresponding to the application and a second memory snapshot file corresponding to the tool chain file;

[0025] The recovery module is further used to parse the first memory snapshot file to obtain the memory state of the application; and parse the second memory snapshot file to obtain the variables and system interface service state at runtime.

[0026] In one embodiment, the device further comprises:

[0027] A second execution module is used to execute an initialization function of the system service required by the application program to obtain the system service status; the system service status includes runtime variables, system interface service status and memory status of the application program;

[0028] The saving module is used to save the memory state of the application program directly in the memory snapshot file; save the variables at runtime in the target format in the memory snapshot file; and save the system interface service state in the memory snapshot file in sequence.

[0029] In one embodiment, the device further comprises:

[0030] The acquisition module is further used to acquire the program file, engine resource package and tool chain file of the application program in response to the second program startup operation;

[0031] The second execution module is further used to execute the tool chain file to provide compiler and system interface services to the application;

[0032] A second parsing module, used for parsing the engine resource package to obtain a rendering service provided to the application program;

[0033] The second execution module is further used to execute the initialization function corresponding to the system interface service and the rendering service required by the application program, and obtain runtime variables, system interface service status, and rendering service status.

[0034] In one embodiment, the program file of the application and the tool chain file are stored in a server; the device further comprises:

[0035] The clipping module is used to clip the description information in the original engine resource package to obtain an intermediate resource package;

[0036] A conversion module, used for deleting the binary data segment in the intermediate resource package to obtain the engine resource package;

[0037] A storage module, used for uploading the engine resource package to the server for storage;

[0038] The acquisition module is also used to download the program file, the engine resource package and the tool chain file from the server.

[0039] In one of the embodiments, the saving module is further used to delete stack information with activity less than a preset threshold in the memory state of the application; and directly save the memory state after deleting the stack information with activity less than the preset threshold in the memory snapshot file.

[0040] In one embodiment, the device further comprises:

[0041] The verification module is used to match and verify the target bit data of the memory state in the restored system service state with the target bit data of the memory state obtained by executing the initialization function to obtain a verification result; when the verification result is mismatched, an error processing is performed.

[0042] In one embodiment, the device further comprises:

[0043] A setting module is used to set the creation timestamp of the memory snapshot file to a target value; when restoring the system service state based on the memory snapshot file, the usage timestamp of the memory snapshot file is set to the target value to avoid an error caused by the difference between the creation timestamp and the usage timestamp.

[0044] In one embodiment, the application includes a game application; and the device further includes:

[0045] A drawing module is used to execute a drawing function during game interaction with the game application; call a rendering service included in the system service through the drawing function; and draw a game screen of the game application based on the rendering service.

[0046] In one embodiment, the game application is a game application with a live broadcast function; the game screen includes a virtual object in a first interactive posture, which is displayed on a live broadcast page; and the device further includes:

[0047] A receiving module, used for receiving audio instructions;

[0048] An interaction module, configured to obtain feedback interaction information according to text information corresponding to the audio instruction; and display the feedback interaction information and the virtual object in the second interaction posture in the live broadcast page;

[0049] The second interaction gesture is determined according to the text information and acoustic information corresponding to the audio instruction.

[0050] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0051] In response to the first program startup operation, a program file and a memory snapshot file corresponding to an application program are acquired; the application program is run in an environment system provided by a virtual machine for executing binary format files;

[0052] Compiling the program file to obtain a compiled program file for running in the environment system;

[0053] Based on the memory snapshot file, restoring the system service state in the memory; the system service state is a state generated and saved when executing the initialization function of the system service required by the application;

[0054] The execution flow of the initialization function is jumped out according to the system service status, and the compiled program file is directly run in the environment system to realize the startup of the application program.

[0055] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0056] In response to the first program startup operation, a program file and a memory snapshot file corresponding to an application program are acquired; the application program is run in an environment system provided by a virtual machine for executing binary format files;

[0057] Compiling the program file to obtain a compiled program file for running in the environment system;

[0058] Based on the memory snapshot file, restoring the system service state in the memory; the system service state is a state generated and saved when executing the initialization function of the system service required by the application;

[0059] The execution flow of the initialization function is jumped out according to the system service status, and the compiled program file is directly run in the environment system to realize the startup of the application program.

[0060] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0061] In response to the first program startup operation, a program file and a memory snapshot file corresponding to an application program are acquired; the application program is run in an environment system provided by a virtual machine for executing binary format files;

[0062] Compiling the program file to obtain a compiled program file for running in the environment system;

[0063] Based on the memory snapshot file, restoring the system service state in the memory; the system service state is a state generated and saved when executing the initialization function of the system service required by the application;

[0064] The execution flow of the initialization function is jumped out according to the system service status, and the compiled program file is directly run in the environment system to realize the startup of the application program.

[0065] The above-mentioned application startup method, device, computer equipment, storage medium and computer program product, for an application running in an environment system provided by a virtual machine for executing binary format files, generates a system service state when the initialization function of the system service required by the application is pre-executed before startup, and the system service state is made into a memory snapshot file; thus, when startup is required, the program file and memory snapshot file corresponding to the application are obtained, and the program file is compiled to obtain a compiled program file for running in the environment system, and the system service state is restored in the memory based on the memory snapshot file, so that the execution flow of the initialization function can be jumped out, effectively avoiding the excessive time consumed by executing the initialization function, and directly running the compiled program file in the environment system to realize the startup of the application, which greatly shortens the startup time of the application and improves the startup efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 An application environment diagram of a method for starting an application program in one embodiment;

[0067] Figure 2 A schematic diagram of a flow chart of a method for starting an application program in an embodiment;

[0068] Figure 3 is a schematic diagram of a game screen in one embodiment;

[0069] Figure 4 A schematic diagram of a page for live broadcasting of a game through a virtual object in one embodiment;

[0070] Figure 5 A schematic diagram of a page for live broadcasting of a game through a virtual object in another embodiment;

[0071] Figure 6A schematic diagram of a process of creating a memory snapshot file in one embodiment;

[0072] Figure 7 A schematic diagram of the hierarchical structure of a memory snapshot file in one embodiment;

[0073] Figure 8 A schematic diagram of the structure of a system for starting an application program in one embodiment;

[0074] Fig. 9 A schematic diagram of creating a memory snapshot file and starting a Unity mini game using the memory snapshot file in an embodiment;

[0075] Fig.10 is a structural block diagram of a device for starting an application program in one embodiment;

[0076] Fig.11 is a structural block diagram of a device for starting an application program in another embodiment;

[0077] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0078] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0079] It should be noted that in the following description, the terms "first and second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first and second" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0080] The method for starting an application provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0081] When the user needs to start an application, the application can be triggered on the page of the terminal 102. Figure 1(a) of the figure, at this time, the terminal responds to the triggered first program startup operation, obtains the program file and memory snapshot file corresponding to the application from the server 104; the application is run in the environment system provided by the virtual machine for executing binary format files; compiles the program file to obtain the compiled program file for running in the environment system; based on the memory snapshot file, restores the system service state in the memory; the system service state is the state generated and saved when the initialization function of the system service required by the application is executed; according to the system service state, the execution flow of the initialization function is jumped out, and the compiled program file is directly run in the environment system to realize the startup of the application. The startup screen presented by the application during the startup process can be referred to Figure 1 (b) Figure .

[0082] The application may be a sub-application running on a parent application, such as a game application. The sub-application may also be called a mini-program.

[0083] The terminal 102 may be a mobile terminal, a personal computer, an IoT device, etc. The mobile terminal may be a smart phone, a tablet computer, or a portable wearable device, and the IoT device may be a smart TV, a smart air conditioner, or a smart vehicle-mounted device, etc. The portable wearable device may be a head-mounted device, such as a virtual reality device, an augmented reality device, etc.

[0084] The server 104 may be an independent physical server or a service node in a blockchain system, wherein each service node in the blockchain system forms a peer-to-peer (P2P) network, and the P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP) protocol. In addition, the server 104 may also be a server cluster composed of multiple physical servers, and may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0085] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus) or a network or other communication connection methods, which are not limited in this application.

[0086] In one embodiment, Figure 2 As shown, a method for starting an application is provided, in which the method is Figure 1 The following steps are used as an example to illustrate the terminal execution in:

[0087] S202: In response to a first program startup operation, obtain a program file and a memory snapshot file corresponding to the application program.

[0088] The application runs in the environment system provided by the virtual machine for executing binary format files. It relies on the binary format to run and is a WASM (WebAssembly) application. It should be pointed out that before the application runs in the environment system provided by the virtual machine, it needs to be compiled into a binary format file and then run. The application can be a game application, such as a Unity mini-game; in addition, the application can be a sub-application running on a parent application, such as a game application running on a social application.

[0089] The program file can be a code file of the application written in a high-level programming language. When it is started, the program file needs to be converted into a binary format file by a compiler. When the application is a game application, the program file can be a game file. It should be pointed out that since the application is a WASM application, the corresponding program file can also be called a WASM file.

[0090] The memory snapshot file is a snapshot file that saves the status of system services. When you need to start an application, you can use the quick start process instead of the regular start process, that is, you do not need to execute the initialization function of the system service, and directly load the memory snapshot file, so as to achieve the purpose of quick start.

[0091] In one embodiment, the terminal obtains a program file corresponding to the application in response to the first program startup operation; determines whether a memory snapshot file needs to be used, and when it is determined to use the memory snapshot file, obtains the memory snapshot file corresponding to the application.

[0092] Specifically, the terminal determines whether it needs to use the memory snapshot file. When it is determined to use the memory snapshot file, it downloads the program file and memory snapshot file corresponding to the application from the server. For example, if a user wants to start a Unity mini-game on the parent application, he can find the Unity mini-game on the parent application. After clicking on the Unity mini-game, the terminal will determine whether it needs to use the memory snapshot file. If it does, it will follow the quick start process, download the program file and memory snapshot file of the Unity mini-game from the server, and then execute the subsequent steps; if it does not, it will follow the regular startup process, execute the initialization function, and initialize the system service through the initialization function.

[0093] In one embodiment, in addition to obtaining the program files and memory snapshot files corresponding to the application, the terminal can also obtain the engine resource package and tool chain files associated with the application in the process of obtaining the program files and memory snapshot files; then, execute the tool chain file to provide compiler and system interface services to the application; parse the engine resource package to obtain the rendering service provided to the application; the system service includes rendering service and system interface service.

[0094] The engine resource package may be a Unity resource package, including a Unity primary resource package; in addition, it may also include other resource packages of Unity. After the application is started, the image screen of the application may be rendered through the rendering service in the engine resource package.

[0095] The toolchain file can be an Emscripten.js file. Emscripten is a tool for WASM applications. It can be a compiler and a runtime. The compiler can compile the program files corresponding to the application into binary format files. For the compiled binary format files, the runtime provides support during the operation of the binary format files, such as providing access support for system capabilities.

[0096] S204, compile the program file to obtain a compiled program file for running in the environment system.

[0097] The compiled program file is a binary format file of the application program, which can be directly run in the environment system provided by the virtual machine.

[0098] In one embodiment, the terminal may compile the program file by means of a compiler to obtain a compiled program file for running in the environment system.

[0099] S206, restoring the system service state in the memory based on the memory snapshot file.

[0100] The system service state is a state generated and saved when executing the initialization function of the system service required by the application. The system service state includes runtime variables, system interface service state, and memory state of the application.

[0101] In one embodiment, the memory snapshot file includes a first memory snapshot file corresponding to the application and a second memory snapshot file corresponding to the toolchain file. Therefore, S206 may specifically include: the terminal parses the first memory snapshot file to obtain the memory state of the application; and parses the second memory snapshot file to obtain the variables and system interface service state at runtime.

[0102] The first memory snapshot (WASM snapshot) file may be a snapshot file made for the application. The memory state (WASM Memory) is the state information for the application stored in the first memory snapshot file.

[0103] The second memory snapshot (Emscirpten Snapshot) file may be a snapshot file made for Emscirpten.js. The system interface service state includes the GL (rendering service interface) state and the FS (file system) state stored in the second memory snapshot file.

[0104] S208, jumping out of the execution process of the initialization function according to the system service status, and directly running the compiled program file in the environment system to start the application program.

[0105] Among them, the initialization function can be the main function for initializing the system service, such as the CallMain function. The CallMain function can be used to execute the main function of the WASM application. The main function of the WASM application can be "_main", and the function that executes the "_main" is called function CallMain(), that is, the CallMain function.

[0106] In one embodiment, when the terminal runs the compiled program file, it can call the rendering service included in the system service, render the startup screen of the application based on the rendering service, and display the rendered startup screen. The startup screen can be a dynamic screen (such as an animation).

[0107] The application includes a game application. After the game application is started, the game screen of the game application can also be rendered. Specifically, in the process of interacting with the game application, the terminal executes a drawing function; calls a rendering service included in the system service through the drawing function; draws the game screen of the game application based on the rendering service, and the game screen can refer to Figure 3 .

[0108] Among them, the game application can be a small game of human-computer interaction.

[0109] The game screen may include a dynamic object in a first interactive posture, and the terminal may display feedback interactive information for the audio instruction on a game page in response to the audio instruction, the game page being a page that displays the game screen; in addition, the dynamic object in a second interactive posture is displayed in the game screen. The feedback interactive information is obtained based on the text information of the audio instruction, and the second interactive posture is determined based on the text information and acoustic information corresponding to the audio instruction.

[0110] The first interaction gesture and the second interaction gesture are different gestures presented by the dynamic object to reflect the interaction process. The second interaction gesture is determined according to the text information and acoustic information corresponding to the audio instruction. Therefore, when at least one of the text information or the acoustic information changes, the second interaction gesture presented by the dynamic object may also be different.

[0111] First, the dynamic object in the first interactive posture is displayed. When the audio instruction is received, the feedback interactive information for the audio instruction is displayed, and the dynamic object in the second interactive posture is displayed in the interactive page. Therefore, when performing voice interaction, in addition to the interaction on text information, there is also interaction of the dynamic object through different interactive postures, which enriches the interaction mode; moreover, the second interactive posture is determined according to the text information and acoustic information corresponding to the audio instruction. Therefore, when the acoustic information of the audio instruction is different, the second interactive posture presented by the dynamic object is different. Even if the same instruction content is issued, the dynamic object can also present corresponding different interactive postures, which enhances the immersion of the target object and empathy with the dynamic object, thereby greatly enhancing the interaction effect. Among them, the dynamic object can be a game character in the game.

[0112] In one embodiment, during the process of drawing the game screen, the terminal can also determine the position of the dynamic object during the movement; obtain the lighting information of the corresponding lighting probe according to the position; render the dynamic object according to the lighting information to obtain a globally illuminated game screen.

[0113] In another embodiment, the application may also be a game application with a live broadcast function. After starting, the terminal may enter a live broadcast page through the game application (the live broadcast page may be a live broadcast room or a regular live broadcast page). The live broadcast page plays a game screen, and the game screen includes a virtual object in a first interactive posture, such as Figure 4 As shown; receiving an audio instruction, obtaining feedback interaction information according to the text information corresponding to the audio instruction; displaying the feedback interaction information and the virtual object in the second interaction posture on the live page, such as Figure 5 As shown; wherein the second interaction posture is determined according to the acoustic information corresponding to the text information and the audio instruction. Wherein, the virtual object can be an object that broadcasts the game live, that is, a virtual anchor.

[0114] A virtual object in a first interactive posture is displayed on the game screen of the live broadcast interface. When an audio command is received, feedback interactive information and the virtual object in a second interactive posture are displayed on the game screen. Therefore, even during the live broadcast, interaction can be carried out with the virtual object of the live broadcast. In addition to the interaction of text information during the interaction process, there is also interaction between virtual objects through different interactive postures, which enriches the interaction method. Moreover, the second interactive posture is determined based on the text information and acoustic information corresponding to the audio command. Therefore, when the acoustic information of the audio command is different, the second interactive posture presented by the virtual object is different. Even if the same command content is issued, the virtual object can also present corresponding different interactive postures, which enhances the user's immersion and empathy with the virtual object, thereby greatly improving the interaction effect.

[0115] It should be pointed out that the above S202-S208 is the quick startup process of the application. When it is determined not to use the memory snapshot file, the regular startup process can be followed. Specifically: the terminal executes the initialization function to initialize the system service through the initialization function; after completing the initialization of the system service, run the compiled program file in the environment system to realize the startup of the application.

[0116] In the above embodiment, for an application running in an environment system provided by a virtual machine for executing binary format files, before startup, a system service state is generated when an initialization function of a system service required by the application is pre-executed, and the system service state is made into a memory snapshot file; thus, when startup is required, the program file and the memory snapshot file corresponding to the application are obtained, and the program file is compiled to obtain a compiled program file for running in the environment system, and the system service state is restored in the memory based on the memory snapshot file, thereby jumping out of the execution flow of the initialization function, effectively avoiding the excessive time consumed by executing the initialization function, and directly running the compiled program file in the environment system to realize the startup of the application, thereby greatly shortening the startup time of the application and improving the startup efficiency of the application.

[0117] In one embodiment, before using the memory snapshot file to quickly start the application, the application is started once in a conventional startup manner, and a memory snapshot file is created during or after the startup. For the creation process of the memory snapshot file, please refer to Figure 6 , the specific steps include:

[0118] S602, in response to the second program start operation, obtaining a program file, an engine resource package, and a tool chain file of the application program.

[0119] In one embodiment, the program files and tool chain files of the application are stored in the server; before S602, the terminal can cut the description information in the original engine resource package to obtain the intermediate resource package; delete the binary data segment in the intermediate resource package to obtain the engine resource package, thereby reducing the size of the engine resource package; upload the engine resource package to the server for storage. Therefore, S602 can specifically include: the terminal downloads the program files, engine resource package and tool chain files from the server.

[0120] For example, the terminal can trim bundle:il2cpp-metadata.dat in the original engine resource package, so as to preliminarily optimize the size of the original engine resource package and obtain an intermediate resource package; on this basis, the terminal can also delete the code:wasm data segment in the intermediate resource package, further optimize the size of the original engine resource package, and obtain the final engine resource package.

[0121] S604, executing the tool chain file to provide compiler and system interface services to the application.

[0122] S606, parsing the engine resource package to obtain rendering services provided to the application.

[0123] S608, executing the initialization function corresponding to the system interface service and the rendering service required by the application program, and obtaining runtime variables, system interface service status, and rendering service status.

[0124] The system service status includes runtime variables, system interface service status, and application memory status.

[0125] For the detailed process of S602~S608, please refer to Figure 2 Embodiment of the invention.

[0126] S610: directly save the memory state of the application program in a memory snapshot file.

[0127] Among them, the memory state (WASM Memory) is data in binary format and can be saved directly.

[0128] In one embodiment, the terminal deletes stack information whose activity is less than a preset threshold in the memory state of the application; and directly saves the memory state after deleting the stack information whose activity is less than the preset threshold in the memory snapshot file.

[0129] S612, saving the variables at runtime in the target format in the memory snapshot file.

[0130] Among them, the variables at runtime (JS variables in Emscripten) can reflect the system status in JS. When saving these variables, they can be saved as string type (string) or number type (number), that is, saved in the memory snapshot file as string type or number type.

[0131] Specifically, the terminal saves the variables at runtime into variable data in json format using a string type or a number type, and then saves the variable data into a memory snapshot file using a string type.

[0132] S614, saving the system interface service status in sequence in a memory snapshot file.

[0133] The system interface service state includes a rendering service interface state and a file system state stored in the second memory snapshot file. The rendering service interface state may be that the rendering service interface (i.e., rendering service function, GL function) is cached in the memory and has been initialized. The file system state may be that the file system function (FS function) is cached in the memory and has been initialized.

[0134] like Figure 7 As shown, the Snapshot file includes the WASM Snapshot file and the Emscirpten Snapshot file. The WASM Snapshot file saves the WASM Memory, and the Emscirpten Snapshot file saves the JS variables in Emscripten, the GL functions executed by Emscirpten, and the FS functions.

[0135] Specifically, the terminal saves the name of the rendering service interface and the initialization parameters in the memory snapshot file in sequence, thereby saving the system interface service state.

[0136] In the above embodiment, before the application is quickly started, the system service status is generated by pre-executing the initialization function of the system service required by the application, and the system service status is made into a memory snapshot file, so that the application can be quickly started using the memory snapshot file, which is beneficial to shorten the startup time of the application and improve the startup efficiency of the application.

[0137] In one embodiment, the terminal can optimize the compatibility issue, specifically including: the terminal matches and checks the target bit data of the memory state in the restored system service state with the target bit data of the memory state obtained by executing the initialization function to obtain a verification result; when the verification result is mismatched, an error processing is performed.

[0138] When using Snapshot, a simple check is performed on the state after the Snapshot is replayed, such as whether the 10000th int 8 data of WasmMemory is equal to that during recording. If not, an error is reported.

[0139] In one embodiment, the terminal can perform another optimization process on the compatibility issue, specifically including: the terminal sets the creation timestamp of the memory snapshot file to the target value; when restoring the system service status based on the memory snapshot file, the usage timestamp of the memory snapshot file is set to the target value to avoid error reporting due to differences between the creation timestamp and the usage timestamp.

[0140] Considering that the file system will record and modify the timestamp of the last edited file, if the timestamp of a file when the snapshot is created is different from the timestamp when the snapshot is used, it may cause an error. Therefore, this application sets it uniformly, such as setting it to 0, abandoning the timestamp logic of the file system, thereby avoiding errors.

[0141] As an example, the solution of this application is explained by taking the Unity mini game as an example. Figure 8 and Fig. 9 As shown, specifically including the following:

[0142] The basic logic of WASM applications consists of two parts: WASM files and Emscripten runtime. Specifically, for Unity games, WASM files contain all the game code, and Emscripten provides system function support for the logic in WASM files during runtime. Analogous to applications on Windows, WASM is equivalent to exe, and Emscripten is equivalent to Windows, providing file system capabilities for exe. In the Snapshot solution, we mainly focus on Emscripten's support for GL and FS, which can be referred to Figure 8 .

[0143] The basic logic is: a) Unity games are WASM applications that use Emscripten and run in a class browser; b) When a WASM application starts, it needs to execute the CallMain function, which is very slow. Its essence is the initialization of UnityEngine, so it is considered that the CallMain function may not be executed; c) The result of a function will eventually be reflected in the "memory". If the memory state can be saved and replayed, the execution of the function can be skipped; d) Here, the CallMain function is skipped by taking a memory snapshot, while still ensuring the correct operation of the application, thereby speeding up the startup.

[0144] Based on the above logic, you can create a Snapshot first, and then use the Snapshot to quickly start the Unity game. In addition, when the Snapshot is not needed, you can also follow the regular startup process. For details, please refer to Fig. 9 , from left to right are:

[0145] (I) The process of creating a Snapshot.

[0146] The process of creating a Snapshot file also requires the launch of a Unity game. The Snapshot file is generated during the launch process. The specific process is as follows:

[0147] S1, download resources:

[0148] a) Download the Unity first resource package;

[0149] b) Download the WASM file, which is the program file of the Unity game;

[0150] S2, compile WASM file.

[0151] S3, while downloading resources, executes Emscripten.js to complete the environment preparation.

[0152] S4, executes an extra section of js to hook the calls of GL functions and FS functions in Emscripten. Hook means that the functions in WASM originally directly call the functions of Emscripten, but now they first call the functions of this application, and the functions of this application call the functions of Emscripten, or call other functions that implement the function.

[0153] S5, execute CallMain function.

[0154] Among them, for S5, after step a of S1, step b of S1, S2 and S3 are all executed, S5 is started to be executed.

[0155] S6, after executing the CallMain function, save the current system status and write it into a Snapshot file for the user to load and use.

[0156] S7, when the rAF function is executed, each frame of the Unity game is drawn.

[0157] The format of the Snapshot file is shown in Table 1:

[0158] Table 1

[0159]

[0160]

[0161] In the process of saving the current system status, the JS status is saved as follows:

[0162] The status of WASM files is easy to save. WASM Memory itself is a piece of binary data and can be saved directly. For each variable and function in Emscripten, you need to save it in the following way:

[0163] 1) For each variable in Emscripten, which belongs to basic types such as string\number, you can save it directly. Here, save it as json and then save it to the file using string.

[0164] 2) For the state of object types, such as GL functions, FS functions, and WebGLTexture, when creating a snapshot file, all the function names and parameters called are saved in order. When using the snapshot file, these functions are replayed. Replaying functions can refer to restoring these functions from the snapshot file.

[0165] The JS status currently processed includes:

[0166]

[0167]

[0168] (II) When the user starts, the system uses the snapshot file process

[0169] The user runs the Snapshot solution and starts loading the Unity game:

[0170] S1, download resources:

[0171] a) Download the Unity first resource package;

[0172] b) Download the WASM file;

[0173] c) Download the Snapshot file;

[0174] S2, compile WASM file.

[0175] S3, execute Emscripten.js, and complete the environment preparation.

[0176] S4, reads and parses the Snapshot file, restores the state in the system, and thus skips the execution of the CallMain function.

[0177] S5, when the rAF function is executed, each frame of the Unity game is drawn.

[0178] (III) The process of launching a Unity mini game when a Snapshot file is not required.

[0179] When the Snapshot file is not needed, you can follow the normal startup process, that is, you need to execute the CallMain function and then start the Unity game.

[0180] When creating a snapshot, you can reduce the size of the snapshot file by:

[0181] 1) Use sbrk to obtain the location of the current program break, that is, the current highest address of the memory data segment, and take a memory snapshot on demand.

[0182] 2) Remove the stack segment

[0183] The CallMain function ends. There is no active stack at present. The stack segment in the memory is not needed. Removing the stack can reduce the size of the Snapshot file.

[0184] In addition, you can also reduce the size of the Unity asset package in the following ways, as described below:

[0185] 1) bundle: il2cpp-metadata.dat trimming, that is, deleting the description information in the Unity resource package;

[0186] 2)2) Delete data segment: that is, delete the data field of wasm.

[0187] For compatibility issues, you can use the following methods:

[0188] 1. FileSystem records the last edited timestamp of the modified file.

[0189] When a snapshot file is created, if the timestamp of a file is different from the timestamp when the snapshot file is used, an error will be reported. This application can set them all to 0 and abandon the timestamp logic of the FS, thereby effectively avoiding the error problem.

[0190] 2. GL will return different extensions depending on the model.

[0191] When creating a Snapshot file, you need to solidify the Extension and only support the most basic Extension to prevent problems with some models not being supported.

[0192] 3. Status verification.

[0193] When using a snapshot file, a simple check is performed on the state of the snapshot file after replay, such as whether the 10000th int 8 data of Wasm Memory is equal to the data during recording. If not, an error is reported.

[0194] The startup method of the above embodiment can greatly speed up the startup of the Unity mini-game.

[0195] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0196] Based on the same inventive concept, the embodiment of the present application also provides an application startup device for implementing the application startup method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the startup device for one or more applications provided below can refer to the limitations of the application startup method above, and will not be repeated here.

[0197] In one embodiment, Fig.10 As shown, a device for starting an application is provided, comprising: an acquisition module 1002, a compilation module 1004, a recovery module 1006 and a start module 1008, wherein:

[0198] The acquisition module 1002 is used to obtain the program file and memory snapshot file corresponding to the application program in response to the program startup operation; the application program is run in the environment system provided by the virtual machine for executing binary format files;

[0199] A compiling module 1004, used to compile a program file to obtain a compiled program file for running in an environment system;

[0200] The recovery module 1006 is used to restore the system service state in the memory based on the memory snapshot file; the system service state is a state generated and saved when the initialization function of the system service required by the application is executed;

[0201] The startup module 1008 is used to jump out of the execution process of the initialization function according to the system service status, and directly run the compiled program file in the environment system to realize the startup of the application program.

[0202] In one embodiment, the acquisition module 1002 is further used to acquire a program file corresponding to the application in response to the first program startup operation; when it is determined to use a memory snapshot file, acquire the memory snapshot file corresponding to the application.

[0203] In one embodiment, Fig.11 As shown, the device also includes:

[0204] The initialization module 1010 is used to execute the initialization function when it is determined that the memory snapshot file is not to be used, and initialize the system service through the initialization function;

[0205] The startup module 1008 is also used to run the compiled program file in the environment system after completing the initialization of the system service to realize the startup of the application program.

[0206] In one embodiment, Fig.11 As shown, the device also includes:

[0207] The acquisition module 1002 is further used to acquire the engine resource package and tool chain file associated with the application in the process of acquiring the program file and the memory snapshot file;

[0208] A first execution module 1012, for executing a tool chain file to provide compiler and system interface services to the application;

[0209] The first parsing module 1014 is used to parse the engine resource package to obtain the rendering service provided to the application; the system service includes the rendering service and the system interface service;

[0210] The compiling module 1004 is further used to compile the program file through a compiler to obtain a compiled program file for running in the environment system.

[0211] In one embodiment, the memory snapshot file includes a first memory snapshot file corresponding to the application and a second memory snapshot file corresponding to the tool chain file;

[0212] The recovery module 1006 is further used to parse the first memory snapshot file to obtain the memory state of the application program; and parse the second memory snapshot file to obtain the variables and system interface service state at runtime.

[0213] In the above embodiment, for an application running in an environment system provided by a virtual machine for executing binary format files, before startup, a system service state is generated when an initialization function of a system service required by the application is pre-executed, and the system service state is made into a memory snapshot file; thus, when startup is required, the program file and the memory snapshot file corresponding to the application are obtained, and the program file is compiled to obtain a compiled program file for running in the environment system, and the system service state is restored in the memory based on the memory snapshot file, thereby jumping out of the execution flow of the initialization function, effectively avoiding the excessive time consumed by executing the initialization function, and directly running the compiled program file in the environment system to realize the startup of the application, thereby greatly shortening the startup time of the application and improving the startup efficiency of the application.

[0214] In one embodiment, Fig.11 As shown, the device also includes:

[0215] The second execution module 1016 is used to execute the initialization function of the system service required by the application program to obtain the system service status; the system service status includes runtime variables, system interface service status and memory status of the application program;

[0216] The saving module 1018 is used to save the memory state of the application program directly in the memory snapshot file; save the variables at runtime in the target format in the memory snapshot file; and save the system interface service state in the memory snapshot file in sequence.

[0217] In one embodiment, Fig.11 As shown, the device also includes:

[0218] The acquisition module 1002 is further used to acquire the program file, engine resource package and tool chain file of the application program in response to the second program startup operation;

[0219] The second execution module 1020 is further used to execute the tool chain file to provide compiler and system interface services to the application program;

[0220] The second parsing module 1022 is used to parse the engine resource package to obtain the rendering service provided to the application program;

[0221] The second execution module 1020 is further used to execute the initialization function corresponding to the system interface service and the rendering service required by the application program, and obtain the variables, the system interface service status and the rendering service status during runtime.

[0222] In one embodiment, the program files and tool chain files of the application are stored on a server; Fig.11 As shown, the device also includes:

[0223] The clipping module 1024 is used to clip the description information in the original engine resource package to obtain an intermediate resource package;

[0224] The conversion module 1026 is used to delete the binary data segment in the intermediate resource package to obtain the engine resource package;

[0225] The storage module 1028 is used to upload the engine resource package to the server for storage;

[0226] The acquisition module 1002 is also used to download program files, engine resource packages and tool chain files from the server.

[0227] In one of the embodiments, the saving module is further used to delete the stack information whose activity is less than a preset threshold in the memory state of the application; and directly save the memory state after deleting the stack information whose activity is less than the preset threshold in the memory snapshot file.

[0228] In one embodiment, Fig.11 As shown, the device also includes:

[0229] The verification module 1030 is used to match and verify the target bit data of the memory state in the restored system service state with the target bit data of the memory state obtained by executing the initialization function to obtain a verification result; when the verification result is mismatched, an error processing is performed.

[0230] In the above embodiment, before the application is quickly started, the system service status is generated by pre-executing the initialization function of the system service required by the application, and the system service status is made into a memory snapshot file, so that the application can be quickly started using the memory snapshot file, which is beneficial to shorten the startup time of the application and improve the startup efficiency of the application.

[0231] In one embodiment, Fig.11 As shown, the device also includes:

[0232] The setting module 1032 is used to set the creation timestamp of the memory snapshot file to the target value; when restoring the system service state based on the memory snapshot file, the usage timestamp of the memory snapshot file is set to the target value to avoid error reporting due to differences between the creation timestamp and the usage timestamp.

[0233] In one embodiment, the application includes a game application; Fig.11 As shown, the device also includes:

[0234] The drawing module 1034 is used to execute a drawing function during the game interaction with the game application; call a rendering service included in the system service through the drawing function; and draw the game screen of the game application based on the rendering service.

[0235] In one embodiment, the game application is a game application with a live broadcast function; the game screen includes a virtual object in a first interactive posture, which is displayed on a live broadcast page;

[0236] like Fig.11 As shown, the device also includes:

[0237] A receiving module 1036, configured to receive an audio instruction;

[0238] The interaction module 1038 is used to obtain feedback interaction information according to the text information corresponding to the audio instruction; in the live broadcast page, the feedback interaction information and the virtual object in the second interaction posture are displayed; wherein the second interaction posture is determined according to the text information and the acoustic information corresponding to the audio instruction.

[0239] In the above embodiment, a virtual object in a first interaction posture is displayed on the game screen of the live broadcast interface. When an audio instruction is received, feedback interaction information and a virtual object in a second interaction posture are displayed in the game screen. Therefore, even during the live broadcast, interaction can be performed with the virtual object of the live broadcast. In addition to the interaction of text information during the interaction process, there is also interaction between virtual objects through different interaction postures, which enriches the interaction method. Moreover, the second interaction posture is determined based on the text information and acoustic information corresponding to the audio instruction. Therefore, when the acoustic information of the audio instruction is different, the second interaction posture presented by the virtual object is different. Even if the same instruction content is issued, the virtual object can also present corresponding different interaction postures, which enhances the user's immersion and empathy with the virtual object, thereby greatly improving the interaction effect.

[0240] Each module in the startup device of the above application can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0241] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for starting an application is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0242] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0243] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned application startup method when executing the computer program.

[0244] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for starting the above-mentioned application program are implemented.

[0245] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned method for starting the application program when executed by a processor.

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

[0247] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0248] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0249] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for starting an application, characterized in that: The method comprises: In response to the first program startup operation, a program file and a memory snapshot file corresponding to an application program are acquired; the application program is run in an environment system provided by a virtual machine for executing binary format files; Compiling the program file to obtain a compiled program file for running in the environment system; Based on the memory snapshot file, restoring the system service state in the memory; the system service state is a state generated and saved when executing the initialization function of the system service required by the application; The execution flow of the initialization function is jumped out according to the system service status, and the compiled program file is directly run in the environment system to realize the startup of the application program.

2. The method according to claim 1, characterized in that In response to the first program startup operation, obtaining a program file and a memory snapshot file corresponding to the application program includes: In response to the first program startup operation, obtaining a program file corresponding to the application program; When it is determined to use the memory snapshot file, the memory snapshot file corresponding to the application is obtained.

3. The method according to claim 2, characterized in that The method further comprises: When it is determined that the memory snapshot file is not to be used, executing the initialization function, and initializing the system service through the initialization function; After completing the initialization of the system service, the compiled program file is run in the environment system to start the application program.

4. The method according to claim 1, characterized in that: The method further comprises: In the process of acquiring the program file and the memory snapshot file, acquiring the engine resource package and tool chain file associated with the application; executing the toolchain file to provide compiler and system interface services to the application; Parsing the engine resource package to obtain a rendering service provided to the application; the system service includes the rendering service and the system interface service; The step of compiling the program file to obtain a compiled program file for running in the environment system includes: The program file is compiled by the compiler to obtain a compiled program file for running in the environment system.

5. The method according to claim 4, characterized in that The memory snapshot file includes a first memory snapshot file corresponding to the application and a second memory snapshot file corresponding to the tool chain file; The restoring the system service state in the memory based on the memory snapshot file includes: Parsing the first memory snapshot file to obtain the memory state of the application; The second memory snapshot file is parsed to obtain runtime variables and system interface service status.

6. The method according to claim 1, characterized in that Before obtaining the program file and the memory snapshot file corresponding to the application program in response to the first program startup operation, the method further includes: Execute the initialization function of the system service required by the application to obtain the system service status; the system service status includes runtime variables, system interface service status and memory status of the application; directly saving the memory state of the application program in the memory snapshot file; Saving the runtime variables in the memory snapshot file in a target format; The system interface service status is saved in the memory snapshot file in sequence.

7. The method according to claim 6, characterized in that Before executing the initialization function of the system service required by the application and obtaining the system service status, the method further comprises: In response to the second program startup operation, obtaining a program file, an engine resource package, and a tool chain file of the application program; executing the toolchain file to provide compiler and system interface services to the application; Parsing the engine resource package to obtain rendering services provided to the application; The initialization function of executing the system service required by the application program to obtain the system service status includes: The initialization function corresponding to both the system interface service and the rendering service required by the application is executed to obtain runtime variables, system interface service status, and rendering service status.

8. The method according to claim 7, characterized in that The program file of the application and the tool chain file are stored in a server; before obtaining the program file, engine resource package and tool chain file of the application, the method further includes: Cut the description information in the original engine resource package to obtain an intermediate resource package; Deleting the binary data segment in the intermediate resource package to obtain the engine resource package; Uploading the engine resource package to the server for storage; The obtaining of the program files, engine resource packages and tool chain files of the application comprises: The program file, the engine resource package and the tool chain file are downloaded from the server.

9. The method according to claim 6, characterized in that The step of directly saving the memory state of the application program in the memory snapshot file includes: In the memory state of the application, deleting stack information whose activity is less than a preset threshold; The memory state after deleting the stack information whose activity is less than a preset threshold is directly saved in the memory snapshot file.

10. The method according to claim 6, characterized in that The method further comprises: Performing a match check on the target bit data of the memory state in the restored system service state and the target bit data of the memory state obtained by executing the initialization function to obtain a check result; When the verification result is mismatch, an error processing is performed.

11. The method according to claim 6, characterized in that After the system interface service status is saved in sequence in the memory snapshot file, the method further comprises: Setting the creation timestamp of the memory snapshot file to a target value; When restoring the system service state based on the memory snapshot file, the usage timestamp of the memory snapshot file is set to the target value to avoid an error being reported due to the difference between the creation timestamp and the usage timestamp.

12. The method according to any one of claims 1 to 11, characterized in that: The application program includes a game application; and the method further includes: During game interaction with the game application, executing a drawing function; Calling the rendering service included in the system service through the drawing function; A game screen of the game application is drawn based on the rendering service.

13. The method according to claim 12, characterized in that The game application is a game application with a live broadcast function; the game screen includes a virtual object in a first interactive posture, which is displayed on a live broadcast page; and the method further includes: receiving an audio instruction, and obtaining feedback interaction information according to text information corresponding to the audio instruction; In the live broadcast page, feedback interaction information and a virtual object in a second interaction posture are displayed; The second interaction gesture is determined according to the text information and acoustic information corresponding to the audio instruction.

14. A device for starting an application, characterized in that: The device comprises: An acquisition module, used for acquiring a program file and a memory snapshot file corresponding to an application program in response to a program startup operation; the application program is run in an environment system provided by a virtual machine for executing binary format files; A compiling module, used for compiling the program file to obtain a compiled program file for running in the environment system; A recovery module, used to restore the system service state in the memory based on the memory snapshot file; the system service state is a state generated and saved when executing the initialization function of the system service required by the application; The startup module is used to jump out of the execution process of the initialization function according to the system service status, and directly run the compiled program file in the environment system to realize the startup of the application.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

Citation Information

Cited By

  • Simulator quick starting method and device based on snapshot function

    CN121209975A