WO2021254280A1 - Disk mounting method and device, storage medium, and electronic device - Google Patents

Disk mounting method and device, storage medium, and electronic device Download PDF

Info

Publication number
WO2021254280A1
WO2021254280A1 PCT/CN2021/099815 CN2021099815W WO2021254280A1 WO 2021254280 A1 WO2021254280 A1 WO 2021254280A1 CN 2021099815 W CN2021099815 W CN 2021099815W WO 2021254280 A1 WO2021254280 A1 WO 2021254280A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
disk
virtual machine
private data
data
Prior art date
Application number
PCT/CN2021/099815
Other languages
French (fr)
Chinese (zh)
Inventor
冯茂
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021254280A1 publication Critical patent/WO2021254280A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Definitions

  • the embodiments of the present application relate to the field of communications, and in particular, to a disk mounting method, device, storage medium, and electronic device.
  • cloud-based set-top boxes are one of the development directions. That is, the thin client direction, the application and implementation are all Completed in the cloud, the client just sends the corresponding command, and the feedback operation interface is obtained from the cloud.
  • the embodiments of the present application provide a disk mounting method, device, storage medium, and electronic device, to at least solve some situations in the art that the clouded Android virtual machine needs to be expanded due to insufficient memory, and excessive memory space is allocated, and users try to play Or the problem of resource waste caused by long-term non-use of the application.
  • a method for mounting a disk which includes: detecting application startup, and deriving an application disk corresponding to a virtual machine based on the application master disk of the application; and combining the application disk and the application disk
  • the private data disk is mounted to the virtual machine, wherein the virtual machine is configured to recognize the application in the application disk and load the application into the system, and the private data disk is configured to Store the data of the application.
  • a disk mounting method applied to a virtual machine including: identifying an application in an application disk; loading the application into the system, wherein the application disk is a server detection When the application starts, it is derived from the application master disk and mounted to the virtual machine. At the same time, the server mounts the private data disk of the application to the virtual machine, and the private data disk Is configured to store data of the application.
  • a disk mounting device which includes: a differential module configured to detect application startup, and differentiate an application disk corresponding to a virtual machine according to the application master disk of the application; and the mounting module , Configured to mount the application disk and the private data disk of the application to the virtual machine, wherein the virtual machine is configured to identify the application in the application disk, and to The application is loaded into the system, and the private data disk is configured to store data of the application.
  • a disk mounting device applied to a virtual machine including: an identification module configured to identify an application in an application disk; a first loading module configured to load the application Loaded into the system, where the application disk is derived from the application master disk when the server detects that the application is started and mounted to the virtual machine.
  • the server saves the private data disk of the application Mounted to the virtual machine, the private data disk is configured to store data of the application.
  • a computer-readable storage medium having a computer program stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the above methods when running Steps in the embodiment.
  • an electronic device including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute any of the above Steps in the method embodiment.
  • FIG. 1 is a block diagram of the hardware structure of a mobile terminal of a disk mounting method according to an embodiment of the present application
  • Fig. 2 is a first flowchart of a disk mounting method according to an embodiment of the present application
  • Fig. 3 is a second flowchart of a disk mounting method according to an embodiment of the present application.
  • Figure 4 is a flowchart of a personalized disk creation according to an embodiment of the present application.
  • Figure 5 is a flowchart of a personalized disk mounting according to an embodiment of the present application.
  • Figure 6 is a flowchart of a personalized disk upgrade according to an embodiment of the present application.
  • Fig. 7 is a first structural block diagram of a disk mounting device according to an embodiment of the present application.
  • Fig. 8 is a second structural block diagram of a disk mounting device according to an embodiment of the present application.
  • FIG. 1 is a block diagram of the hardware structure of the mobile terminal of the disk mounting method according to the embodiment of the present application.
  • the mobile terminal may include one or more (only shown in FIG. A)
  • a processor 102 the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned mobile terminal may also include a communication function
  • the transmission device 106 and the input and output device 108 may be executed in a mobile terminal, a computer terminal or a similar computing device.
  • FIG. 1 is a block diagram of the hardware structure of the mobile terminal of the disk mounting method according to the embodiment of the present application.
  • the mobile terminal may include one or more (only shown in FIG. A)
  • a processor 102 the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104
  • FIG. 1 is only for illustration, and does not limit the structure of the above-mentioned mobile terminal.
  • the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration from that shown in FIG.
  • the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the disk mounting method in the embodiment of the present application.
  • the processor 102 executes the computer programs stored in the memory 104 by running Various functional applications and data processing, that is, to achieve the above methods.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the above-mentioned specific examples of the network may include a wireless network provided by a communication provider of a mobile terminal.
  • the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • the virtual machine corresponding to the virtual Android system is stored in the cloud server, and the end user is more connected to the server through the remote connection protocol FreeRDP/Spice, etc., similar to the Windows remote desktop connection, connecting to the corresponding virtual machine, and The corresponding screen is transmitted back to the terminal.
  • the virtual machine of the native Android system basically maintains one copy, that is, the same content is copied into multiple copies for use after different users log in.
  • the corresponding virtual machines have been started in advance and entered the Android environment to wait for the user to log in.
  • the private data generated by each user can only be stored in the virtual machine.
  • the virtual machine is used by other users, only the previous user's use environment can be seen ,
  • the disk corresponding to the virtual machine is not completely separated from the private environment and data of each user, which is inconvenient for the unified management of VSTB. Therefore, there is a demand for VSTB user private data, that is, the public disk corresponding to the virtual machine is as complete as possible with the user data.
  • the public disk corresponding to the virtual machine can be the same for all users, and user data needs to be stored in other disks or network storage paths.
  • the user's installed application package is placed in the /data/app directory, and the user's private data is generally stored in the /data/data/ and built-in /sdcard directories.
  • the application is installed in an external sdcard or disk, but the application installation package is placed in the external sdcard or disk.
  • the application data and application installation information still need to be saved in the android system, so the application in the external disk It cannot be used by other virtual machines and cannot be shared with other android devices.
  • FIG. 2 is a flowchart of the disk mounting method according to an embodiment of the present application, as shown in FIG. 2. , The process includes the following steps:
  • Step S202 Detect the application startup, and obtain the application disk corresponding to the virtual machine according to the application master disk of the application. Specifically, when the user opens the application, the application disk corresponding to the virtual machine is derived according to the application master disk difference;
  • Step S204 Mount the application disk and the private data disk of the application to the virtual machine, where the virtual machine is configured to identify the application in the application disk and load the application into the system, and the private data disk is configured as storage Application data.
  • the virtual machine before mounting the application disk and the private data disk of the application to the virtual machine, determine whether there is a private data disk of the application; if there is a private data disk of the application, obtain the private data disk of the application; if not There is a private data disk for the application, and a private data disk for the application is created.
  • the integrity of the application installation file in the application disk is verified to ensure that the application installation file in the application disk is complete and valid.
  • the incremental upgrade file of the application pushed by the virtual machine is received; the application of the virtual machine in the non-running state according to the incremental upgrade file
  • the disk is upgraded, and/or, after the application in the running virtual machine is exited, the application disk of the virtual machine is upgraded if the application has not been upgraded.
  • the application installation package or application resource package has a push update
  • the application or application resource package is updated to the application disk; after the application update is completed, the update resource is pushed to the application master disk; after the application master disk update is completed, push Applying the master disk to the user disk upgrade of each virtual machine can reduce the operation of users and operation and maintenance personnel, and at the same time reduce the occupation of network resources by the virtual machine.
  • the installation data can be divided into two parts: the installation package data and the user's private application data.
  • the installation package data is theoretically universal to all users and can be shared among different users; private application data belongs to the user's private data, mainly including the user's account information, progress information, and chat information.
  • the application can be used like a disk, that is, mounted and used, then the operation and maintenance personnel do not need to consider the virtual machine memory problem.
  • the application installation package can be installed on the application disk, and the existing application data loading process of the android system can be modified at the same time to directly read the data in the user data disk; during the running of the game, The user data produced can be directly stored in the private data disk; also for the inconvenience of disk application update, a personalized disk upgrade update plan is proposed.
  • the personalized disk mounting program can be divided into three parts: personalized disk production, personalized disk mounting, and personalized disk upgrade.
  • Personalized disk production mainly implements the installation of application installation package data and private application data in the application master disk and application data disk respectively, and then pushes them to users for use.
  • the existing android system does not support the installation of an application on a disk or an sdcard. In this embodiment, it is necessary to modify the native installation process of the android system and re-specify the installation path of the application.
  • the personalized disk mounting mainly realizes the identification of the application in the disk and the normal operation of the application.
  • the private data generated by the application is saved in the application data disk.
  • the corresponding virtual machine is derived based on the application master disk difference The application disk; and then create a private application data disk based on the original application data disk.
  • the virtual machine opens the application, loads the data in the private data disk, and reads the user's historical data.
  • the private data generated by the application is written in the user's private data disk; when the user exits the application, the loading information of the application is cleared, and the disk is unloaded at the same time.
  • the personalized disk upgrade part mainly realizes the functions of application upgrade and application resource package upgrade, and solves the problem of manual upgrade by all users or unified upgrade by operation and maintenance personnel. Specifically, when the application installation package or application resource package has a push update, the user opens the application When the time, update the application or application resource package to the application disk; after the application update is completed, push the update resource to the application master disk; after the application master disk update is completed, push the application master disk to each virtual machine user.
  • the application disk can be mounted and used immediately, eliminating the need for application installation steps. Since the application does not need to be installed on the virtual machine, the memory space occupied by the virtual machine itself can be reduced; the application master disk can be shared between the virtual machines, further different users use the space occupied by the application; the application is no longer used, no need to uninstall, directly delete the corresponding Just apply the disk, which is convenient for operation and maintenance management. At the same time, the personalized disk upgrade program can reduce the operations of users and operation and maintenance personnel, and at the same time reduce the occupation of network resources by virtual machines.
  • FIG. 3 is a flowchart of the disk mounting method according to an embodiment of the present application. As shown in FIG. 3, the process is shown in FIG. Including the following steps:
  • Step S302 Identify the application in the application disk
  • the above step S302 may specifically include: scanning the path where the application disk is mounted, and identifying the installation file of the application under the path.
  • step S304 the application is loaded into the system, where the application disk is derived from the application master disk when the server detects that the application is started and mounted to the virtual machine.
  • the server mounts the private data disk of the application to the virtual machine.
  • the private data disk is configured to store data of the application.
  • the above step S304 may specifically include: parsing the installation file to obtain application information, and updating the application information to the system; modifying the file permissions in the private data disk according to the application information; broadcasting application installation in the system Success message.
  • the virtual machine opens the application, loads the data in the private data disk, reads the user's historical data, and at the same time writes the private data generated by the application in the user's private data disk.
  • the application is opened and the data in the private data disk is loaded.
  • the path of the application data is modified to the private data disk To load the data in the private data disk; read the historical data of the application and write the data generated by the application to the private data disk.
  • the application requests the application data, the application The application data path of is modified to the path of the private data disk to write the data generated by the application into the private data disk.
  • the loading information of the application is cleared, and the application disk and the private data disk are unloaded at the same time.
  • the installation path of the application is updated, and the installation file is updated to the application disk; the updated application disk and the application master disk are compared to generate an incremental upgrade file; and the server is pushed The incremental upgrade file of the application, where the incremental upgrade file is used by the server to upgrade the application disk of the virtual machine in the non-running state, and/or, after the application in the virtual machine in the running state is exited, the application If the upgrade is not completed, upgrade the application disk of the virtual machine.
  • the android application when the android application is installed on the external disk, the application can be installed on the application disk and the user private data disk respectively; when the disk is mounted, different android virtual machine devices can identify the application and user data in the disk. It can be used normally without installation. In turn, it solves the problems of resource waste caused by the existing cloudized Android virtual machine due to insufficient memory and need to expand due to insufficient memory, excessive allocation of memory space, and resource waste caused by users trying to play or not using applications for a long time. There is no need for users to manually install the application, and the application in the disk can be used by mounting the disk.
  • the disk can be applied to different Android virtual machines, and there is no need to care about the remaining space of the Android virtual machine, including:
  • Step 1 When the new push application goes online, first create the application master disk of the game application and the original private application data disk through the personalized disk creation function.
  • Figure 4 is a flowchart of the personalized disk creation according to an embodiment of the application. As shown in Figure 4, it includes:
  • Step S401 push the application online
  • Step S402 judge whether the application is installed in the disk, if the judgment result is no, execute step S403, otherwise, execute step S404;
  • Step S404 mount the game master disk and the private data disk, that is, respectively mount the empty application master disk and the private application data disk to the designated private mount directory of the virtual machine;
  • step S405 when the application is installed, the installation path of the application in the system installd is modified, and the application installation package and application data are respectively installed in different disks;
  • Step S406 After the application is successfully installed, MD5 information of the file in the application master disk is generated and stored in the server to provide integrity verification for subsequent mounting.
  • Fig. 5 is a flowchart of a personalized disk mounting according to an embodiment of the present application, as shown in Fig. 5, including:
  • Step S501 when the application is opened, trigger the virtual machine to mount the corresponding application disk and private data disk, where the application disk is differentiated from the application master disk; firstly, determine whether the user has a private data disk for the application, if not, then Create a new private data disk for the user based on the original application data disk.
  • Step S502 if the application disk and the private data disk are mounted normally, MD5 value verification is performed on the files in the application disk;
  • step S503 the virtual machine scans and recognizes the application in the application disk, and loads the application into the system. Specifically include the following steps:
  • Step S5031 calling PMS (PackageManagerService) to scan the path where the disk is mounted, and then identifying the application installation file under the path;
  • PMS PackageManagerService
  • Step S5032 call PackageParse to parse the application installation file, and update the application information to the system;
  • Step S5033 according to the parsed application installation file, change the file permissions (including user groups, user permissions, etc.) in the private data disk;
  • Step S5034 Send a broadcast message that the application is successfully installed in the system.
  • step S504 the virtual machine starts the application, loads the data in the private data disk, and reads the historical data of the user. At the same time, write the private data generated by the application in the user's private data disk, including:
  • step S5041 in the application process created by the android system through zygote, the path of the application data is modified to the path of the private application data disk, so as to ensure the normal loading of the game.
  • step S5042 when the application requests application data, the application data path of the application is dynamically changed to the path of the user's private data disk, so that the user data can be directly stored in the disk for reading and writing.
  • step S505 when the user exits the application, the loading information of the application is cleared, and the disk is unmounted at the same time.
  • FIG. 6 is a flowchart of a personalized disk upgrade according to an embodiment of the present application, as shown in FIG. 6, including:
  • Step S601 the application is updated online, and the game application disk is updated. Specifically, when the user opens the application and the application installation package or application resource package has a push update, the installation path of the application or application resource package is updated, and the application is updated to the game disk , Upload the incremental upgrade package file to the server.
  • step S602 the updated game disk is compared with the original game master disk, and an incremental upgrade file package is generated.
  • Step S603 It is judged whether the virtual machine is running the game application, if the judgment result is yes, step S604 is executed, otherwise, step S606 is executed;
  • Step S604 when the application exits, push the upgrade
  • Step S605 it is judged whether the application disk has been upgraded, if the judgment result is no, step S606 is executed, otherwise, step S607 is executed;
  • Step S606 upgrade the application disk
  • Step S607 the upgrade is completed.
  • the server queries the running status of the current application in each android virtual machine. If it is not running, it pushes the incremental upgrade package to the application disk of the corresponding virtual machine for upgrade, and reports the upgrade information to the server; otherwise, when waiting for the application to exit, Determine whether the application has been upgraded, if not, continue to push the upgrade.
  • a disk mounting device is also provided, which is used to implement the above-mentioned embodiment and other implementation manners, and those that have been described will not be repeated.
  • the term "module” can implement a combination of software and/or hardware with predetermined functions.
  • the device described in the following embodiments can be implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
  • Fig. 7 is a structural block diagram 1 of a disk mounting device according to an embodiment of the present application. As shown in Fig. 7, the device includes:
  • the difference module 72 is configured to detect the startup of an application, and differentiate the application disk corresponding to the virtual machine according to the application master disk of the application;
  • the mounting module 74 is configured to mount the application disk and the private data disk of the application to the virtual machine, where the virtual machine is configured to recognize the application in the application disk and load the application into the system.
  • the data disk is configured to store application data.
  • the device further includes:
  • the judgment module is configured to judge whether there is a private data disk of the application
  • the obtaining module is configured to obtain the private data disk of the application when the judgment result is yes;
  • the creation module is configured to create a private data disk of the application when the judgment result is no.
  • the device further includes:
  • the verification module is configured to verify the integrity of the application installation file in the application disk.
  • the device further includes:
  • the receiving module is configured to receive incremental upgrade files of the application pushed by the virtual machine
  • the upgrade module is configured to upgrade the application disk of the virtual machine in the non-running state according to the incremental upgrade file, and/or, after exiting the application in the virtual machine in the running state, the application has not been upgraded Next, upgrade the application disk of the virtual machine.
  • each of the above-mentioned modules can be implemented by software or hardware.
  • it can be implemented in the following way, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are in any combination The forms are located in different processors.
  • a disk mounting device is also provided, which is used to implement the above-mentioned embodiment and other implementation manners, and those that have been described will not be repeated.
  • the term "module” can implement a combination of software and/or hardware with predetermined functions.
  • the device described in the following embodiments can be implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
  • Fig. 8 is a second structural block diagram of a disk mounting device according to an embodiment of the present application. As shown in Fig. 8, the device includes:
  • the identification module 82 is configured to identify applications in the application disk
  • the first loading module 84 is configured to load the application into the system, where the application disk is differentiated according to the application mother disk when the server detects that the application is started, and is mounted to the virtual machine. At the same time, the server keeps the application private The data disk is mounted to the virtual machine, and the private data disk is configured to store application data.
  • the aforementioned identification module 82 includes:
  • the scanning sub-module is configured to scan the path where the application disk is mounted
  • the identification sub-module is configured to identify the installation file of the application under the path.
  • the aforementioned first loading module 84 includes:
  • the parsing sub-module is configured to parse the installation file, obtain application information, and update the application information to the system;
  • the modification sub-module is configured to modify the file permissions in the private data disk according to the application information
  • the broadcast sub-module is configured to broadcast a message of successful application installation in the system.
  • the device further includes:
  • the second loading module is configured to open the application and load the data in the private data disk
  • the writing module is configured to read historical data of the application and write the data generated by the application into the private data disk.
  • the aforementioned second loading module is further configured to modify the path of the application data to the path of the private data disk when the system creates the application process, so as to load the data in the private data disk;
  • the above-mentioned writing module is also configured to modify the application data path of the application to the path of the private data disk when the application requests application data, so as to write the data generated by the application into the private data disk.
  • the device further includes:
  • the unloading module is configured to clear the loading information of the application when the application exits, and unload the application disk and the private data disk at the same time.
  • the device further includes:
  • the update module is configured to update the installation path of the application when the installation file is updated, and update the installation file to the application disk;
  • the generation module is configured to compare the updated application disk with the application master disk, and generate an incremental upgrade file
  • the push module is configured to push the incremental upgrade file of the application to the server, where the incremental upgrade file is used by the server to upgrade the application disk of the virtual machine in the non-running state, and/or to the running state After the application in the virtual machine exits, the application disk of the virtual machine is upgraded if the application has not been upgraded.
  • each of the above-mentioned modules can be implemented by software or hardware.
  • it can be implemented in the following way, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are in any combination The forms are located in different processors.
  • the embodiment of the present application also provides a computer-readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
  • the above-mentioned computer-readable storage medium may include, but is not limited to: U disk, read-only memory (Read-Only Memory, ROM for short), Random Access Memory (RAM for short), mobile Various media that can store computer programs, such as hard disks, magnetic disks, or optical disks.
  • An embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
  • the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
  • the application when the application is started, the application is installed in the application disk and the user private data disk; when the disk is mounted, different virtual machine devices can recognize the application and user data in the disk, and can be used normally without installation. It can solve the problem of resource wasted due to insufficient memory of clouded Android virtual machines in some situations in this field, and the allocation of excessive memory space and the user's trial play or long-term non-use of the application lead to waste of resources, so that the user does not need to manually install the application and mount the disk That is, the applications in the disk can be used, and the disk can be applied to different virtual machines without considering the remaining space of the virtual machine.
  • modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices. Above, they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be executed in a different order than shown here. Or the described steps, or fabricate them into individual integrated circuit modules respectively, or fabricate multiple modules or steps of them into a single integrated circuit module to achieve. In this way, this application is not limited to any specific hardware and software combination.

