Mirror image file generation method and device, storage medium and program
By extracting and storing the changed data of the target application in the first virtual machine, the problem of low efficiency in generating a custom image file is solved, and more efficient image file generation is achieved.
Patent Information
- Application Number
- CN202410290239.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2025-09-16
AI Technical Summary
During the process of generating a custom image file, users need to manually create a virtual machine, configure, and install applications, resulting in low efficiency and poor user experience.
When the target application is installed in the first virtual machine, the change data is extracted and stored. When the user subsequently generates an image file, the change data and the second basic image file are directly used to reduce repeated operations.
The image file generation process is simplified, efficiency is improved, user operations are reduced, and the problem of low efficiency in the existing technology is solved.
Smart Images

Figure CN120653354A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method, device, storage medium and program for generating an image file. Background Art
[0002] With the popularity of cloud computing, cloud desktop services (also known as cloud computers) have been developed and deployed. In cloud computer applications, image files can provide cloud computers with operating systems, initial application data, and pre-installed software. Cloud computers can be created and deployed using image files.
[0003] Different users can generate different customized image files according to their needs to build their own cloud computers. Currently, in the process of generating customized image files, different users need to manually complete the generation of corresponding image files, which is inefficient. Summary of the Invention
[0004] Embodiments of the present invention provide a method, device, storage medium, and program for generating an image file, which are used to more efficiently generate a custom image file.
[0005] In a first aspect, an embodiment of the present invention provides a method for generating an image file, the method comprising:
[0006] In response to a user-triggered image file generation request for a target application, determining whether change data corresponding to the target application has been stored, the change data of the target application being generated when the target application is installed in a first virtual machine built using a first base image file;
[0007] If the change data corresponding to the target application has been stored, a target image file is generated according to the change data of the target application and a second base image file, where the operating systems corresponding to the first base image file and the second base image file are the same or different.
[0008] In a second aspect, an embodiment of the present invention provides a device for generating an image file, the device comprising:
[0009] a determination module configured to determine, in response to a user-triggered image file generation request for a target application, whether change data corresponding to the target application has been stored, the change data of the target application being generated when the target application is installed in a first virtual machine constructed using a first base image file;
[0010] A generation module is used to generate a target image file based on the change data of the target application and a second base image file if the change data corresponding to the target application has been stored, wherein the operating systems corresponding to the first base image file and the second base image file are the same or different.
[0011] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the image file generation method as described in the first aspect.
[0012] In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the image file generation method described in the first aspect.
[0013] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program. When the computer program product is executed by a processor of an electronic device, the processor can at least implement the image file generation method as described in the first aspect.
[0014] In the image file generation solution provided by an embodiment of the present invention, when a target application is installed in a first virtual machine constructed with a first basic image file, the change data generated when the target application is installed (such as registry changes, system file changes) can be obtained in the first virtual machine, and the change data is stored so that when the user subsequently needs to generate an image file containing the target application, the user-defined target image file can be directly generated based on the stored change data corresponding to the target application and the second basic image file selected by the user.
[0015] In the above solution, the target application only needs to be installed once in the first virtual machine to obtain and save the corresponding change data (which can actually be regarded as the installation data of the target application). Subsequently, when any user needs to generate a target image file containing the target application, they can first determine whether the change data corresponding to the target application is already stored. If the change data corresponding to the target application is already stored, the target image file can be directly generated based on the change data and the second base image file selected by the user. This eliminates the need for the user to manually repeatedly create a virtual machine to install the target application, perform relevant configuration operations on the virtual machine, and manually install the target application in the virtual machine, making the entire process of generating the target image file simpler and more efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 A schematic diagram of a system for generating an image file according to an embodiment of the present invention;
[0018] Figure 2 A flowchart of a method for generating an image file provided by an embodiment of the present invention;
[0019] Figure 3 A flowchart of another image file generation method provided by an embodiment of the present invention;
[0020] Figure 4 A schematic diagram of a process for acquiring change data corresponding to a target application provided by an embodiment of the present invention;
[0021] Figure 5 A schematic structural diagram of an image file generation device provided by an embodiment of the present invention;
[0022] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0024] 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 the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0025] The following describes some embodiments of the present invention in detail with reference to the accompanying drawings. The following embodiments and features thereof may be combined with one another unless they conflict with each other. Furthermore, the sequence of steps in the following method embodiments is provided for illustrative purposes only and is not intended to be a strict limitation.
[0026] With the continuous development of cloud computing, cloud computing is increasingly being used in various scenarios. In practice, different users can generate customized image files based on their needs to build their own cloud computing. Currently, the process of generating customized image files requires each user to manually create the corresponding image file, which is inefficient.
[0027] For example, in a cloud application scenario, assume that N applications (N>1) are already installed in a cloud application service cluster. User A triggers the need to generate image files for 10 applications numbered 0-10. User A then needs to build a virtual machine VM1 using a base image file c1, where the base image file c1 contains an operating system a. User A then performs relevant configuration operations on virtual machine VM1, such as configuring memory, CPU, and disk. Applications 0-10 are then installed in virtual machine VM1. After the installation is complete, an image file generation operation is triggered in virtual machine VM1 (for example, by selecting a Generate Image File button in a menu bar). Based on the installation results of the 10 applications, image files F1 corresponding to the 10 applications are generated. Image file F1 contains operating system a corresponding to virtual machine VM1. After a while, suppose user B triggers the need to generate image files for 10 applications numbered 5-15. At this time, user B needs to build a virtual machine VM2 based on a base image file c2, where base image file c2 contains an operating system b (the same as or different from operating system a). Then, user B needs to perform relevant configuration operations on virtual machine VM2 and install application 5-15 in virtual machine VM2. After the installation is complete, the image file generation operation is triggered in virtual machine VM2 to generate image files F2 corresponding to these 10 applications based on the installation results of application 5-15. In other words, user B needs to repeat the process of creating a virtual machine, configuring the virtual machine, and installing application 5-10, resulting in low efficiency in image file generation and a poor user experience.
[0028] In response to the above technical problems, an embodiment of the present invention provides a new image file generation solution. For an application, it only needs to be installed once in a virtual machine created based on a basic image file, and the change data generated during the installation is stored. When the user needs to generate an image file containing the application, the saved change data generated during the installation of the application can be directly used to generate the corresponding target image file, which simplifies user operation behavior and effectively improves the efficiency of image file generation.
[0029] The following is a detailed description of the image file generation solution provided by the embodiment of the present invention, which can be executed by the image file generation system. Figure 1 Taking the image file generation system shown in FIG. 1 as an example, the image file generation solution provided by the embodiment of the present invention is exemplarily described. Figure 1 The image file generation system shown may include: a first virtual machine and a second virtual machine.
[0030] The first virtual machine is primarily used to install various target applications required by the user. During the installation process, changes to system files and the registry are monitored to extract the change data generated when installing the target application. The extracted change data is then stored in the target storage space. This allows the user to subsequently generate an image file corresponding to the target application and directly retrieve the corresponding change data from the target storage space, eliminating the need to repeatedly install the target application. The target storage space can be a low-cost storage system such as object storage.
[0031] In addition, the first virtual machine may be a virtual machine created based on a first basic image file, and the first basic image file includes a certain operating system, so the first virtual machine depends on the operating system.
[0032] The operating system corresponding to the first base image file may be a Windows Server version operating system, or a Windows 10 version operating system, etc. In actual applications, the corresponding version of the operating system may be selected as the operating system corresponding to the first base image file according to actual needs.
[0033] The second virtual machine is mainly used to generate a user-defined target image file. In addition, the second virtual machine can also determine whether the target storage space has stored the change data corresponding to the target application in response to the image file generation request triggered by the user for the target application.
[0034] In addition, the second virtual machine can be a virtual machine created based on the second basic image file. It should be noted that the first basic image file and the second basic image file here can be image files of the same operating system, or image files of different operating systems, and can be set according to actual needs. The embodiment of the present invention does not limit this. In addition, if the first basic image file and the second basic image file are basic image files of the same operating system, the first virtual machine and the second virtual machine can be the same virtual machine, and the same virtual machine is used to install the various target applications required by the user, and the change data generated when the target application is installed is extracted to store the extracted change data in the target storage space. At the same time, the user's target image file for the target application can also be generated.
[0035] In actual applications, when a user needs to generate an image file containing a target application, an image file generation request can be triggered to the second virtual machine for the target application. After the second virtual machine receives the image file generation request sent by the user for the target application, it determines whether the change data corresponding to the target application has been stored. The change data of the target application is generated when the target application is installed in the first virtual machine built with the first basic image file; if the change data corresponding to the target application has been stored, the target image file is generated based on the change data of the target application and the second basic image file. If the change data corresponding to the target application is not stored, the first virtual machine is built using the first basic image file, and the target application is installed in the first virtual machine to obtain the change data generated by the installation of the target application, and the change data of the target application is stored in the target storage space. Finally, the target image file is generated based on the change data of the target application and the second basic image file.
[0036] In summary, in the above embodiment, when an image generation request triggered by a user for a target application is received, it is determined whether the change data corresponding to the target application has been stored. If the change data corresponding to the target application has been stored, the user no longer needs to repeatedly install the target application and modify the relevant configurations of the computer. The user-defined target image file can be directly generated based on the stored change data corresponding to the target application and the second basic image file. The entire process of generating the target image file is simpler and more efficient.
[0037] The above describes the main functions of the different components in the image file generation system. The image file generation process is described in detail below in conjunction with the following embodiments.
[0038] Figure 2 A flowchart of a method for generating an image file provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method may include the following steps:
[0039] 201. In response to an image file generation request triggered by a user for a target application, determine whether change data corresponding to the target application has been stored, where the change data of the target application is generated when the target application is installed in a first virtual machine built with a first basic image file.
[0040] 202. If the change data corresponding to the target application has been stored, generate a target image file according to the change data of the target application and the second base image file. The operating systems corresponding to the first base image file and the second base image file are the same or different.
[0041] The image file generation method provided in the embodiment of the present invention can be used to process a target image file generation request triggered by a user for a target application to meet the user's personalized customization needs. Wherein, the target application can be any type of application, including but not limited to cloud computers, without limitation.
[0042] Specifically, taking the example of a user triggering an image file generation request for a target application in the above-mentioned second virtual machine, in actual application, the second virtual machine can be configured with an image file configuration interface, in which the identifiers of multiple applications that the user has permission to use can be listed. The user can trigger an image file generation request for the target application by checking the identifier of the target application.
[0043] Then, in response to a user-triggered image file generation request for a target application, it is determined whether change data corresponding to the target application has been stored. The change data of the target application may include newly added files in the system files, changed system files, and changed registry entries in the registry when the target application is installed.
[0044] In practice, the second virtual machine can be associated with the address information of the target storage space used to store the change data of each application. Based on the image file generation request triggered by the user for the target application, the second virtual machine can query whether the target application's change data is already stored in the target storage space. As previously mentioned, if the target application's change data is already stored in the target storage space, then the change data was actually generated when the target application was previously installed in the first virtual machine built using the first base image file.
[0045] If the target storage space already stores the changed data of the target application, a target image file is generated according to the changed data of the target application and the second basic image file used to construct the second virtual machine.
[0046] In an optional embodiment, the specific implementation process of generating the target image file according to the changed data of the target application and the second base image file may be: copying the changed data of the target application to the second base image file to generate the target image file.
[0047] Specifically, the specific implementation method of copying the changed data of the target application to the second basic image file to generate the target image file can be: displaying a list of applications that have stored changed data on a second virtual machine built based on the second basic image file, and the application list includes the target application; in response to a copy instruction triggered by the user for the target application, obtaining the changed data of the target application from the target storage space through the second virtual machine, and copying the changed data of the target application to the second basic image file.
[0048] In a specific implementation, after receiving a request for image file generation triggered by a user for a target application, and after determining that the change data corresponding to the target application has been stored, a list of applications with stored change data can be displayed on a second virtual machine built based on the second base image file, so that the user can trigger a copy instruction for the target applications included in the application list. In addition, the application list can also include a second base image file. The user can trigger the copy instruction by selecting the target application and the second base image file and then clicking the "Copy" button. After receiving the user's copy instruction, the second virtual machine automatically obtains the change data of the target application from the target storage space and automatically copies the obtained change data of the target application to the second base image file to generate the target image file.
[0049] Based on the above-mentioned image file generation solution, for a target application, the change data generated during the installation can be obtained by installing it only once, and the change data can be saved. In the subsequent generation process of the target image file for the target application, the change data can be directly used to automatically generate the target image file. In this generation process, the user only needs to perform simple selection and button clicking operations. The process of determining whether the change data exists, obtaining the change data, and generating the target image file are all automatically executed, thereby improving processing efficiency and simplifying user operations.
[0050] Figure 3 A flowchart of another method for generating an image file provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the method may include the following steps:
[0051] 301 : In response to a request for generating an image file triggered by a user for a target application, determine whether change data corresponding to the target application has been stored.
[0052] 302. If the change data corresponding to the target application is not stored, construct a first virtual machine using the first basic image file, install the target application in the first virtual machine, and obtain the change data generated by the installation of the target application.
[0053] 303. Store the changed data of the target application into the target storage space.
[0054] 304. Generate a target image file according to the changed data of the target application and the second base image file.
[0055] In this embodiment, assuming that when the user triggers a request to generate an image file for a target application, it is determined that the target storage space does not store the change data corresponding to the target application. In this case, the change data corresponding to the target application needs to be generated.
[0056] Specifically, a first virtual machine is constructed using a first basic image file, a target application is installed in the first virtual machine to obtain change data generated by installing the target application, and the change data of the target application is stored in a target storage space (such as an object storage).
[0057] To understand the logic of obtaining the change data corresponding to the target application, Figure 4 Schematic explanation. Figure 4 As shown in , when the target application is installed in the user state of the first virtual machine, an IO request (write request) can be sent to the kernel-state driver in the first virtual machine to inform the driver that the target application is being installed, triggering the driver to monitor changes in system files and the registry, generating a change event, and sending the change event to the user-state data extraction program in the first virtual machine. The change event describes how the system files have changed (such as which system files have been added) and which entries in the registry have changed (such as which entries have been added and which entries have changed in content). After the data extraction program receives the change event sent by the kernel-state driver, it extracts the updated system files from the system files and the updated registry entries from the registry based on the change event. In an optional embodiment, as Figure 4 As shown in , the data extraction program can upload the changed data corresponding to the extracted target application (including updated system files and updated registry entries) to the virtual disk, and then the virtual disk can be transferred to the target storage space offline (for example, Figure 4 In the object storage system shown in FIG.
[0058] In practical applications, the virtual disk can be a virtual disk deployed locally on the first VM or in the cloud. Essentially, a virtual disk uses a file to simulate a disk and is essentially a regular file. Therefore, it can be said that the target application's changed data is stored in the virtual disk file, and the virtual disk file is then stored in the target storage space.
[0059] Afterwards, the second virtual machine associated with the target storage space may query and determine that the target storage space has stored the changed data of the target application, thereby generating a target image file based on the changed data of the target application and the second basic image file.
[0060] In actual application, in an optional embodiment, when a user triggers a request to generate an image file for a target application on a second virtual machine, and the second virtual machine determines that the target storage space does not yet store the change data corresponding to the target application, it can output a prompt message to prompt the user to create a first virtual machine and install the target application on the first virtual machine to obtain the change data of the target application. Moreover, after outputting the prompt message, the second virtual machine can periodically query the target storage space to determine whether the change data of the target application has been stored. Alternatively, upon receiving the change data of the target application, the target storage space can send a notification signal to the second virtual machine, causing the second virtual machine to perform subsequent processing: for example, displaying the target application's logo for the user to select, and copying the change data of the target application to the second base image file.
[0061] In addition, in actual applications, some applications may have different compatibility performance under different operating systems. For example, some applications can be successfully installed under one operating system, but not under another. Based on this, in the embodiments of the present invention, the first base image file used to construct the first virtual machine and the second base image file used to construct the second virtual machine can be different.
[0062] Specifically, assuming that the target image file corresponding to the target application is generated by copying the target application's change data into the second base image file to obtain the target image file, then when the target image file is used to construct the third virtual machine, the operating system used by the third virtual machine is the operating system corresponding to the second base image file (assuming a Windows Server version of the operating system). Furthermore, assuming that the target application fails to install successfully under a Windows Server version of the operating system, that is, assuming that the target application's installation does not support the use of a Windows Server version of the operating system. Based on this, in order to obtain the target application's change data, the first virtual machine on which the target application is installed cannot use a Windows Server version of the operating system. In other words, the operating system corresponding to the first base image file used to construct the first virtual machine is not a Windows Server version of the operating system, but rather can be an operating system such as Windows 10 that supports the installation of the target application. Since the change data generated by the target application installation generally does not interfere with the operating system, that is, the target application installation does not modify the operating system, the change data generated by the successful installation of the target application under the Windows 10 operating system will still be able to run normally under a Windows Server version of the operating system, thereby enabling the target application to run normally on the third virtual machine running the Windows Server version of the operating system.
[0063] Based on the above description, in an optional embodiment, after the second virtual machine determines that the target storage space does not store change data corresponding to the target application, if it determines that the target application does not support installation under the operating system corresponding to the local second base image file, it can determine the target operating system supported by the target application and output the first base image file corresponding to the target operating system, so that the user can use the first base image file to build the first virtual machine and install the target application in the first virtual machine. The second virtual machine can store configuration information for the types of operating systems supported by different applications.
[0064] In summary, the image file generation solution provided by the embodiments of the present invention allows for a target application to be generated by different users. In the event that different users all have image file generation requirements for the target application, the virtual machine build and application installation process only needs to be performed once for the target application to obtain the target application's change data. This change data can be reused by different users, thereby improving the efficiency of image file generation. Furthermore, when generating an image file, the change data is copied to a base image file, achieving simplicity and efficiency. Furthermore, compatibility issues between the application and the operating system during the application image file generation process can be overcome.
[0065] The image file generation device of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will understand that these devices can be configured using commercially available hardware components through the steps taught in this solution.
[0066] Figure 5 A schematic diagram of the structure of an image file generation device provided by an embodiment of the present invention is shown as follows: Figure 5 As shown, the device includes: a determination module 11 and a generation module 12.
[0067] The determination module 11 is used to determine whether the change data corresponding to the target application has been stored in response to the image file generation request triggered by the user for the target application, and the change data of the target application is generated when the target application is installed in the first virtual machine built with the first basic image file.
[0068] The generation module 12 is used to generate a target image file based on the change data of the target application and the second base image file if the change data corresponding to the target application has been stored. The operating systems corresponding to the first base image file and the second base image file are the same or different.
[0069] Optionally, the generating module 12 may be specifically configured to copy the changed data of the target application to the second basic image file to generate the target image file.
[0070] Optionally, the generation module 12 can be specifically used to: display a list of applications that have stored change data on a second virtual machine built based on the second basic image file, the application list including the target application; in response to a copy instruction triggered by the user for the target application, obtain the change data of the target application from the target storage space through the second virtual machine, and copy the change data of the target application to the second basic image file.
[0071] Optionally, the generation module 12 can also be used to: if the change data corresponding to the target application is not stored, build the first virtual machine through the first basic image file, install the target application in the first virtual machine to obtain the change data generated by the installation of the target application; store the change data of the target application to the target storage space; and generate the target image file based on the change data of the target application and the second basic image file.
[0072] Optionally, the generation module 12 can be specifically used to: monitor change events of system files and registries through the kernel-state driver in the first virtual machine, and transmit the monitored change events to a user-state data extraction program, so that the data extraction program extracts change data of the target application based on the change events, and the change data includes updated system files and updated registry entries.
[0073] Optionally, the generating module 12 may be specifically configured to: store the changed data of the target application into a virtual disk file; and store the virtual disk file into the target storage space.
[0074] Optionally, the generating module 12 may also be configured to: if the change data corresponding to the target application is not stored, determine a target operating system supported by the target application, and output the first basic image file corresponding to the target operating system.
[0075] Figure 5 The device shown can execute the steps in the aforementioned embodiments. For detailed execution process and technical effects, please refer to the description in the aforementioned embodiments and will not be repeated here.
[0076] In one possible design, the above Figure 5 The structure of the device shown can be realized as an electronic device. Figure 6 As shown, the electronic device may include: a processor 21, a memory 22, and a communication interface 23. The memory 22 stores executable code, and when the executable code is executed by the processor 21, the processor 21 can at least implement the image file generation method provided in the above embodiment.
[0077] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the image file generation method provided in the aforementioned embodiment.
[0078] The device embodiments described above are merely illustrative, wherein the network elements described as separate components may or may not be physically separate. Some or all of these modules may be selected based on actual needs to achieve the objectives of this embodiment. Persons of ordinary skill in the art can understand and implement these embodiments without inventive effort.
[0079] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by a combination of hardware and software. Based on this understanding, the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for generating an image file, characterized in that: include: In response to a user-triggered image file generation request for a target application, determining whether change data corresponding to the target application has been stored, the change data of the target application being generated when the target application is installed in a first virtual machine built using a first base image file; If the change data corresponding to the target application has been stored, a target image file is generated according to the change data of the target application and a second base image file, where the operating systems corresponding to the first base image file and the second base image file are the same or different.
2. The method according to claim 1, characterized in that Generating a target image file according to the changed data of the target application and the second base image file includes: The changed data of the target application is copied to the second basic image file to generate the target image file.
3. The method according to claim 2, characterized in that The copying of the changed data of the target application to the second base image file to generate the target image file includes: Displaying, on a second virtual machine built based on the second base image file, a list of applications in which changed data has been stored, wherein the list of applications includes the target application; In response to a copy instruction triggered by the user on the target application, the changed data of the target application is obtained from the target storage space through the second virtual machine, and the changed data of the target application is copied to the second basic image file.
4. The method according to claim 1, wherein The method further comprises: If the change data corresponding to the target application is not stored, constructing the first virtual machine using the first basic image file, installing the target application in the first virtual machine, and obtaining the change data generated by installing the target application; Storing the changed data of the target application in a target storage space; A target image file is generated according to the changed data of the target application and the second basic image file.
5. The method according to claim 4, characterized in that The obtaining of change data generated by installing the target application includes: The kernel-state driver in the first virtual machine monitors change events of system files and registries, and transmits the monitored change events to a user-state data extraction program, so that the data extraction program extracts change data of the target application based on the change events, and the change data includes updated system files and updated registry entries.
6. The method according to claim 4, characterized in that Storing the changed data of the target application in the target storage space includes: Storing the changed data of the target application into a virtual disk file; The virtual disk file is stored in the target storage space.
7. The method according to claim 4, characterized in that The method further comprises: If the change data corresponding to the target application is not stored, a target operating system supported by the target application is determined, and the first basic image file corresponding to the target operating system is output.
8. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores an executable code, and when the executable code is executed by the processor, the processor executes the image file generation method according to any one of claims 1 to 7.
9. A non-transitory machine-readable storage medium, characterized in that The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the image file generation method according to any one of claims 1 to 7.
10. A computer program product, characterized in that include: A computer program, when executed by a processor of an electronic device, causes the processor to execute the image file generation method according to any one of claims 1 to 7.