Cloud application program operation method, device, electronic device and readable storage medium
By obtaining the system incremental disk image and application base disk image of the Android system and starting the virtual machine, the problem of the lack of Android system cloud application running solutions in the existing technology is solved, and the efficient running of Android system cloud applications in the virtual machine is realized. program, saving resources and reducing maintenance costs.
Patent Information
- Application Number
- CN202210414891.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-04-20
AI Technical Summary
In the existing technology, there are only solutions for running cloud applications on virtual machines based on Windows/Linux systems, and there is a lack of methods for running cloud applications on Android systems.
By obtaining the system incremental disk image of the Android system and the application base disk image of the basic data of the target cloud application, start the virtual machine to run the target cloud application in the virtual machine, and record the generated data during the operation through the incremental disk image. data to realize virtual machine updates and data sharing.
It realizes running cloud applications of Android system in virtual machines, saving local disk space, reducing maintenance costs, and improving operating efficiency.
Smart Images

Figure CN114840267B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud technology, and in particular to a cloud application running method, device, electronic device and readable storage medium. Background Art
[0002] With the rapid development of network technology, in order to reduce the requirements for client configuration, cloud application services can be provided to users based on the client and server architecture.
[0003] For example, a user can choose to start a cloud application in the client, and the client can send a start request to the server. The server can run the cloud application in a virtual machine and send a video stream of the cloud application to the client, and the client can display the interface of the cloud application based on the video stream.
[0004] However, in the related art, there is only a solution for running cloud applications based on a virtual machine of a Windows system or a Linux system. A method for running cloud applications of an Android system is urgently needed. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a cloud application running method, device, electronic device and readable storage medium, which can run an Android system cloud application in a virtual machine. The specific technical solution is as follows:
[0006] In a first aspect of the implementation of the present application, a cloud application running method is first provided, the method comprising:
[0007] Obtaining a system incremental disk image corresponding to the Android system; wherein the system incremental disk image is used to record data generated during the operation of the Android system;
[0008] Obtain an application base disk image containing basic data of the target cloud application to be run;
[0009] Based on the system incremental disk image and the application base disk image, a first virtual machine is started to run the target cloud application in the first virtual machine.
[0010] Optionally, obtaining an application base disk image containing basic data of a target cloud application to be run includes:
[0011] Based on the system incremental disk image and the specified data disk image, start the second virtual machine; wherein the specified data disk image is used to record the data of the cloud application;
[0012] Through the second virtual machine, the basic data of the target cloud application to be run is written into the specified data disk image to obtain an application basic disk image.
[0013] Optionally, the designated data disk image represents a local disk;
[0014] The step of writing the basic data of the target cloud application to be run into the designated data disk image through the second virtual machine to obtain the application basic disk image includes:
[0015] Writing the basic data of the target cloud application to be run into the designated data disk image through the second virtual machine to obtain a standby data disk image;
[0016] The properties of the backup data disk image are modified to be the base disk image of the target cloud application program, so as to obtain the application base disk image.
[0017] Optionally, starting a first virtual machine based on the system incremental disk image and the application base disk image to run the target cloud application in the first virtual machine includes:
[0018] Creating an incremental disk image corresponding to the application base disk image as an application incremental disk image; wherein the application incremental disk image is used to record data generated during the operation of the target cloud application;
[0019] The system incremental disk image is used as the system disk, and the application incremental disk image is used as the data disk, and the first virtual machine is started to run the target cloud application in the first virtual machine.
[0020] Optionally, the method further includes:
[0021] When the target cloud application needs to be updated, the basic data in the application basic disk image is updated through the first virtual machine;
[0022] The data in the application incremental disk image is added to the application base disk image to update the application base disk image.
[0023] Optionally, the specified data disk image represents a cloud disk;
[0024] The starting a first virtual machine based on the system incremental disk image and the application base disk image to run the target cloud application in the first virtual machine includes:
[0025] The system incremental disk image is used as the system disk, and the application basic disk image is used as the data disk, and the first virtual machine is started to run the target cloud application in the first virtual machine.
[0026] Optionally, obtaining an application base disk image containing basic data of a target cloud application to be run includes:
[0027] Obtaining a snapshot of the application base disk image;
[0028] According to the snapshot, the application base disk image is obtained.
[0029] Optionally, the method further includes:
[0030] When the target cloud application needs to be updated, the application base disk image is updated according to the updated basic data of the target cloud application through the first virtual machine to update the application base disk image;
[0031] Generate a snapshot of the application base disk image.
[0032] Optionally, obtaining a system incremental disk image corresponding to the Android system includes:
[0033] Creating a system base disk image corresponding to the Android system; wherein the system base disk image includes: the kernel of the Android system, the startup data of the Android system, and the system files of the Android system;
[0034] An incremental disk image corresponding to the system basic disk image is created as the system incremental disk image.
[0035] In a second aspect of the implementation of the present application, a cloud application running device is provided, the device comprising:
[0036] A system incremental disk image acquisition module, used to acquire a system incremental disk image corresponding to the Android system; wherein the system incremental disk image is used to record data generated during the operation of the Android system;
[0037] An application basic disk image acquisition module is used to acquire an application basic disk image containing basic data of a target cloud application to be run;
[0038] The first virtual machine startup module is used to start the first virtual machine based on the system incremental disk image and the application basic disk image, so as to run the target cloud application in the first virtual machine.
[0039] Optionally, the application base disk image acquisition module includes:
[0040] A second virtual machine startup submodule, used to start the second virtual machine based on the system incremental disk image and the specified data disk image; wherein the specified data disk image is used to record the data of the cloud application;
[0041] The application basic disk image acquisition submodule is used to write the basic data of the target cloud application to be run into the specified data disk image through the second virtual machine to obtain the application basic disk image.
[0042] Optionally, the designated data disk image represents a local disk;
[0043] The application basic disk image acquisition submodule is specifically used to write the basic data of the target cloud application to be run into the designated data disk image through the second virtual machine to obtain the standby data disk image;
[0044] The properties of the backup data disk image are modified to be the base disk image of the target cloud application program, so as to obtain the application base disk image.
[0045] Optionally, the first virtual machine startup module includes:
[0046] An application incremental disk image acquisition submodule is used to create an incremental disk image corresponding to the application base disk image as an application incremental disk image; wherein the application incremental disk image is used to record data generated by the target cloud application during operation;
[0047] The first virtual machine startup submodule is used to start the first virtual machine using the system incremental disk image as the system disk and the application incremental disk image as the data disk, so as to run the target cloud application in the first virtual machine.
[0048] Optionally, the device further comprises:
[0049] An application base disk image update module, used to update the basic data in the application base disk image through the first virtual machine when the target cloud application needs to be updated;
[0050] The data in the application incremental disk image is added to the application base disk image to update the application base disk image.
[0051] Optionally, the specified data disk image represents a cloud disk;
[0052] The first virtual machine startup module is specifically used to start the first virtual machine using the system incremental disk image as the system disk and the application basic disk image as the data disk, so as to run the target cloud application in the first virtual machine.
[0053] Optionally, the application base disk image acquisition module includes:
[0054] A snapshot acquisition submodule, used to acquire a snapshot of the application base disk image;
[0055] The application basic disk image acquisition submodule is used to acquire the application basic disk image according to the snapshot.
[0056] Optionally, the device further comprises:
[0057] An application base disk image update module, used to update the application base disk image according to the updated basic data of the target cloud application through the first virtual machine when the target cloud application needs to be updated, so as to update the application base disk image;
[0058] The snapshot generation module is used to generate a snapshot of the application base disk image.
[0059] Optionally, the system incremental disk image acquisition module includes:
[0060] A system base disk image acquisition submodule is used to create a system base disk image corresponding to the Android system; wherein the system base disk image includes: the kernel of the Android system, the startup data of the Android system, and the system files of the Android system;
[0061] The system incremental disk image acquisition submodule is used to create an incremental disk image corresponding to the system basic disk image as the system incremental disk image.
[0062] The embodiment of the present application also provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0063] Memory, used to store computer programs;
[0064] The processor is used to implement any of the above-mentioned cloud application running methods when executing the program stored in the memory.
[0065] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned cloud application running methods is implemented.
[0066] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the cloud application running methods described above.
[0067] Beneficial effects of the embodiments of the present application:
[0068] An embodiment of the present application provides a cloud application running method, which obtains a system incremental disk image corresponding to an Android system; wherein the system incremental disk image is used to record data generated by the Android system during operation; obtains an application base disk image containing basic data of a target cloud application to be run; and based on the system incremental disk image and the application base disk image, starts a first virtual machine to run the target cloud application in the first virtual machine.
[0069] Based on the system incremental disk image and the application basic disk image, the first virtual machine is started, so that the first virtual machine can run the target cloud application based on the Android system, thereby realizing the running of the cloud application of the Android system in the virtual machine.
[0070] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0072] Figure 1 A flowchart of a cloud application running method provided in an embodiment of the present application;
[0073] Figure 2 A flowchart of another cloud application running method provided in an embodiment of the present application;
[0074] Figure 3 A flowchart of another cloud application running method provided in an embodiment of the present application;
[0075] Figure 4 A flowchart of another cloud application running method provided in an embodiment of the present application;
[0076] Figure 5 A flowchart of another cloud application running method provided in an embodiment of the present application;
[0077] Figure 6 A schematic diagram of the principle of running a cloud application provided in an embodiment of the present application;
[0078] Figure 7 A flowchart of another cloud application running method provided in an embodiment of the present application;
[0079] Figure 8 A schematic diagram of the principle of running a cloud application provided in an embodiment of the present application;
[0080] Fig. 9 A structural diagram of a cloud application running device provided in an embodiment of the present application;
[0081] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0083] In the related art, there is only a solution for running cloud applications based on a virtual machine of a Windows system or a Linux system. A method for running cloud applications of an Android system is urgently needed.
[0084] In order to solve the above problems, an embodiment of the present application provides a cloud application running method, which can be applied to an electronic device. In one implementation, the electronic device can be a host machine (e.g., a server). Based on the cloud application running method provided by an embodiment of the present application, the electronic device can start a first virtual machine, so that the first virtual machine can run a target cloud application based on the Android system, and realize running a cloud application of the Android system in the virtual machine.
[0085] See also Figure 1 , Figure 1 A flowchart of a cloud application running method provided in an embodiment of the present application, the method may include the following steps:
[0086] S101: Obtain a system incremental disk image corresponding to the Android system.
[0087] Among them, the system incremental disk image is used to record the data generated by the Android system during its operation.
[0088] S102: Obtain an application base disk image containing basic data of the target cloud application to be run.
[0089] S103: Based on the system incremental disk image and the application basic disk image, start the first virtual machine to run the target cloud application in the first virtual machine.
[0090] The cloud application running method provided in the embodiment of the present application starts the first virtual machine based on the system incremental disk image and the application basic disk image, so that the first virtual machine can run the target cloud application based on the Android system, thereby realizing the running of the cloud application of the Android system in the virtual machine.
[0091] With respect to step S101, the system incremental disk image is used to record data generated during the operation of the Android system. The system incremental disk image represents a local disk of the electronic device.
[0092] In one embodiment, see Figure 2 ,exist Figure 1 On the basis of, the above step S101 may include the following steps:
[0093] S1011: Create a system base disk image corresponding to the Android system.
[0094] Among them, the system basic disk image includes: the kernel of the Android system, the startup data of the Android system, and the system files of the Android system.
[0095] S1012: Create an incremental disk image corresponding to the system basic disk image as the system incremental disk image.
[0096] In an embodiment of the present application, when an electronic device starts a virtual machine for running a cloud application of an Android system for the first time, a system incremental disk image can be created.
[0097] The kernel and ramdisk of the Android system belong to the / boot partition, which allows the Android system to start normally. The system files of the Android system correspond to the / system partition, which is used to record system-related configurations other than the kernel and ramdisk, for example, including: user interface, applications pre-installed by the Android system, etc.
[0098] In one implementation, the electronic device can merge the kernel of the Android system, the startup data of the Android system, and the system files of the Android system to obtain a system basic disk image.
[0099] In one embodiment, the electronic device can use the system base disk image as the base image based on Qcow2 to generate a corresponding incremental image (i.e., the system incremental disk image in the embodiment of the present application). Accordingly, the data of the Android system generated by the virtual machine started based on the system incremental disk image can be saved in the system incremental disk image, and the system base disk image can be accessed through the system incremental disk image.
[0100] For step S102, the target cloud application may be a game cloud application, or a graphics cloud application, but is not limited thereto. The application base disk image includes basic data of the target cloud application, for example, the basic data includes: all data in the installation directory after the target cloud application is installed in the virtual machine.
[0101] In one embodiment, multiple virtual machines (all running Android systems) can be run simultaneously in an electronic device, and a target cloud application can be run in each virtual machine, and each target cloud application corresponds to a user. Accordingly, when the electronic device needs to start a new virtual machine for the user, if a virtual machine has been started before. At this time, the electronic device can directly obtain the application base disk image obtained when the previous virtual machine was started, and start a new virtual machine based on the application base disk image. That is, multiple virtual machines share the same application base disk image.
[0102] In one embodiment, see Figure 3 ,exist Figure 1 On the basis of, the above step S102 may include the following steps:
[0103] S1021: Start the second virtual machine based on the system incremental disk image and the specified data disk image.
[0104] The designated data disk image is used to record the data of the cloud application.
[0105] S1022: Write the basic data of the target cloud application to be run into the specified data disk image through the second virtual machine to obtain the application basic disk image.
[0106] In an embodiment of the present application, when an electronic device starts a virtual machine for running a cloud application of an Android system for the first time, an application base disk image can be created.
[0107] If an electronic device wants to start a virtual machine, it needs to set up its system disk and data disk. The system disk is used to record the data generated by the Android system when the virtual machine is running, and the data disk is used to record the data of the cloud application running in the virtual machine.
[0108] In one implementation, the electronic device uses the system incremental disk image as the system disk and the specified data disk image as the data disk to start the virtual machine (i.e., the second virtual machine). Then, through the second virtual machine, the target cloud application is installed based on the specified data disk image, that is, the target cloud application is installed to the specified data disk image to obtain the application base disk image.
[0109] In one embodiment, the electronic device may pre-create a designated data disk image, format the designated data disk image, and then create a designated directory in the designated data disk image for storing basic data of the cloud application program, wherein the designated directory may be data.
[0110] In the embodiment of the present application, the electronic device can create designated data disk images in different forms.
[0111] Method 1: The designated data disk image represents the local disk, that is, the electronic device can pre-create a blank data disk image (that is, the designated data disk image) pointing to the local disk.
[0112] Accordingly, see Figure 4 ,exist Figure 3 On the basis of, the above step S1022 may include the following steps:
[0113] S10221: Write the basic data of the target cloud application to be run into the specified data disk image through the second virtual machine to obtain a backup data disk image.
[0114] S10222: Modify the properties of the backup data disk image to the base disk image of the target cloud application to obtain the application base disk image.
[0115] In an embodiment of the present application, after the basic data of the target cloud application is written into the designated data disk image through the second virtual machine, a backup data disk image is obtained. Then, the electronic device can modify the properties of the backup data disk image to the basic disk image of the target cloud application to obtain the application basic disk image. For example, the electronic device can add the identifier of the target cloud application (for example, the name of the target cloud application) to the name of the backup data disk image to obtain the application basic disk image corresponding to the target cloud application.
[0116] Since the designated data disk image represents the local disk, that is, the application base disk image represents the local disk, the virtual machines running in the electronic device can share an application base disk image to run the target cloud application. There is no need to set a corresponding application base disk image for each virtual machine, thereby saving the local disk space of the electronic device.
[0117] In one embodiment, see Figure 5 ,exist Figure 4 On the basis of, the above step S103 may include the following steps:
[0118] S1031: Create an incremental disk image corresponding to the application base disk image as the application incremental disk image.
[0119] The application incremental disk image is used to record the data generated during the operation of the target cloud application.
[0120] S1032: Start the first virtual machine using the system incremental disk image as the system disk and the application incremental disk image as the data disk to run the target cloud application in the first virtual machine.
[0121] In the embodiment of the present application, in order to enable multiple virtual machines to share a local application base disk image without affecting the data generated by the cloud application running in each virtual machine, the electronic device can create an incremental disk image (i.e., an application incremental disk image) corresponding to the application base disk image for each virtual machine, which is used to record the data generated by the cloud application running in the virtual machine. The electronic device can start the corresponding virtual machine based on the created application incremental disk image to run the target cloud application.
[0122] In one embodiment, the electronic device can generate a corresponding incremental image (i.e., an application incremental disk image) based on Qcow2, using the application basic disk image as the basic image. Accordingly, the data generated by the target cloud application running in the virtual machine started based on the application incremental disk image can be saved to the application incremental disk image, and the application basic disk image can be accessed through the application incremental disk image.
[0123] Based on the above processing, multiple virtual machines in the electronic device that need to run the target cloud application share an application base disk image, and each has a corresponding application incremental disk image to record the data generated by each running the target cloud application. For game cloud applications and mapping cloud applications, their basic data is relatively large. Therefore, if multiple virtual machines share an application base disk image, there is no need to generate an application base disk image for each virtual machine, which can save the local disk space of the electronic device and will not affect the data of the cloud applications in each virtual machine.
[0124] In one embodiment, the method may further include the following steps:
[0125] When the target cloud application needs to be updated, the basic data in the application base disk image is updated through the first virtual machine; the data in the application incremental disk image is added to the application base disk image to update the application base disk image.
[0126] In an embodiment of the present application, if the designated data disk image represents a local disk, when the target cloud application is updated, the electronic device can update the target cloud application running in the virtual machine.
[0127] In one implementation, the electronic device can obtain the latest version of the target cloud application in the first virtual machine and install it in a specified directory. Then, the first virtual machine can be shut down. Based on this, the basic data in the application base disk image can be updated. Then, the electronic device can add the data in the application incremental disk image to the application base disk image (i.e., the application base disk image with updated basic data) to obtain a new application base disk image.
[0128] Correspondingly, if the latest version of the target cloud application is to be run in other virtual machines, the virtual machine can be started directly based on the above steps S1031-S1032 based on the new application base disk image.
[0129] In one embodiment, based on the above steps S1021, S10221 and S10222, a new application base disk image may be generated according to the latest version of the target cloud application.
[0130] Based on the above processing, it can be seen that since multiple virtual machines share one application base disk image, if the target cloud application is updated, only one application base disk image needs to be updated, and there is no need to update each virtual machine, which can reduce maintenance costs.
[0131] See also Figure 6 , Figure 6 A schematic diagram of the principles of running a cloud application provided in an embodiment of the present application.
[0132] The electronic device merges the Kernel, Ramdisk and System partitions to obtain the system base disk image (system_base.qcow2) corresponding to the Android system. Generate a system incremental disk image (disk1.qcow2) based on the system base disk image. Create a local data disk image (i.e., specify a data disk image, data.qcow2), format it, and create a / data partition. Start the second virtual machine based on the system incremental disk image and the specified data disk image, and install the target cloud application (e.g., a game cloud application) through the second virtual machine, that is, write the game data of the game cloud application to the specified data disk image, and then the second virtual machine can be shut down. At this time, the name of the game can be added to the name of the specified data disk image to obtain the application base disk image (data_base.qcow2(game)). Generate an incremental image based on the application base disk image as the base image to obtain a data / application incremental disk image (disk1.qcow2). Then, based on the system incremental disk image and the application incremental disk image, start the first virtual machine to run the game cloud application in the first virtual machine.
[0133] When the game cloud application is updated, based on the first virtual machine, the game cloud application is updated after entering the Android system to update the application base disk image, and the first virtual machine is closed after completion. Then, the application incremental disk image is merged into the new application base disk image to obtain a new application base disk image. Accordingly, the electronic device can use the new application base disk image to start a new virtual machine.
[0134] Method 2: The designated data disk image represents the cloud disk, that is, the electronic device can pre-create a blank data disk image (that is, the designated data disk image) pointing to the cloud disk.
[0135] Accordingly, see Figure 7 ,exist Figure 2 On the basis of, the above step S103 may include the following steps:
[0136] S1033: Using the system incremental disk image as the system disk and the application basic disk image as the data disk, start the first virtual machine to run the target cloud application in the first virtual machine.
[0137] In the embodiment of the present application, the designated data disk image represents a cloud disk, that is, the application base disk image is a cloud disk, so each virtual machine cannot share the same application base disk image. For each virtual machine, the electronic device needs to generate an application base disk image corresponding to the virtual machine, that is, each virtual machine has a corresponding application base disk image, which is used to record the basic data of the target cloud application and the data generated by the target cloud application running in the virtual machine.
[0138] In one embodiment, if the designated data disk image represents a cloud disk, when the electronic device first starts the virtual machine for running the target cloud application, after generating the application base disk image, it can also generate a snapshot of the application base disk image. Furthermore, when it is necessary to start other virtual machines for running the target cloud application, the electronic device can obtain the application base disk image based on the snapshot, and start other virtual machines based on the obtained application base disk image.
[0139] Accordingly, the above step S102 may include the following steps: obtaining a snapshot of the application base disk image; and obtaining the application base disk image according to the snapshot.
[0140] In the embodiment of the present application, when the electronic device needs to start a new virtual machine for running the target cloud application, if there is a snapshot of the corresponding application base disk image, it indicates that other virtual machines for running the target cloud application have been started before. At this time, the electronic device can obtain the snapshot and restore the snapshot to obtain the application base disk image corresponding to the target cloud application, and then use the application base disk image as a data disk to start a new virtual machine to run the target cloud application in the new virtual machine.
[0141] In one embodiment, the method may further include the following steps:
[0142] When the target cloud application needs to be updated, the application base disk image is updated according to the updated basic data of the target cloud application through the first virtual machine to update the application base disk image; and a snapshot of the application base disk image is generated.
[0143] In an embodiment of the present application, if the designated data disk image represents a cloud disk, when the target cloud application is updated, the electronic device may also update the target cloud application running in the virtual machine.
[0144] In one implementation, the electronic device can obtain the latest version of the target cloud application through the first virtual machine and install it in a specified directory. Then, the first virtual machine can be shut down. Based on this, the basic data in the application base disk image can be updated to update the application base disk image.
[0145] Correspondingly, if the latest version of the target cloud application is to be run in its virtual machine, the virtual machine can be started directly based on the above step S1033 based on the new application base disk image.
[0146] In addition, after updating the application base disk image, a snapshot of the updated application base disk image can be generated, that is, the snapshot is updated. Correspondingly, if a new virtual machine for running the target cloud application is to be started, the application base disk image corresponding to the latest version of the target cloud application can be obtained based on the new snapshot. The new application base disk image is used as a data disk to start the virtual machine, and the latest version of the target cloud application can be run in the new virtual machine.
[0147] In one embodiment, when the target cloud application needs to be updated, a new application base disk image can also be generated based on the latest version of the target cloud application based on the above steps S1021, S10221 and S10222.
[0148] Based on the above processing, restoring the application base disk image based on the snapshot between multiple virtual machines can increase the speed of obtaining the application base disk image, and further improve the efficiency of running the target cloud application.
[0149] See also Figure 8 , Figure 8 A schematic diagram of the principles of running a cloud application provided in an embodiment of the present application.
[0150] The electronic device merges the Kernel, Ramdisk and System partitions to obtain the system base disk image (system_base.qcow2) corresponding to the Android system. Generate a system incremental disk image (disk1.qcow2) based on the system base disk image. Create an empty cloud disk image (i.e., specify a data disk image, data), format it, and create a / data partition. Start the second virtual machine based on the system incremental disk image and the specified data disk image, and install the target cloud application (e.g., a game cloud application) through the second virtual machine, that is, write the game data of the game cloud application to the specified data disk image to obtain the application base disk image. Then, the second virtual machine can be shut down. The electronic device can also generate a snapshot of the application base disk image (data_base (game installed).snapshot). The application base disk image is obtained based on snapshot recovery, and the first virtual machine is started based on the application base disk image and the system incremental disk image to run the game cloud application in the first virtual machine.
[0151] When the game cloud application is updated, based on the first virtual machine, the game cloud application is updated after entering the Android system to update the application base disk image, and the first virtual machine is closed after completion. Then, a snapshot of the updated application base disk image is generated. Accordingly, the electronic device can use the new snapshot to restore the application base disk image and start a new virtual machine.
[0152] Based on the same inventive concept, the present application embodiment also provides a cloud application running device, see Fig. 9 , Fig. 9 A structural diagram of a cloud application running device provided in an embodiment of the present application, the device includes:
[0153] The system incremental disk image acquisition module 901 is used to acquire the system incremental disk image corresponding to the Android system; wherein the system incremental disk image is used to record the data generated during the operation of the Android system;
[0154] An application basic disk image acquisition module 902 is used to acquire an application basic disk image containing basic data of a target cloud application to be run;
[0155] The first virtual machine startup module 903 is used to start the first virtual machine based on the system incremental disk image and the application basic disk image, so as to run the target cloud application in the first virtual machine.
[0156] Optionally, the application base disk image acquisition module 902 includes:
[0157] A second virtual machine startup submodule, used to start the second virtual machine based on the system incremental disk image and the specified data disk image; wherein the specified data disk image is used to record the data of the cloud application;
[0158] The application basic disk image acquisition submodule is used to write the basic data of the target cloud application to be run into the specified data disk image through the second virtual machine to obtain the application basic disk image.
[0159] Optionally, the designated data disk image represents a local disk;
[0160] The application basic disk image acquisition submodule is specifically used to write the basic data of the target cloud application to be run into the designated data disk image through the second virtual machine to obtain the standby data disk image;
[0161] The properties of the backup data disk image are modified to be the base disk image of the target cloud application program, so as to obtain the application base disk image.
[0162] Optionally, the first virtual machine startup module 903 includes:
[0163] An application incremental disk image acquisition submodule is used to create an incremental disk image corresponding to the application base disk image as an application incremental disk image; wherein the application incremental disk image is used to record data generated by the target cloud application during operation;
[0164] The first virtual machine startup submodule is used to start the first virtual machine using the system incremental disk image as the system disk and the application incremental disk image as the data disk, so as to run the target cloud application in the first virtual machine.
[0165] Optionally, the device further comprises:
[0166] An application base disk image update module, used to update the basic data in the application base disk image through the first virtual machine when the target cloud application needs to be updated;
[0167] The data in the application incremental disk image is added to the application base disk image to update the application base disk image.
[0168] Optionally, the specified data disk image represents a cloud disk;
[0169] The first virtual machine startup module 903 is specifically used to start the first virtual machine using the system incremental disk image as the system disk and the application basic disk image as the data disk, so as to run the target cloud application in the first virtual machine.
[0170] Optionally, the application base disk image acquisition module 902 includes:
[0171] A snapshot acquisition submodule, used to acquire a snapshot of the application base disk image;
[0172] The application basic disk image acquisition submodule is used to acquire the application basic disk image according to the snapshot.
[0173] Optionally, the device further comprises:
[0174] An application base disk image update module, used to update the application base disk image according to the updated basic data of the target cloud application through the first virtual machine when the target cloud application needs to be updated, so as to update the application base disk image;
[0175] The snapshot generation module is used to generate a snapshot of the application base disk image.
[0176] Optionally, the system incremental disk image acquisition module 901 includes:
[0177] A system base disk image acquisition submodule is used to create a system base disk image corresponding to the Android system; wherein the system base disk image includes: the kernel of the Android system, the startup data of the Android system, and the system files of the Android system;
[0178] The system incremental disk image acquisition submodule is used to create an incremental disk image corresponding to the system basic disk image as the system incremental disk image.
[0179] The present application also provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.
[0180] Memory 1003, used for storing computer programs;
[0181] The processor 1001 is used to execute the program stored in the memory 1003, and implements the following steps:
[0182] Obtaining a system incremental disk image corresponding to the Android system; wherein the system incremental disk image is used to record data generated during the operation of the Android system;
[0183] Obtain an application base disk image containing basic data of the target cloud application to be run;
[0184] Based on the system incremental disk image and the application base disk image, a first virtual machine is started to run the target cloud application in the first virtual machine.
[0185] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0186] The communication interface is used for communication between the above electronic device and other devices.
[0187] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0188] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0189] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned cloud application running methods are implemented.
[0190] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the cloud application running methods in the above embodiments.
[0191] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0192] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0193] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0194] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A cloud application running method, characterized in that: The method comprises: Obtaining a system incremental disk image corresponding to the Android system; wherein the system incremental disk image is used to record data generated during the operation of the Android system; Acquire an application base disk image containing basic data of a target cloud application to be run; the acquiring of the application base disk image containing basic data of a target cloud application to be run comprises: starting a second virtual machine based on the system incremental disk image and a designated data disk image; wherein the designated data disk image is used to record data of the cloud application; and writing the basic data of the target cloud application to be run into the designated data disk image through the second virtual machine to obtain an application base disk image; Based on the system incremental disk image and the application base disk image, the first virtual machine is started to run the target cloud application in the first virtual machine; based on the system incremental disk image and the application base disk image, the first virtual machine is started to run the target cloud application in the first virtual machine, including: creating an incremental disk image corresponding to the application base disk image as an application incremental disk image; wherein the application incremental disk image is used to record data generated by the target cloud application during operation; using the system incremental disk image as the system disk and the application incremental disk image as the data disk, the first virtual machine is started to run the target cloud application in the first virtual machine.
2. The method according to claim 1, characterized in that The designated data disk image represents a local disk; The step of writing the basic data of the target cloud application to be run into the designated data disk image through the second virtual machine to obtain the application basic disk image includes: Writing the basic data of the target cloud application to be run into the designated data disk image through the second virtual machine to obtain a standby data disk image; The properties of the backup data disk image are modified to be the base disk image of the target cloud application program, so as to obtain the application base disk image.
3. The method according to claim 1, characterized in that The method further comprises: When the target cloud application needs to be updated, the basic data in the application basic disk image is updated through the first virtual machine; The data in the application incremental disk image is added to the application base disk image to update the application base disk image.
4. The method according to claim 1, characterized in that The designated data disk image represents a cloud disk; The starting a first virtual machine based on the system incremental disk image and the application base disk image to run the target cloud application in the first virtual machine includes: The system incremental disk image is used as the system disk, and the application basic disk image is used as the data disk, and the first virtual machine is started to run the target cloud application in the first virtual machine.
5. The method according to claim 4, characterized in that The step of obtaining an application base disk image containing basic data of a target cloud application to be run includes: Obtaining a snapshot of the application base disk image; According to the snapshot, the application base disk image is obtained.
6. The method according to claim 4, characterized in that The method further comprises: When the target cloud application needs to be updated, the application base disk image is updated according to the updated basic data of the target cloud application through the first virtual machine to update the application base disk image; Generate a snapshot of the application base disk image.
7. The method according to any one of claims 1 to 6, characterized in that: The step of obtaining the system incremental disk image corresponding to the Android system includes: Creating a system base disk image corresponding to the Android system; wherein the system base disk image includes: the kernel of the Android system, the startup data of the Android system, and the system files of the Android system; An incremental disk image corresponding to the system basic disk image is created as the system incremental disk image.
8. A cloud application running device, characterized in that: The device comprises: A system incremental disk image acquisition module, used to acquire a system incremental disk image corresponding to the Android system; wherein the system incremental disk image is used to record data generated during the operation of the Android system; An application basic disk image acquisition module is used to acquire an application basic disk image containing basic data of a target cloud application to be run; the application basic disk image acquisition module includes: a second virtual machine startup submodule, used to start a second virtual machine based on the system incremental disk image and a specified data disk image; wherein the specified data disk image is used to record data of a cloud application; an application basic disk image acquisition submodule, used to write the basic data of the target cloud application to be run into the specified data disk image through the second virtual machine to obtain an application basic disk image; The first virtual machine startup module is used to start the first virtual machine based on the system incremental disk image and the application basic disk image, so as to run the target cloud application in the first virtual machine; the first virtual machine startup module includes: an application incremental disk image acquisition submodule, used to create an incremental disk image corresponding to the application basic disk image as an application incremental disk image; wherein the application incremental disk image is used to record data generated by the target cloud application during operation; the first virtual machine startup submodule is used to start the first virtual machine with the system incremental disk image as the system disk and the application incremental disk image as the data disk, so as to run the target cloud application in the first virtual machine.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Cloud desktop upgrading method and device, cloud server and storage medium
CN111221537A
Camera calling method of Android system virtual machine, electronic equipment and storage medium
CN113784049A