Abstract

A disk mounting method and device. The method comprises: detecting startup of an application, and separating, from an application master disk of the application, an application disk corresponding to a virtual machine (S202); and mounting the application disk and a private data disk of the application to the virtual machine, wherein the virtual machine is configured to recognize the application in the application disk and to load the application to a system, and the private data disk is configured to store data of the application (S204).

Description

磁盘挂载方法、装置、存储介质以及电子装置Disk mounting method, device, storage medium and electronic device
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202010546757.6、申请日为2020年6月15日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with an application number of 202010546757.6 and an application date of June 15, 2020, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into this application.
技术领域Technical field
本申请实施例涉及通信领域,具体而言,涉及一种磁盘挂载方法、装置、存储介质以及电子装置。The embodiments of the present application relate to the field of communications, and in particular, to a disk mounting method, device, storage medium, and electronic device.
背景技术Background technique
目前为了实现机顶盒的统一管理,降低终端机顶盒性能要求和运营成本,解决新老机顶盒用户视频体验差异等诸多问题,云化机顶盒就是其中的一个发展方向.也就是瘦客户机方向,应用和实现都在云端完成,客户机只是发送相应的命令,反馈操作界面都是从云端获得。At present, in order to achieve unified management of set-top boxes, reduce terminal set-top box performance requirements and operating costs, and solve many problems such as the difference in video experience between new and old set-top boxes, cloud-based set-top boxes are one of the development directions. That is, the thin client direction, the application and implementation are all Completed in the cloud, the client just sends the corresponding command, and the feedback operation interface is obtained from the cloud.
如何有效减少Android虚拟机的资源分配成为云化安卓领域的一个关键问题。传统的外挂磁盘的方式,由于无法在其他android设备上上共享应用,因此在要求用户必须在登陆在指定虚拟机设备上,无法保证负载均衡,提升设备的利用率;同时分配给用户较大磁盘空间时,由于无法重复利用,同样也会造成资源空间的浪费。How to effectively reduce the resource allocation of Android virtual machines has become a key issue in the cloudized Android field. In the traditional way of external disks, because applications cannot be shared on other Android devices, users are required to log in to the designated virtual machine device, which cannot guarantee load balance and improve the utilization of the device; at the same time, larger disks are allocated to users In the case of space, since it cannot be reused, it will also cause a waste of resource space.
发明内容Summary of the invention
本申请实施例提供了一种磁盘挂载方法、装置、存储介质以及电子装置,以至少解决本领域一些情形中云化安卓虚拟机因为内存不足需要扩容,且分配过大内存空间和用户试玩或长期不使用应用导致资源浪费的问题。The embodiments of the present application provide a disk mounting method, device, storage medium, and electronic device, to at least solve some situations in the art that the clouded Android virtual machine needs to be expanded due to insufficient memory, and excessive memory space is allocated, and users try to play Or the problem of resource waste caused by long-term non-use of the application.
根据本申请的一个实施例,提供了一种磁盘挂载方法,包括:检测应用启动,根据所述应用的应用母盘差分出对应虚拟机的应用磁盘;将所述应用磁盘和所述应用的私有数据盘挂载到所述虚拟机中,其中,所述虚拟机被配置为识别所述应用磁盘中的所述应用,并将所述应用加载到系统中,所述私有数据盘被配置为存储所述应用的数据。According to an embodiment of the present application, a method for mounting a disk is provided, which includes: detecting application startup, and deriving an application disk corresponding to a virtual machine based on the application master disk of the application; and combining the application disk and the application disk The private data disk is mounted to the virtual machine, wherein the virtual machine is configured to recognize the application in the application disk and load the application into the system, and the private data disk is configured to Store the data of the application.
根据本申请的另一个实施例,提供了一种磁盘挂载方法,应用于虚拟机,包括:识别应用磁盘中的应用;将所述应用加载到系统中,其中,所述应用磁盘是服务器检测到应用启动时,根据所述应用母盘差分出并挂载到所述虚拟机中的,同时所述服务器将所述应用的私有数据盘挂载到所述虚拟机中,所述私有数据盘被配置为存储所述应用的数据。According to another embodiment of the present application, there is provided a disk mounting method applied to a virtual machine, including: identifying an application in an application disk; loading the application into the system, wherein the application disk is a server detection When the application starts, it is derived from the application master disk and mounted to the virtual machine. At the same time, the server mounts the private data disk of the application to the virtual machine, and the private data disk Is configured to store data of the application.
根据本申请的另一个实施例,提供了一种磁盘挂载装置,包括:差分模块,被配置为检测应用启动,根据所述应用的应用母盘差分出对应虚拟机的应用磁盘;挂载模块,被配置为将所述应用磁盘和所述应用的私有数据盘挂载到所述虚拟机中,其中,所述虚拟机被配置为识别所述应用磁盘中的所述应用,并将所述应用加载到系统中,所述私有数据盘被配置为存储所述应用的数据。According to another embodiment of the present application, there is provided a disk mounting device, which includes: a differential module configured to detect application startup, and differentiate an application disk corresponding to a virtual machine according to the application master disk of the application; and the mounting module , Configured to mount the application disk and the private data disk of the application to the virtual machine, wherein the virtual machine is configured to identify the application in the application disk, and to The application is loaded into the system, and the private data disk is configured to store data of the application.
根据本申请的另一个实施例,提供了一种磁盘挂载装置,应用于虚拟机,包括:识别模块,被配置为识别应用磁盘中的应用;第一加载模块,被配置为将所述应用加载到系统中,其中,所述应用磁盘是服务器检测到应用启动时,根据所述应用母盘差分出并挂载到 所述虚拟机中的,同时所述服务器将所述应用的私有数据盘挂载到所述虚拟机中,所述私有数据盘被配置为存储所述应用的数据。According to another embodiment of the present application, there is provided a disk mounting device applied to a virtual machine, including: an identification module configured to identify an application in an application disk; a first loading module configured to load the application Loaded into the system, where the application disk is derived from the application master disk when the server detects that the application is started and mounted to the virtual machine. At the same time, the server saves the private data disk of the application Mounted to the virtual machine, the private data disk is configured to store data of the application.
根据本申请的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to another embodiment of the present application, there is also provided a computer-readable storage medium having a computer program stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the above methods when running Steps in the embodiment.
根据本申请的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to another embodiment of the present application, there is also provided an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute any of the above Steps in the method embodiment.
附图说明Description of the drawings
图1是本申请实施例的磁盘挂载方法的移动终端的硬件结构框图;FIG. 1 is a block diagram of the hardware structure of a mobile terminal of a disk mounting method according to an embodiment of the present application;
图2是根据本申请实施例的磁盘挂载方法的流程图一;Fig. 2 is a first flowchart of a disk mounting method according to an embodiment of the present application;
图3是根据本申请实施例的磁盘挂载方法的流程图二;Fig. 3 is a second flowchart of a disk mounting method according to an embodiment of the present application;
图4是根据本申请实施例的个性化磁盘制作的流程图;Figure 4 is a flowchart of a personalized disk creation according to an embodiment of the present application;
图5是根据本申请实施例的个性化磁盘挂载的流程图;Figure 5 is a flowchart of a personalized disk mounting according to an embodiment of the present application;
图6是根据本申请实施例的个性化磁盘升级的流程图;Figure 6 is a flowchart of a personalized disk upgrade according to an embodiment of the present application;
图7是根据本申请实施例的磁盘挂载装置的结构框图一;Fig. 7 is a first structural block diagram of a disk mounting device according to an embodiment of the present application;
图8是根据本申请实施例的磁盘挂载装置的结构框图二。Fig. 8 is a second structural block diagram of a disk mounting device according to an embodiment of the present application.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本申请的实施例。Hereinafter, the embodiments of the present application will be described in detail with reference to the drawings and in conjunction with the embodiments.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the description and claims of the application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本申请实施例的磁盘挂载方法的移动终端的硬件结构框图,如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,其中,上述移动终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, FIG. 1 is a block diagram of the hardware structure of the mobile terminal of the disk mounting method according to the embodiment of the present application. As shown in FIG. 1, the mobile terminal may include one or more (only shown in FIG. A) A processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned mobile terminal may also include a communication function The transmission device 106 and the input and output device 108. Those of ordinary skill in the art can understand that the structure shown in FIG. 1 is only for illustration, and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration from that shown in FIG.
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的磁盘挂载方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the disk mounting method in the embodiment of the present application. The processor 102 executes the computer programs stored in the memory 104 by running Various functional applications and data processing, that is, to achieve the above methods. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而 可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of a mobile terminal. In an example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet. In an example, the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
虚拟Android系统对应的虚拟机存放在云端服务器中,终端用户更多的是通过远程连接协议FreeRDP/Spice等等连接到该服务器,类似Windows的远程桌面连接一样,连接到对应的虚拟机,并将相应的画面传回终端,为了统一管理,原生Android系统的虚拟机基本维持一份,也就是相同的内容复制成多个拷贝,供不同用户登录后使用,一般情况下为了加快登录速度和时间,对应的虚拟机都提前已经启动好并进入到Android环境来等待用户登入。The virtual machine corresponding to the virtual Android system is stored in the cloud server, and the end user is more connected to the server through the remote connection protocol FreeRDP/Spice, etc., similar to the Windows remote desktop connection, connecting to the corresponding virtual machine, and The corresponding screen is transmitted back to the terminal. For unified management, the virtual machine of the native Android system basically maintains one copy, that is, the same content is copied into multiple copies for use after different users log in. Generally, in order to speed up the login speed and time, The corresponding virtual machines have been started in advance and entered the Android environment to wait for the user to log in.
因为不同用户登录的都是已经启动好的Android系统,因此每个用户产生的私有数据只能存放在该虚拟机中,该虚拟机被其他用户使用时则只能看到上个用户的使用环境,没有把虚拟机对应的磁盘和每个用户的私有环境和数据完全分开,不方便VSTB的统一管理,因此就存在VSTB用户私有数据的需求,也就是虚拟机对应的公用磁盘尽量和用户数据完全分开,虚拟机对应的公用磁盘可以针对所有用户都相同,而用户数据需要存放在其他的磁盘或者网络存储路径下。Because different users log in to the Android system that has been started, the private data generated by each user can only be stored in the virtual machine. When the virtual machine is used by other users, only the previous user's use environment can be seen , The disk corresponding to the virtual machine is not completely separated from the private environment and data of each user, which is inconvenient for the unified management of VSTB. Therefore, there is a demand for VSTB user private data, that is, the public disk corresponding to the virtual machine is as complete as possible with the user data. Separately, the public disk corresponding to the virtual machine can be the same for all users, and user data needs to be stored in other disks or network storage paths.
在android系统中,用户的安装的应用包的是放在/data/app目录下,用户的私有数据一般存储在/data/data/和内置/sdcard的目录下。而本领域一些情形中的应用安装在外置sdcard或者磁盘中,只是将应用安装包放在外置sdcard或者磁盘中,应用数据和应用安装信息仍然需要保存在android系统中,因此外挂的磁盘中的应用是不能被其他虚拟机使用的,无法共享给其他android设备使用。In the Android system, the user's installed application package is placed in the /data/app directory, and the user's private data is generally stored in the /data/data/ and built-in /sdcard directories. In some cases in this field, the application is installed in an external sdcard or disk, but the application installation package is placed in the external sdcard or disk. The application data and application installation information still need to be saved in the android system, so the application in the external disk It cannot be used by other virtual machines and cannot be shared with other android devices.
针对上述问题,在本实施例中提供了一种运行于上述移动终端或网络架构的磁盘挂载方法,图2是根据本申请实施例的磁盘挂载方法的流程图一,如图2所示,该流程包括如下步骤:In response to the above problems, this embodiment provides a disk mounting method running on the above-mentioned mobile terminal or network architecture. FIG. 2 is a flowchart of the disk mounting method according to an embodiment of the present application, as shown in FIG. 2. , The process includes the following steps:
步骤S202,检测应用启动,根据该应用的应用母盘差分出对应虚拟机的应用磁盘,具体的,用户打开应用时,根据应用母盘差分出对应虚机的应用磁盘;Step S202: Detect the application startup, and obtain the application disk corresponding to the virtual machine according to the application master disk of the application. Specifically, when the user opens the application, the application disk corresponding to the virtual machine is derived according to the application master disk difference;
步骤S204,将应用磁盘和应用的私有数据盘挂载到虚拟机中,其中,该虚拟机被配置为识别应用磁盘中的应用,并将应用加载到系统中,该私有数据盘被配置为存储应用的数据。Step S204: Mount the application disk and the private data disk of the application to the virtual machine, where the virtual machine is configured to identify the application in the application disk and load the application into the system, and the private data disk is configured as storage Application data.
通过上述步骤S202至S204,应用启动时,将应用分别安装在应用磁盘和用户私有数据磁盘中;当磁盘挂载时,不同的虚拟机设备能识别磁盘中的应用和用户数据,无需安装即可正常使用,可以解决本领域一些情形中云化安卓虚拟机因为内存不足需要扩容,且分配过大内存空间和用户试玩或长期不使用应用导致资源浪费的问题,实现了无须用户手动安装应用,挂载磁盘即可使用磁盘中的应用,磁盘可以适用于不同的虚拟机,且不用考虑虚拟机的剩余空间。Through the above steps S202 to S204, when the application is started, the application is installed on the application disk and the user private data disk respectively; when the disk is mounted, different virtual machine devices can identify the application and user data in the disk without installation. Normal use can solve the problem of resource waste caused by cloudized Android virtual machines due to insufficient memory in some situations in this field, and excessive allocation of memory space and user trial play or long-term non-use of applications. This eliminates the need for users to manually install applications. Mount the disk to use the applications in the disk. The disk can be applied to different virtual machines without considering the remaining space of the virtual machine.
在一些实施例中,在将应用磁盘和应用的私有数据盘挂载到虚拟机中之前,判断是否存在应用的私有数据盘;若存在应用的私有数据盘,获取应用的私有数据盘;若不存在应用的私有数据盘,创建应用的私有数据盘。In some embodiments, before mounting the application disk and the private data disk of the application to the virtual machine, determine whether there is a private data disk of the application; if there is a private data disk of the application, obtain the private data disk of the application; if not There is a private data disk for the application, and a private data disk for the application is created.
在一些实施例中,在将应用磁盘和私有数据盘挂载到虚拟机中之后,对应用磁盘中的应用安装文件的完整性进行校验,以确保应用磁盘中的应用安装文件完整且有效。In some embodiments, after mounting the application disk and the private data disk in the virtual machine, the integrity of the application installation file in the application disk is verified to ensure that the application installation file in the application disk is complete and valid.
在一些实施例中,在将应用磁盘和私有数据盘挂载到虚拟机中之后,接收虚拟机推送的应用的增量升级文件;根据该增量升级文件对处于非运行状态的虚拟机的应用磁盘进行升级,和/或,对处于运行状态的虚拟机中的应用退出之后,在应用没有完成升级的情况 下,对虚拟机的应用磁盘进行升级。当应用安装包或应用资源包有推送更新时,用户打开应用时,更新应用或应用资源包到应用盘中;应用更新完成后,推送更新资源到应用母盘;应用母盘更新完成后,推送应用母盘到各个虚机用户磁盘升级可以减少用户和运维人员的操作,同时减少虚机对网络资源的占用。In some embodiments, after the application disk and the private data disk are mounted to the virtual machine, the incremental upgrade file of the application pushed by the virtual machine is received; the application of the virtual machine in the non-running state according to the incremental upgrade file The disk is upgraded, and/or, after the application in the running virtual machine is exited, the application disk of the virtual machine is upgraded if the application has not been upgraded. When the application installation package or application resource package has a push update, when the user opens the application, the application or application resource package is updated to the application disk; after the application update is completed, the update resource is pushed to the application master disk; after the application master disk update is completed, push Applying the master disk to the user disk upgrade of each virtual machine can reduce the operation of users and operation and maintenance personnel, and at the same time reduce the occupation of network resources by the virtual machine.
本实施例中,用户安装应用之后,可以将安装数据分为两个部分:安装包数据和用户的私有应用数据。其中,安装包数据理论上是对所有用户的都是通用的,可以在不同用户之间共享;私有应用数据属于用户的隐私数据,主要包括用户的账号信息、进度信息、以及聊天信息等。In this embodiment, after the user installs the application, the installation data can be divided into two parts: the installation package data and the user's private application data. Among them, the installation package data is theoretically universal to all users and can be shared among different users; private application data belongs to the user's private data, mainly including the user's account information, progress information, and chat information.
如果应用可以像磁盘一样,即挂载即使用,那么运维人员就不需要考虑虚拟机内存问题。If the application can be used like a disk, that is, mounted and used, then the operation and maintenance personnel do not need to consider the virtual machine memory problem.
本实施例的个性化磁盘挂载方案,可以将应用安装包安装在应用磁盘中,同时修改android系统现有的应用数据加载流程,直接读取用户数据盘中的数据;在游戏运行过程中,可以将生产的用户数据直接保存在私有数据盘中;同针对磁盘应用更新不便的问题,提出个性化的磁盘升级更新方案。In the personalized disk mounting solution of this embodiment, the application installation package can be installed on the application disk, and the existing application data loading process of the android system can be modified at the same time to directly read the data in the user data disk; during the running of the game, The user data produced can be directly stored in the private data disk; also for the inconvenience of disk application update, a personalized disk upgrade update plan is proposed.
个性化磁盘挂载方案可以分为三个部分:个性化磁盘制作、个性化磁盘挂载和个性化磁盘升级三个部分。The personalized disk mounting program can be divided into three parts: personalized disk production, personalized disk mounting, and personalized disk upgrade.
个性化磁盘制作主要实现将应用的安装包数据和私有应用数据分别安装在应用母盘和应用数据盘中,然后推送给用户使用。现有android系统不支持将应用安装在磁盘或者sdcard中,本实施例需要修改android系统的原生安装流程,重新指定应用的安装路径。Personalized disk production mainly implements the installation of application installation package data and private application data in the application master disk and application data disk respectively, and then pushes them to users for use. The existing android system does not support the installation of an application on a disk or an sdcard. In this embodiment, it is necessary to modify the native installation process of the android system and re-specify the installation path of the application.
个性化磁盘挂载主要实现磁盘中应用的识别,以及应用的正常运行,同时将应用产生的私有数据保存在应用数据盘中,具体地,用户打开应用时,根据应用母盘差分出对应虚拟机的应用磁盘;然后再根据原始的应用数据盘创建出应用的私有数据盘。最后把创建的磁盘挂载到对应虚拟机中;虚拟机扫描识别磁盘中的应用,并将应用加载到系统中。虚拟机打开应用,加载私有数据盘中的数据,读取用户的历史数据。同时将应用产生的私有数据写在用户的私有数据磁盘中;用户退出应用时,清除应用的加载信息,同时卸载磁盘。The personalized disk mounting mainly realizes the identification of the application in the disk and the normal operation of the application. At the same time, the private data generated by the application is saved in the application data disk. Specifically, when the user opens the application, the corresponding virtual machine is derived based on the application master disk difference The application disk; and then create a private application data disk based on the original application data disk. Finally, mount the created disk to the corresponding virtual machine; the virtual machine scans and recognizes the application in the disk, and loads the application into the system. The virtual machine opens the application, loads the data in the private data disk, and reads the user's historical data. At the same time, the private data generated by the application is written in the user's private data disk; when the user exits the application, the loading information of the application is cleared, and the disk is unloaded at the same time.
个性化磁盘升级部分主要实现应用升级以及应用资源包升级的功能,解决所有用户手动升级或者运维人员统一升级的问题,具体地,当应用安装包或应用资源包有推送更新时,用户打开应用时,更新应用或应用资源包到应用盘中;应用更新完成后,推送更新资源到应用母盘;应用母盘更新完成后,推送应用母盘到各个虚拟机用户。The personalized disk upgrade part mainly realizes the functions of application upgrade and application resource package upgrade, and solves the problem of manual upgrade by all users or unified upgrade by operation and maintenance personnel. Specifically, when the application installation package or application resource package has a push update, the user opens the application When the time, update the application or application resource package to the application disk; after the application update is completed, push the update resource to the application master disk; after the application master disk update is completed, push the application master disk to each virtual machine user.
本实施例,能够实现应用磁盘即时挂载即时使用,省去应用安装步骤。由于应用无需安装到虚拟机,可以减少虚拟机本身占用的内存空间;应用母盘可以在虚拟机之间共用,进一步不同用户使用应用占用的空间;应用不再使用,无需卸载,直接删除对应的应用磁盘即可,方便运维管理。同时个性化磁盘升级方案可以减少用户和运维人员的操作,同时减少虚拟机对网络资源的占用。In this embodiment, the application disk can be mounted and used immediately, eliminating the need for application installation steps. Since the application does not need to be installed on the virtual machine, the memory space occupied by the virtual machine itself can be reduced; the application master disk can be shared between the virtual machines, further different users use the space occupied by the application; the application is no longer used, no need to uninstall, directly delete the corresponding Just apply the disk, which is convenient for operation and maintenance management. At the same time, the personalized disk upgrade program can reduce the operations of users and operation and maintenance personnel, and at the same time reduce the occupation of network resources by virtual machines.
根据本申请的另一个实施例,还提供了一种磁盘挂载方法,应用于虚拟机,图3是根据本申请实施例的磁盘挂载方法的流程图二,如图3所示,该流程包括如下步骤:According to another embodiment of the present application, a disk mounting method is also provided, which is applied to a virtual machine. FIG. 3 is a flowchart of the disk mounting method according to an embodiment of the present application. As shown in FIG. 3, the process is shown in FIG. Including the following steps:
步骤S302,识别应用磁盘中的应用;Step S302: Identify the application in the application disk;
在一些实施例中,上述步骤S302具体可以包括:扫描应用磁盘挂载的路径,识别该路径下应用的安装文件。In some embodiments, the above step S302 may specifically include: scanning the path where the application disk is mounted, and identifying the installation file of the application under the path.
步骤S304,将应用加载到系统中,其中,该应用磁盘是服务器检测到应用启动时,根 据应用母盘差分出并挂载到虚拟机中的,同时服务器将应用的私有数据盘挂载到该虚拟机中,该私有数据盘被配置为存储该应用的数据。In step S304, the application is loaded into the system, where the application disk is derived from the application master disk when the server detects that the application is started and mounted to the virtual machine. At the same time, the server mounts the private data disk of the application to the virtual machine. In the virtual machine, the private data disk is configured to store data of the application.
在一些实施例中,上述步骤S304具体可以包括:解析安装文件,得到应用信息,且将该应用信息更新到系统中;根据该应用信息修改私有数据盘中的文件权限;在系统中广播应用安装成功的消息。In some embodiments, the above step S304 may specifically include: parsing the installation file to obtain application information, and updating the application information to the system; modifying the file permissions in the private data disk according to the application information; broadcasting application installation in the system Success message.
在一实施方式中,虚拟机打开应用,加载私有数据盘中的数据,读取用户的历史数据,同时将应用产生的私有数据写在用户的私有数据磁盘中。In one embodiment, the virtual machine opens the application, loads the data in the private data disk, reads the user's historical data, and at the same time writes the private data generated by the application in the user's private data disk.
通过上述步骤S302至S304,应用启动时,将应用分别安装在应用磁盘和用户私有数据磁盘中;当磁盘挂载时,不同的虚拟机设备能识别磁盘中的应用和用户数据,无需安装即可正常使用,可以解决本领域一些情形中云化安卓虚拟机因为内存不足需要扩容,且分配过大内存空间和用户试玩或长期不使用应用导致资源浪费的问题,实现了无须用户手动安装应用,挂载磁盘即可使用磁盘中的应用,磁盘可以适用于不同的虚拟机,且不用考虑虚拟机的剩余空间。Through the above steps S302 to S304, when the application is started, the application is installed on the application disk and the user private data disk respectively; when the disk is mounted, different virtual machine devices can identify the application and user data in the disk without installation. Normal use can solve the problem of resource waste caused by cloudized Android virtual machines due to insufficient memory in some situations in this field, and excessive allocation of memory space and user trial play or long-term non-use of applications. This eliminates the need for users to manually install applications. Mount the disk to use the applications in the disk. The disk can be applied to different virtual machines without considering the remaining space of the virtual machine.
在一些实施例中,在将应用加载到系统中之后,打开应用,并加载私有数据盘中的数据,在一实施方式中,在系统创建应用进程时,将应用数据的路径修改为私有数据盘的路径,以加载该私有数据盘中的数据;读取应用的历史数据,并将应用产生的数据写入该私有数据磁盘中,在一实施方式中,在应用请求该应用数据时,将应用的应用数据路径修改为该私有数据磁盘的路径,以将应用产生的数据写入该私有数据磁盘中。In some embodiments, after the application is loaded into the system, the application is opened and the data in the private data disk is loaded. In one embodiment, when the system creates the application process, the path of the application data is modified to the private data disk To load the data in the private data disk; read the historical data of the application and write the data generated by the application to the private data disk. In one embodiment, when the application requests the application data, the application The application data path of is modified to the path of the private data disk to write the data generated by the application into the private data disk.
在一些实施例中,在将应用加载到系统中之后,应用退出时,清除应用的加载信息,同时卸载应用磁盘与私有数据盘。In some embodiments, after the application is loaded into the system, when the application exits, the loading information of the application is cleared, and the application disk and the private data disk are unloaded at the same time.
在一些实施例中,当安装文件有更新时,更新应用的安装路径,将该安装文件更新到应用磁盘中;比较更新完成的应用磁盘和该应用母盘,生成增量升级文件;向服务器推送应用的增量升级文件,其中,该增量升级文件用于服务器对处于非运行状态的虚拟机的应用磁盘进行升级,和/或,对处于运行状态的虚拟机中的应用退出之后,在应用没有完成升级的情况下,对虚拟机的应用磁盘进行升级。In some embodiments, when the installation file is updated, the installation path of the application is updated, and the installation file is updated to the application disk; the updated application disk and the application master disk are compared to generate an incremental upgrade file; and the server is pushed The incremental upgrade file of the application, where the incremental upgrade file is used by the server to upgrade the application disk of the virtual machine in the non-running state, and/or, after the application in the virtual machine in the running state is exited, the application If the upgrade is not completed, upgrade the application disk of the virtual machine.
下面以应用为游戏为例,对本实施例进行进一步说明。The following uses an application as a game as an example to further illustrate this embodiment.
本实施例中,android应用安装在外挂磁盘时,可以将应用分别安装在应用磁盘和用户私有数据磁盘中;当磁盘挂载时,不同的android虚拟机设备能识别磁盘中的应用和用户数据,无需安装即可正常使用。进而解决现有云化安卓虚拟机因为内存不足需要扩容、分配过大内存空间导致资源浪费问题以及用户试玩或长期不使用应用导致资源浪费的问题。无须用户手动安装应用,挂载磁盘即可使用磁盘中的应用,磁盘可以适用于不同的安卓虚拟机,同时也不需要关心安卓虚拟机的剩余空间,具体包括:In this embodiment, when the android application is installed on the external disk, the application can be installed on the application disk and the user private data disk respectively; when the disk is mounted, different android virtual machine devices can identify the application and user data in the disk. It can be used normally without installation. In turn, it solves the problems of resource waste caused by the existing cloudized Android virtual machine due to insufficient memory and need to expand due to insufficient memory, excessive allocation of memory space, and resource waste caused by users trying to play or not using applications for a long time. There is no need for users to manually install the application, and the application in the disk can be used by mounting the disk. The disk can be applied to different Android virtual machines, and there is no need to care about the remaining space of the Android virtual machine, including:
步骤1,当新推送应用上线时,首先通过个性化磁盘制作功能制作出游戏应用的应用母盘和原始的私有应用数据盘,图4是根据本申请实施例的个性化磁盘制作的流程图,如图4所示,包括:Step 1. When the new push application goes online, first create the application master disk of the game application and the original private application data disk through the personalized disk creation function. Figure 4 is a flowchart of the personalized disk creation according to an embodiment of the application. As shown in Figure 4, it includes:
步骤S401,推送应用上线;Step S401, push the application online;
步骤S402,判断应用是否安装在磁盘中,在判断结果为否的情况下,执行步骤S403,否则执行步骤S404;Step S402, judge whether the application is installed in the disk, if the judgment result is no, execute step S403, otherwise, execute step S404;
步骤S403,安装应用;Step S403, install the application;
步骤S404,挂载游戏母盘和私有数据盘,即分别挂载空的应用母盘和私有应用数据盘 到虚拟机的指定私有挂载目录下面;Step S404, mount the game master disk and the private data disk, that is, respectively mount the empty application master disk and the private application data disk to the designated private mount directory of the virtual machine;
步骤S405,应用安装时,修改系统installd中应用的安装路径,将应用安装包和应用数据分别安装在不同磁盘中;In step S405, when the application is installed, the installation path of the application in the system installd is modified, and the application installation package and application data are respectively installed in different disks;
步骤S406,应用安装成功后,生成应用母盘磁盘中文件的MD5信息,并保存在服务器中,为后续挂载提供完整性校验。Step S406: After the application is successfully installed, MD5 information of the file in the application master disk is generated and stored in the server to provide integrity verification for subsequent mounting.
步骤2,当打开应用时,触发个性化磁盘挂载功能,然后正常使用应用。图5是根据本申请实施例的个性化磁盘挂载的流程图,如图5所示,包括:Step 2. When the application is opened, the personalized disk mounting function is triggered, and then the application is used normally. Fig. 5 is a flowchart of a personalized disk mounting according to an embodiment of the present application, as shown in Fig. 5, including:
步骤S501,当应用打开时,触发虚拟机挂载对应的应用磁盘和私有数据盘,其中,应用磁盘是通过应用母盘差分出来的;首先判断用户是否存在该应用的私有数据盘,如果没有则根据原始的应用数据盘给用户新做一个私有数据盘。Step S501, when the application is opened, trigger the virtual machine to mount the corresponding application disk and private data disk, where the application disk is differentiated from the application master disk; firstly, determine whether the user has a private data disk for the application, if not, then Create a new private data disk for the user based on the original application data disk.
步骤S502,若应用磁盘和私有数据盘挂载正常,对应用磁盘中的文件进行MD5值校验;Step S502, if the application disk and the private data disk are mounted normally, MD5 value verification is performed on the files in the application disk;
步骤S503,虚拟机扫描识别应用磁盘中的应用,并将应用加载到系统中。具体包括以下步骤:In step S503, the virtual machine scans and recognizes the application in the application disk, and loads the application into the system. Specifically include the following steps:
步骤S5031,调用PMS(PackageManagerService)扫描磁盘挂载的路径,然后识别该路径下的应用安装文件;Step S5031, calling PMS (PackageManagerService) to scan the path where the disk is mounted, and then identifying the application installation file under the path;
步骤S5032,调用PackageParse解析应用安装文件,并且将应用信息更新到系统中;Step S5032, call PackageParse to parse the application installation file, and update the application information to the system;
步骤S5033,根据解析的应用安装文件,改私有数据盘中的文件权限(包括用户组,用户权限等);Step S5033, according to the parsed application installation file, change the file permissions (including user groups, user permissions, etc.) in the private data disk;
步骤S5034,在系统中发送应用成功安装的广播消息。Step S5034: Send a broadcast message that the application is successfully installed in the system.
步骤S504,虚拟机启动应用,加载私有数据盘中的数据,读取用户的历史数据。同时将应用产生的私有数据写在用户的私有数据磁盘中,具体包括:In step S504, the virtual machine starts the application, loads the data in the private data disk, and reads the historical data of the user. At the same time, write the private data generated by the application in the user's private data disk, including:
步骤S5041,在android系统通过zygote创建的应用进程时,将应用数据的路径修改为私有应用数据盘的路径,从而保证游戏的正常加载。In step S5041, in the application process created by the android system through zygote, the path of the application data is modified to the path of the private application data disk, so as to ensure the normal loading of the game.
步骤S5042,在应用请求应用数据时,将应用的应用数据路径动态改为用户的私有数据磁盘的路径,从而实现用户数据的读写直接保存在磁盘中。In step S5042, when the application requests application data, the application data path of the application is dynamically changed to the path of the user's private data disk, so that the user data can be directly stored in the disk for reading and writing.
步骤S505,用户退出应用时,清除应用的加载信息,同时卸载磁盘。In step S505, when the user exits the application, the loading information of the application is cleared, and the disk is unmounted at the same time.
步骤3,虚拟机推送应用升级以及应用资源包升级,图6是根据本申请实施例的个性化磁盘升级的流程图,如图6所示,包括:Step 3. Virtual machine pushes application upgrades and application resource package upgrades. FIG. 6 is a flowchart of a personalized disk upgrade according to an embodiment of the present application, as shown in FIG. 6, including:
步骤S601,应用在线更新,更新游戏应用磁盘,具体的,当用户打开应用时,应用安装包或应用资源包有推送更新时,更新应用或应用资源包的安装路径,将应用更新到游戏磁盘中,将增量升级包文件上传到服务器。Step S601, the application is updated online, and the game application disk is updated. Specifically, when the user opens the application and the application installation package or application resource package has a push update, the installation path of the application or application resource package is updated, and the application is updated to the game disk , Upload the incremental upgrade package file to the server.
步骤S602,更新完成的游戏磁盘和原始游戏母盘进行文件比较,生成增量的升级文件包。In step S602, the updated game disk is compared with the original game master disk, and an incremental upgrade file package is generated.
步骤S603,判断虚拟机是否运行该游戏应用,在判断结果为是的情况下,执行步骤S604,否则执行步骤S606;Step S603: It is judged whether the virtual machine is running the game application, if the judgment result is yes, step S604 is executed, otherwise, step S606 is executed;
步骤S604,应用退出时,推送升级;Step S604, when the application exits, push the upgrade;
步骤S605,判断应用磁盘是否完成升级,在判断结果为否的情况下执行步骤S606,否则执行步骤S607;Step S605, it is judged whether the application disk has been upgraded, if the judgment result is no, step S606 is executed, otherwise, step S607 is executed;
步骤S606,升级应用磁盘;Step S606, upgrade the application disk;
步骤S607,升级完成。Step S607, the upgrade is completed.
服务器查询当前应用在每个android虚拟机的运行状态,如果没有运行,则推送增量升级包到对应的虚拟机的应用磁盘进行升级,并且将升级信息上报给服务器;否则,等待应用退出时,判断应用是否升级过,如果没有继续推送升级。The server queries the running status of the current application in each android virtual machine. If it is not running, it pushes the incremental upgrade package to the application disk of the corresponding virtual machine for upgrade, and reports the upgrade information to the server; otherwise, when waiting for the application to exit, Determine whether the application has been upgraded, if not, continue to push the upgrade.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对本领域技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of this application essentially or the part that contributes to the technology in the field can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) ) Includes several instructions to make a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application.
在本实施例中还提供了一种磁盘挂载装置,该装置用于实现上述实施例及其他实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置能够以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a disk mounting device is also provided, which is used to implement the above-mentioned embodiment and other implementation manners, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and/or hardware with predetermined functions. Although the device described in the following embodiments can be implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
图7是根据本申请实施例的磁盘挂载装置的结构框图一,如图7所示,该装置包括:Fig. 7 is a structural block diagram 1 of a disk mounting device according to an embodiment of the present application. As shown in Fig. 7, the device includes:
差分模块72,被配置为检测应用启动,根据该应用的应用母盘差分出对应虚拟机的应用磁盘;The difference module 72 is configured to detect the startup of an application, and differentiate the application disk corresponding to the virtual machine according to the application master disk of the application;
挂载模块74,被配置为将应用磁盘和应用的私有数据盘挂载到虚拟机中,其中,该虚拟机被配置为识别该应用磁盘中的应用,并将应用加载到系统中,该私有数据盘被配置为存储应用的数据。The mounting module 74 is configured to mount the application disk and the private data disk of the application to the virtual machine, where the virtual machine is configured to recognize the application in the application disk and load the application into the system. The data disk is configured to store application data.
在一些实施例中,该装置还包括:In some embodiments, the device further includes:
判断模块,被配置为判断是否存在应用的私有数据盘;The judgment module is configured to judge whether there is a private data disk of the application;
获取模块,被配置为在判断结果为是的情况下,获取应用的私有数据盘;The obtaining module is configured to obtain the private data disk of the application when the judgment result is yes;
创建模块,被配置为在判断结果为否的情况下,创建应用的私有数据盘。The creation module is configured to create a private data disk of the application when the judgment result is no.
在一些实施例中,该装置还包括:In some embodiments, the device further includes:
校验模块,被配置为对应用磁盘中的应用安装文件的完整性进行校验。The verification module is configured to verify the integrity of the application installation file in the application disk.
在一些实施例中,该装置还包括:In some embodiments, the device further includes:
接收模块,被配置为接收虚拟机推送的应用的增量升级文件;The receiving module is configured to receive incremental upgrade files of the application pushed by the virtual machine;
升级模块,被配置为根据该增量升级文件对处于非运行状态的虚拟机的应用磁盘进行升级,和/或,对处于运行状态的虚拟机中的应用退出之后,在应用没有完成升级的情况下,对虚拟机的应用磁盘进行升级。The upgrade module is configured to upgrade the application disk of the virtual machine in the non-running state according to the incremental upgrade file, and/or, after exiting the application in the virtual machine in the running state, the application has not been upgraded Next, upgrade the application disk of the virtual machine.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following way, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are in any combination The forms are located in different processors.
在本实施例中还提供了一种磁盘挂载装置,该装置用于实现上述实施例及其他实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置能够以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a disk mounting device is also provided, which is used to implement the above-mentioned embodiment and other implementation manners, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and/or hardware with predetermined functions. Although the device described in the following embodiments can be implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
图8是根据本申请实施例的磁盘挂载装置的结构框图二,如图8所示,该装置包括:Fig. 8 is a second structural block diagram of a disk mounting device according to an embodiment of the present application. As shown in Fig. 8, the device includes:
识别模块82,被配置为识别应用磁盘中的应用;The identification module 82 is configured to identify applications in the application disk;
第一加载模块84,被配置为将应用加载到系统中,其中,该应用磁盘是服务器检测到 应用启动时,根据应用母盘差分出并挂载到虚拟机中的,同时服务器将应用的私有数据盘挂载到该虚拟机中,该私有数据盘被配置为存储应用的数据。The first loading module 84 is configured to load the application into the system, where the application disk is differentiated according to the application mother disk when the server detects that the application is started, and is mounted to the virtual machine. At the same time, the server keeps the application private The data disk is mounted to the virtual machine, and the private data disk is configured to store application data.
在一些实施例中,上述的识别模块82包括:In some embodiments, the aforementioned identification module 82 includes:
扫描子模块,被配置为扫描应用磁盘挂载的路径;The scanning sub-module is configured to scan the path where the application disk is mounted;
识别子模块,被配置为识别该路径下应用的安装文件。The identification sub-module is configured to identify the installation file of the application under the path.
在一些实施例中,上述的第一加载模块84包括:In some embodiments, the aforementioned first loading module 84 includes:
解析子模块,被配置为解析安装文件,得到应用信息,且将应用信息更新到系统中;The parsing sub-module is configured to parse the installation file, obtain application information, and update the application information to the system;
修改子模块,被配置为根据该应用信息修改私有数据盘中的文件权限;The modification sub-module is configured to modify the file permissions in the private data disk according to the application information;
广播子模块,被配置为在系统中广播应用安装成功的消息。The broadcast sub-module is configured to broadcast a message of successful application installation in the system.
在一些实施例中,该装置还包括:In some embodiments, the device further includes:
第二加载模块,被配置为打开应用,并加载私有数据盘中的数据;The second loading module is configured to open the application and load the data in the private data disk;
写入模块,被配置为读取应用的历史数据,并将应用产生的数据写入该私有数据磁盘中。The writing module is configured to read historical data of the application and write the data generated by the application into the private data disk.
在一些实施例中,上述的第二加载模块,还被配置为在系统创建应用进程时,将应用数据的路径修改为私有数据盘的路径,以加载该私有数据盘中的数据;In some embodiments, the aforementioned second loading module is further configured to modify the path of the application data to the path of the private data disk when the system creates the application process, so as to load the data in the private data disk;
上述的写入模块,还被配置为在应用请求应用数据时,将应用的应用数据路径修改为私有数据磁盘的路径,以将应用产生的数据写入该私有数据磁盘中。The above-mentioned writing module is also configured to modify the application data path of the application to the path of the private data disk when the application requests application data, so as to write the data generated by the application into the private data disk.
在一些实施例中,该装置还包括:In some embodiments, the device further includes:
卸载模块,被配置为应用退出时,清除应用的加载信息,同时卸载应用磁盘与私有数据盘。The unloading module is configured to clear the loading information of the application when the application exits, and unload the application disk and the private data disk at the same time.
在一些实施例中,该装置还包括:In some embodiments, the device further includes:
更新模块,被配置为当安装文件有更新时,更新应用的安装路径,将该安装文件更新到应用磁盘中;The update module is configured to update the installation path of the application when the installation file is updated, and update the installation file to the application disk;
生成模块,被配置为比较更新完成的应用磁盘和该应用母盘,生成增量升级文件;The generation module is configured to compare the updated application disk with the application master disk, and generate an incremental upgrade file;
推送模块,被配置为向服务器推送应用的增量升级文件,其中,该增量升级文件用于该服务器对处于非运行状态的虚拟机的应用磁盘进行升级,和/或,对处于运行状态的虚拟机中的该应用退出之后,在应用没有完成升级的情况下,对虚拟机的应用磁盘进行升级。The push module is configured to push the incremental upgrade file of the application to the server, where the incremental upgrade file is used by the server to upgrade the application disk of the virtual machine in the non-running state, and/or to the running state After the application in the virtual machine exits, the application disk of the virtual machine is upgraded if the application has not been upgraded.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following way, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are in any combination The forms are located in different processors.
本申请的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。The embodiment of the present application also provides a computer-readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
在一个实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In one embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: U disk, read-only memory (Read-Only Memory, ROM for short), Random Access Memory (RAM for short), mobile Various media that can store computer programs, such as hard disks, magnetic disks, or optical disks.
本申请的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
在一个实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In one embodiment, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
通过本申请,应用启动时,将应用分别安装在应用磁盘和用户私有数据磁盘中;当磁 盘挂载时,不同的虚拟机设备能识别磁盘中的应用和用户数据,无需安装即可正常使用,可以解决本领域一些情形中云化安卓虚拟机因为内存不足需要扩容,且分配过大内存空间和用户试玩或长期不使用应用导致资源浪费的问题,实现了无须用户手动安装应用,挂载磁盘即可使用磁盘中的应用,磁盘可以适用于不同的虚拟机,且不用考虑虚拟机的剩余空间。Through this application, when the application is started, the application is installed in the application disk and the user private data disk; when the disk is mounted, different virtual machine devices can recognize the application and user data in the disk, and can be used normally without installation. It can solve the problem of resource wasted due to insufficient memory of clouded Android virtual machines in some situations in this field, and the allocation of excessive memory space and the user's trial play or long-term non-use of the application lead to waste of resources, so that the user does not need to manually install the application and mount the disk That is, the applications in the disk can be used, and the disk can be applied to different virtual machines without considering the remaining space of the virtual machine.
本实施例中的具体示例可以参考上述实施例及一些实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and some implementation manners, and this embodiment will not be repeated here.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices. Above, they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be executed in a different order than shown here. Or the described steps, or fabricate them into individual integrated circuit modules respectively, or fabricate multiple modules or steps of them into a single integrated circuit module to achieve. In this way, this application is not limited to any specific hardware and software combination.
以上所述仅为本申请的一些实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only some embodiments of the application, and are not used to limit the application. For those skilled in the art, the application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principles of this application shall be included in the protection scope of this application.

Claims (14)

  1. 一种磁盘挂载方法,包括:A disk mounting method, including:
    检测应用启动,根据所述应用的应用母盘差分出对应虚拟机的应用磁盘;Detect application startup, and differentiate the application disk corresponding to the virtual machine according to the application master disk of the application;
    将所述应用磁盘和所述应用的私有数据盘挂载到所述虚拟机中,其中,所述虚拟机被配置为识别所述应用磁盘中的所述应用,并将所述应用加载到系统中,所述私有数据盘被配置为存储所述应用的数据。Mount the application disk and the private data disk of the application to the virtual machine, wherein the virtual machine is configured to identify the application in the application disk and load the application into the system In the above, the private data disk is configured to store data of the application.
  2. 根据权利要求1所述的方法,其中,在将所述应用磁盘和所述应用的私有数据盘挂载到所述虚拟机中之前,所述方法还包括:The method according to claim 1, wherein, before mounting the application disk and the private data disk of the application to the virtual machine, the method further comprises:
    判断是否存在所述应用的私有数据盘;Determine whether there is a private data disk of the application;
    在判断结果为是的情况下,获取所述应用的私有数据盘;In the case where the judgment result is yes, obtain the private data disk of the application;
    在判断结果为否的情况下,创建所述应用的私有数据盘。In the case that the judgment result is negative, a private data disk of the application is created.
  3. 根据权利要求1或2所述的方法,其中,在将所述应用磁盘和所述私有数据盘挂载到所述虚拟机中之后,所述方法还包括:The method according to claim 1 or 2, wherein after mounting the application disk and the private data disk to the virtual machine, the method further comprises:
    接收虚拟机推送的所述应用的增量升级文件;Receiving the incremental upgrade file of the application pushed by the virtual machine;
    根据所述增量升级文件对处于非运行状态的虚拟机的应用磁盘进行升级,和/或,对处于运行状态的虚拟机中的所述应用退出之后,在所述应用没有完成升级的情况下,对所述虚拟机的应用磁盘进行升级。Upgrade the application disk of the virtual machine in the non-running state according to the incremental upgrade file, and/or, after exiting the application in the virtual machine in the running state, if the application has not been upgraded To upgrade the application disk of the virtual machine.
  4. 一种磁盘挂载方法,应用于虚拟机,包括:A disk mounting method, applied to a virtual machine, includes:
    识别应用磁盘中的应用;Identify the application in the application disk;
    将所述应用加载到系统中,其中,所述应用磁盘是服务器检测应用启动,根据所述应用母盘差分出并挂载到所述虚拟机中的,同时所述服务器将所述应用的私有数据盘挂载到所述虚拟机中,所述私有数据盘被配置为存储所述应用的数据。Load the application into the system, where the application disk is the server that detects the application startup, differentiates it based on the application master disk and mounts it in the virtual machine, and at the same time, the server saves the private application of the application. The data disk is mounted to the virtual machine, and the private data disk is configured to store data of the application.
  5. 根据权利要求4所述的方法,其中,识别所述应用磁盘中的所述应用包括:The method of claim 4, wherein identifying the application in the application disk comprises:
    扫描所述应用磁盘挂载的路径;Scanning the path where the application disk is mounted;
    识别所述路径下所述应用的安装文件。Identify the installation file of the application under the path.
  6. 根据权利要求5所述的方法,其中,将所述应用加载到系统中包括:The method of claim 5, wherein loading the application into the system comprises:
    解析所述安装文件,得到应用信息,且将所述应用信息更新到所述系统中;Parse the installation file to obtain application information, and update the application information to the system;
    根据所述应用信息修改所述私有数据盘中的文件权限;Modify the file permissions in the private data disk according to the application information;
    在所述系统中广播所述应用安装成功的消息。Broadcasting a message that the application installation is successful in the system.
  7. 根据权利要求4所述的方法,其中,在将所述应用加载到系统中之后,所述方法还包括:The method according to claim 4, wherein, after the application is loaded into the system, the method further comprises:
    打开所述应用,并加载所述私有数据盘中的数据;Open the application, and load the data in the private data disk;
    读取所述应用的历史数据,并将所述应用产生的数据写入所述私有数据磁盘中。Read the historical data of the application, and write the data generated by the application into the private data disk.
  8. 根据权利要求7所述的方法,其中,The method according to claim 7, wherein:
    加载所述私有数据盘中的数据包括:在所述系统创建应用进程时,将应用数据的路径修改为所述私有数据盘的路径,以加载所述私有数据盘中的数据;Loading the data in the private data disk includes: when the system creates an application process, modifying the path of the application data to the path of the private data disk to load the data in the private data disk;
    将所述应用产生的数据写入所述私有数据磁盘中包括:在所述应用请求所述应用数据时,将所述应用的应用数据路径修改为所述私有数据磁盘的路径,以将所述应用产生的数据写入所述私有数据磁盘中。Writing the data generated by the application into the private data disk includes: when the application requests the application data, modifying the application data path of the application to the path of the private data disk to change the The data generated by the application is written into the private data disk.
  9. 根据权利要求4至8中任一项所述的方法,其中,在将所述应用加载到系统中之 后,所述方法还包括:The method according to any one of claims 4 to 8, wherein, after the application is loaded into the system, the method further comprises:
    所述应用退出时,清除所述应用的加载信息,同时卸载所述应用磁盘于所述私有数据盘。When the application exits, the loading information of the application is cleared, and the application disk is unloaded from the private data disk at the same time.
  10. 根据权利要求4至8中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 4 to 8, wherein the method further comprises:
    当所述安装文件有更新时,更新所述应用的安装路径,将所述安装文件更新到所述应用磁盘中;When the installation file is updated, the installation path of the application is updated, and the installation file is updated to the application disk;
    比较更新完成的应用磁盘和所述应用母盘,生成增量升级文件;Compare the updated application disk with the application master disk, and generate an incremental upgrade file;
    向所述服务器推送所述应用的增量升级文件,其中,所述增量升级文件用于所述服务器对处于非运行状态的虚拟机的应用磁盘进行升级,和/或,对处于运行状态的虚拟机中的所述应用退出之后,在所述应用没有完成升级的情况下,对所述虚拟机的应用磁盘进行升级。Push the incremental upgrade file of the application to the server, where the incremental upgrade file is used by the server to upgrade the application disk of the virtual machine in the non-running state, and/or to the running state After the application in the virtual machine exits, if the application has not been upgraded, the application disk of the virtual machine is upgraded.
  11. 一种磁盘挂载装置,包括:A disk mounting device includes:
    差分模块,被配置为检测应用启动,根据所述应用的应用母盘差分出对应虚拟机的应用磁盘;The difference module is configured to detect the startup of the application, and differentiate the application disk corresponding to the virtual machine according to the application master disk of the application;
    挂载模块,被配置为将所述应用磁盘和所述应用的私有数据盘挂载到所述虚拟机中,其中,所述虚拟机被配置为识别所述应用磁盘中的所述应用,并将所述应用加载到系统中,所述私有数据盘被配置为存储所述应用的数据。The mounting module is configured to mount the application disk and the private data disk of the application to the virtual machine, wherein the virtual machine is configured to identify the application in the application disk, and The application is loaded into the system, and the private data disk is configured to store data of the application.
  12. 一种磁盘挂载装置,应用于虚拟机,包括:A disk mounting device applied to a virtual machine, including:
    识别模块,被配置为识别应用磁盘中的应用;The identification module is configured to identify the application in the application disk;
    第一加载模块,被配置为将所述应用加载到系统中,其中,所述应用磁盘是服务器检测到应用启动时,根据所述应用母盘差分出并挂载到所述虚拟机中的,同时所述服务器将所述应用的私有数据盘挂载到所述虚拟机中,所述私有数据盘被配置为存储所述应用的数据。The first loading module is configured to load the application into the system, wherein the application disk is differentiated based on the application master disk and mounted to the virtual machine when the server detects that the application is started, At the same time, the server mounts the private data disk of the application to the virtual machine, and the private data disk is configured to store data of the application.
  13. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至3任一项中所述的方法,或者执行权利要求4至10任一项中所述的方法。A computer-readable storage medium having a computer program stored in the computer-readable storage medium, wherein the computer program is configured to execute the method described in any one of claims 1 to 3 when running, or Perform the method described in any one of claims 4 to 10.
  14. 一种电子装置,包括存储器和处理器,其中,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至3任一项中所述的方法,或者执行权利要求4至10任一项中所述的方法。An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the one described in any one of claims 1 to 3 Method, or implement the method described in any one of claims 4 to 10.
PCT/CN2021/099815 2020-06-15 2021-06-11 Disk mounting method and device, storage medium, and electronic device WO2021254280A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010546757.6 2020-06-15
CN202010546757.6A CN113806007A (en) 2020-06-15 2020-06-15 Disk mounting method, disk mounting device, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2021254280A1 true WO2021254280A1 (en) 2021-12-23

Family

ID=78892455

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/099815 WO2021254280A1 (en) 2020-06-15 2021-06-11 Disk mounting method and device, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113806007A (en)
WO (1) WO2021254280A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030126232A1 (en) * 2001-12-27 2003-07-03 Mogul Jeffrey Clifford System and method for energy efficient data prefetching
CN103136000A (en) * 2011-11-21 2013-06-05 财团法人资讯工业策进会 Method and system of providing application program for virtual machine
CN106503587A (en) * 2016-11-28 2017-03-15 航天恒星科技有限公司 A kind of hanging method of data disks and monitor of virtual machine
CN107992355A (en) * 2017-12-21 2018-05-04 中兴通讯股份有限公司 A kind of method, apparatus and virtual machine of application deployment software
CN110806911A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Cloud desktop management and control method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030126232A1 (en) * 2001-12-27 2003-07-03 Mogul Jeffrey Clifford System and method for energy efficient data prefetching
CN103136000A (en) * 2011-11-21 2013-06-05 财团法人资讯工业策进会 Method and system of providing application program for virtual machine
CN106503587A (en) * 2016-11-28 2017-03-15 航天恒星科技有限公司 A kind of hanging method of data disks and monitor of virtual machine
CN107992355A (en) * 2017-12-21 2018-05-04 中兴通讯股份有限公司 A kind of method, apparatus and virtual machine of application deployment software
CN110806911A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Cloud desktop management and control method, device and system

Also Published As

Publication number Publication date
CN113806007A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
US11243792B2 (en) Image file conversion method and apparatus
CN111338854B (en) Kubernetes cluster-based method and system for quickly recovering data
JP5026509B2 (en) Converting a machine to a virtual machine
CN102232304B (en) Method, system and terminal for system update between mobile communication terminals
WO2020103904A1 (en) Cloud desktop upgrade method, device, cloud server, and storage medium
US20150067167A1 (en) Hot pluggable extensions for access management system
WO2020140634A1 (en) Storage space optimization method and device, computer apparatus, and storage medium
US11231919B2 (en) Live updates of stateful components
CN113626286A (en) Multi-cluster instance processing method and device, electronic equipment and storage medium
EP3879875A1 (en) Resource change method and device, apparatus, and storage medium
US11588909B1 (en) System and method for subscription based solution data compatibility
WO2023016414A1 (en) Credential rotation method, computing device, and storage medium
CN103888491A (en) Diskless workstation start system and method
CN114816676A (en) System and method for realizing multi-tenant deployment of low code development platform
US10795747B2 (en) File synchronizing service status monitoring and error handling
WO2021254280A1 (en) Disk mounting method and device, storage medium, and electronic device
WO2023066246A1 (en) Method and system for installing application on cloudphone, and client cloudphone
CN107861761B (en) Starting method and system of physical host
CN115495436A (en) Database upgrading method and device
WO2017096889A1 (en) Method and device for upgrading and downgrading system
CN111767345B (en) Modeling data synchronization method, modeling data synchronization device, computer equipment and readable storage medium
CN114443166A (en) Shared file processing method, device and medium
CN112711469A (en) Cloud host migration method and device, computer equipment and storage medium
CN112748943A (en) Upgrading method and upgrading system for non-intelligent interactive electronic whiteboard
CN113722147A (en) Method for keeping service connection and related equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21826029

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.05.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21826029

Country of ref document: EP

Kind code of ref document: A1