Data processing method and system of virtual machine and electronic equipment
By accessing the shared data pool and batch reading of device status data during the virtual machine upgrade process, the problem of low efficiency in virtual machine status data processing is solved, and efficient batch processing of virtual machine status data is achieved.
Patent Information
- Application Number
- CN202311499744.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-09
- Publication Date
- 2025-05-09
AI Technical Summary
During the upgrade process of virtual machines, the virtual device receives device status data in serial, resulting in low processing efficiency.
During the virtual machine upgrade process, access to the shared data pool is triggered, device status data is read in batches from different storage locations of the shared data pool, and the upgraded virtual machine is batch restored based on the data read in batches.
By batch processing of device status data, the state data processing efficiency of the virtual machine is improved, and the problem of low state data processing efficiency of the virtual machine is solved.
Smart Images

Figure CN119961050A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of elastic computing, and in particular to a data processing method, system and electronic device for a virtual machine. Background Art
[0002] At present, for the processing of device status data of virtual devices in a virtual machine, usually each virtual device maintains its own device status data. In the process of upgrading the virtual machine, it is necessary to sequentially receive and copy all device status data to the virtual devices of the upgraded virtual machine. The virtual device receives the device status data serially, but the process of serially receiving the device status data takes a long time, resulting in a technical problem of low efficiency in processing the virtual machine's status data.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, system and electronic device for a virtual machine, so as to at least solve the technical problem of low processing efficiency of state data of the virtual machine.
[0005] According to one aspect of an embodiment of the present application, a data processing method for a virtual machine is provided. The method can be applied to the cloud, and may include: in response to the working state of the virtual machine being an upgrade state, running the upgrade file of the virtual machine to obtain an upgraded virtual machine, wherein the virtual machine is deployed in the cloud; during the virtual machine upgrade process, triggering access to a shared data pool, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and the device status data of different virtual devices are stored in different storage locations of the shared data pool; batch reading device status data from different storage locations of the shared data pool; and batch recovery processing of at least one virtual device in the upgraded virtual machine based on the batch read device status data.
[0006] According to another aspect of the embodiment of the present application, another data processing method for a virtual machine is also provided. The method may include: in response to an access instruction of a virtual machine before an upgrade, obtaining device status data of at least one or more virtual devices in the virtual machine before an upgrade, wherein the virtual machine is deployed in the cloud; storing device status data of different virtual devices in different storage locations of a shared data pool; in response to a batch transmission operation, batch transmitting device status data in different storage locations to virtual devices of the upgraded virtual machine, wherein the batch transmitted device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, wherein the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade.
[0007] According to another aspect of the embodiment of the present application, a data processing system for a virtual machine is also provided. The system may include: a cloud, for responding to the virtual machine's working state being an upgrade state, running the upgrade file of the virtual machine to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud; a memory, for responding to the access instruction of the virtual machine before the upgrade, obtaining the device status data of at least one or more virtual devices in the virtual machine before the upgrade, and storing the device status data of different virtual devices in different storage locations of the shared data pool; wherein the cloud is used to trigger access to the shared data pool during the virtual machine upgrade process, batch read the device status data from different storage locations of the shared data pool, and batch restore the at least one virtual device in the upgraded virtual machine based on the batch read device status data.
[0008] According to one aspect of an embodiment of the present application, a data processing device for a virtual machine is provided. The device may include: an operation unit, for responding to the virtual machine's working state being an upgrade state, running the upgrade file of the virtual machine to obtain an upgraded virtual machine, wherein the virtual machine is deployed in the cloud; an access unit, for triggering access to a shared data pool during the virtual machine upgrade process, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and the device status data of different virtual devices are stored in different storage locations of the shared data pool; a reading unit, for batch reading device status data from different storage locations of the shared data pool; and a processing unit, for batch recovery processing of at least one virtual device in the upgraded virtual machine based on the batch read device status data.
[0009] According to another aspect of the embodiment of the present application, a data processing method for a virtual machine is also provided. The method may include: an acquisition unit, for responding to an access instruction of the virtual machine before the upgrade, to acquire device status data of at least one or more virtual devices in the virtual machine before the upgrade, wherein the virtual machine is deployed in the cloud; a storage unit, for storing device status data of different virtual devices in different storage locations of a shared data pool; a transmission unit, for responding to a batch transmission operation, to batch transmit device status data at different storage locations to virtual devices of the upgraded virtual machine, wherein the batch transmitted device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, and the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade.
[0010] According to another aspect of an embodiment of the present application, an electronic device is also provided, which may include a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions. When the above-mentioned computer-executable instructions are executed by the processor, the above-mentioned method of any one of the above-mentioned items is implemented.
[0011] According to another aspect of an embodiment of the present application, a processor is further provided, the processor being used to run a program, wherein any one of the above methods is executed when the program is running.
[0012] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the above methods.
[0013] In an embodiment of the present application, in response to the working state of the virtual machine being the upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud; during the process of upgrading the virtual machine, access to the shared data pool is triggered, wherein the shared data pool is used to store the device state data of at least one or more virtual devices in the virtual machine before the upgrade, and the device state data of different virtual devices are stored in different storage locations of the shared data pool; the device state data is read in batches from different storage locations of the shared data pool; based on the device state data read in batches, at least one virtual device in the upgraded virtual machine is batch restored. That is, in this embodiment, in response to the working state of the virtual machine being the upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, the device state data of the upgraded virtual machine is obtained from the shared data pool, and the operating state of the virtual device in the upgraded virtual machine is restored based on the device state data, thereby achieving the purpose of batch and concurrent processing of the state data of the virtual machine, thereby achieving the technical effect of improving the processing efficiency of the state data of the virtual machine, and solving the technical problem of low processing efficiency of the state data of the virtual machine.
[0014] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 It is a schematic diagram of an application scenario of a data processing method for a virtual machine according to an embodiment of the present application;
[0017] Figure 2 is a flow chart of a data processing method for a virtual machine according to an embodiment of the present application;
[0018] Figure 3 is a flow chart of another data processing method of a virtual machine according to an embodiment of the present application;
[0019] Figure 4 is a schematic diagram of a data processing system of a virtual machine according to an embodiment of the present application;
[0020] Figure 5 is a schematic diagram of device status data maintenance according to an embodiment of the present application;
[0021] Figure 6 is a schematic diagram of restoring device status data according to an embodiment of the present application;
[0022] Figure 7 is a schematic diagram of restoring the operating state of a virtual device through a data pool according to an embodiment of the present application;
[0023] Figure 8 A schematic diagram of a batch concurrent processing of device status data according to an embodiment of the present application
[0024] Fig. 9 is a schematic diagram of a data processing device of a virtual machine according to an embodiment of the present application;
[0025] Fig.10 is a schematic diagram of another data processing device of a virtual machine according to an embodiment of the present application;
[0026] Fig.11 is a structural block diagram of a computer terminal according to an embodiment of the present application; and
[0027] Fig.12 It is a block diagram of an electronic device of a data processing method of a virtual machine according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0031] The client device (referred to as Guest) context, when the host's central processing unit (CPU) is executing the code of the virtual machine, the CPU is in the client device Guest context; when the central processing unit CPU is executing the host's code, it is in the server device (referred to as Host) context;
[0032] Hot migration can be used for hot migration of virtual machines, which is used to fix some vulnerabilities online or add some new features without affecting customer operations. During the hot migration process, the preservation and recovery of virtual devices also occupies a certain proportion of downtime. The hot migration process can migrate virtual machines from one host to another, or it can be performed locally;
[0033] Hot upgrade can be a hot upgrade of virtualized components. The hot upgrade process is usually performed on the local machine. During the hot upgrade process, the preservation and restoration of virtual devices also occupies a certain proportion of the download time;
[0034] The source end may be a virtual machine that is migrated or upgraded during hot migration or hot upgrade of the virtual machine;
[0035] The destination virtual machine may be a target virtual machine after migration or upgrade during hot migration or hot upgrade of the virtual machine;
[0036] Virtual device preservation and recovery: When a virtual machine is hot migrated or hot upgraded, the virtual device of the virtual machine also needs to work without affecting its functions. It is necessary to ensure that the state of the virtual device remains consistent after the hot migration or hot upgrade of the virtual machine. That is, virtual device preservation and recovery can mean that the virtual device on the source side needs to preserve its state before hot migration or hot upgrade, and the virtual device on the destination side needs to restore and load the state saved on the source side.
[0037] The virtual device state refers to specific device state data that needs to be saved or restored during the save and restore process of the virtual device of the virtual machine.
[0038] Example 1
[0039] According to one aspect of the embodiments of the present application, a data processing method for a virtual machine is provided. As an optional implementation, the data processing method for the virtual machine can be applied to, but is not limited to, Figure 1 The application scenario shown. Figure 1 is a schematic diagram of an application scenario of a data processing method for a virtual machine according to an embodiment of the present application, such as Figure 1 As shown, in the application scenario, the terminal device 12 can communicate with the server 16 through the network 14, but is not limited to, and the server 16 can perform operations on the database 18, such as writing data operations or reading data operations. The terminal device 12 can include, but is not limited to, a human-computer interaction screen, a processor, and a memory. The human-computer interaction screen can be used to display, but is not limited to, deploying a virtual machine 110 on the terminal device 12. The processor can include, but is not limited to, responding to the human-computer interaction operation, executing a corresponding operation, or generating a corresponding instruction, and sending the generated instruction to the server 16. The memory is used to store relevant processing data, such as device status data.
[0040] As an optional method, the following steps in the data processing method of the virtual machine can be executed on the server 16: Step S102, in response to the working state of the virtual machine being an upgraded state, running the upgrade file of the virtual machine to obtain the upgraded virtual machine; Step S104, during the virtual machine upgrade process, triggering access to the shared data pool; Step S106, batch reading device status data from different storage locations in the shared data pool; Step S108, based on the batch read device status data, batch recovery processing of at least one virtual device in the upgraded virtual machine.
[0041] By adopting the above method, in response to the working state of the virtual machine being an upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, the device state data of the upgraded virtual machine is obtained from the shared data pool, and the operating state of the virtual device in the upgraded virtual machine is restored based on the device state data, thereby achieving the purpose of batch and concurrent processing of the state data of the virtual machine, and further achieving the technical effect of improving the processing efficiency of the state data of the virtual machine, and solving the technical problem of low processing efficiency of the state data of the virtual machine.
[0042] In the above operating environment, the present application embodiment also provides the following Figure 2 The data processing method of the virtual machine shown can be applied to the cloud. Figure 2 1 is a flow chart of a data processing method for a virtual machine according to an embodiment of the present application. Figure 2 As shown, the method may include the following steps.
[0043] Step S202: in response to the working state of the virtual machine being an upgrade state, running the upgrade file of the virtual machine to obtain an upgraded virtual machine.
[0044] The achievable solution of the present application is that the working state of the virtual machine can be changed to the upgraded state through the upgrade instruction of the virtual machine to obtain the upgraded virtual machine. Optionally, the process can be implemented by creating a target process, that is, the upgrade file of the virtual machine can be run through the target process to achieve the purpose of upgrading the virtual machine, wherein the virtual machine can be deployed in the cloud.
[0045] It can be explained that in the technical solution provided in the above step S202 of the present application, in response to the upgrade instruction of the virtual machine, a target process for running the upgrade file of the virtual machine can be created. Among them, the upgrade instruction can be used to upgrade the virtual machine, and can be used to instruct the upgrade of the operating system, application, configuration and other devices in the virtual machine. For example, it can be used to instruct the hot migration, cold migration and gradual upgrade of the virtual machine.
[0046] It should be noted that this is only an example, and there is no specific restriction on the instruction content of the upgrade instruction. The target process can be the upgraded virtual machine process, which can also be called the destination virtual machine process, which can be used to control the transmission of data in the virtual machine. For example, it can be an open source emulator program subprocess that can execute hardware virtualization (abbreviated as QUEM subprocess). The virtual machine before the upgrade can be called the source virtual machine, which can be represented by Old VM. The virtual machine after the upgrade can be called the destination virtual machine, which can be represented by New VM.
[0047] Optionally, the virtual machine includes memory, central processing unit, storage, network card and other devices, which are all managed and allocated through processes, so a target process can be derived in response to the upgrade instruction of the virtual machine. The process can include an initial process corresponding to the virtual machine before the upgrade and a target process corresponding to the virtual machine after the upgrade.
[0048] Step S204, during the virtual machine upgrade process, access to a shared data pool may be triggered, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and device status data of different virtual devices are stored in different storage locations of the shared data pool.
[0049] Still in combination with the implementable solution in step S202, in the process of calling the target process to execute the upgrade of the virtual machine, the key is to execute access to the shared data pool, because the shared data pool is a unit that can be stored and accessed by different virtual machines. For the virtual machine, before the virtual machine is upgraded, the virtual machine will store the device status data of all or part of its virtual devices and allocate sufficient storage space for the storage content. Here, the shared data pool provides a technical implementation basis for the subsequent batch recovery processing.
[0050] An optional solution is used as an example below. In the technical solution provided in the above step S204 of the present application, after creating the target process in response to the upgrade instruction of the virtual machine, the upgrade function can be called to upgrade the virtual machine. At this time, in the process of upgrading the virtual machine, the shared data pool (i.e., Data Pool, referred to as data pool) can be accessed through the target process to obtain the recovery data required for subsequent batch recovery processing from the shared data pool. For example, the device status data of the virtual device in the virtual machine can be obtained. This is only an example and does not impose specific restrictions on the type of data obtained.
[0051] It should be noted that the shared data pool is a storage area or container that centrally stores the operating data of each virtual device in the virtual machine, which can realize centralized management and storage of a large amount of operating data, and provide functions such as access, query and processing of these operating data. The data stored in the shared data pool can include structured data, semi-structured data and unstructured data to meet different types of application requirements. The operating data can include device status data.
[0052] The following is a detailed description of the hot upgrade scenario of the computer as follows: the above step S204 can respond to the upgrade instruction of the virtual machine, and the virtual machine starts the hot upgrade. During the upgrade process, the virtual machine can derive a new target process (for example, derive a QUEM subprocess). Further, a function (for example, an execve function) can be called in the QUEM subprocess to load the upgrade file corresponding to the virtual machine, and the upgrade file is run through the target process to obtain the upgraded virtual machine. However, it is still necessary to restore the operating status of the virtual device in the upgraded virtual machine. The corresponding device status data can be obtained from the data pool through the target process to restore the operating status of the virtual device. The operating status of the virtual device can be restored through the following steps. Among them, the upgrade file can be a program file or an executable file, such as a QUEM program file. It should be noted that the upgrade file here is only an example, and there is no specific restriction on the type of upgrade file and the upgrade method of the virtual machine.
[0053] Step S206: Read device status data in batches from different storage locations in the shared data pool.
[0054] An implementable solution of the present application is to batch read device status data from different storage locations in a shared data pool, wherein the device status data stored in the shared data pool is synchronously stored by the virtual machine before the upgrade by accessing the shared data pool, and the device status data recorded in the shared data pool is used to characterize the operating status of the corresponding virtual device in the virtual machine before the upgrade. For example, the device status data may include the hardware status data, software status data, fault status data, performance status data, etc. of the virtual device. This is only for illustration and does not specifically limit the type of device status data.
[0055] It can be elaborated that in the technical solution provided in the above step S206 of the present application, multiple virtual devices can be deployed in the virtual machine before the upgrade, and the virtual machine before the upgrade accesses the shared data pool to store the device status data of each virtual device in different storage locations of the shared data pool. For example, the virtual device A in the virtual machine before the upgrade stores the device status data in the first storage area of the shared data pool, and the storage location can be marked as the A storage area. The device status data stored at this time can represent the operating status of the virtual device A in the virtual machine before the upgrade. It should be noted here that the virtual device in the present application can be an input and output device (IO device) in the virtual machine, for example, it can be a virtual hard disk, optical drive, printer and other devices. It should be noted that this is only an example, and the type of virtual device is not specifically limited.
[0056] The upgraded virtual machine can create a target process to obtain the device status data pre-stored by the virtual machine before the upgrade from the shared data pool. Since different virtual devices are deployed before the upgrade, when the device status data of the virtual devices are synchronously stored in the shared data pool, the shared data pool will store the device status data of different virtual devices in different storage locations according to a predetermined storage method. Therefore, when the upgraded virtual machine accesses the shared data pool, it can realize batch reading of the device status data. Furthermore, it can also realize batch and parallel reading of the device status data of each storage device, thereby improving the efficiency of subsequent updates.
[0057] It should be noted here that the storage space determined by the storage location can not only be pre-divided and allocated, but also can be dynamically allocated and adjusted as needed.
[0058] In summary, combined with the feasible solution in step S204, the virtual machine can access the shared data pool, and the virtual machine before the upgrade can store the device status data of the virtual device in batches to different storage locations in the shared data pool. The virtual machine is upgraded, and in the process of calling the target process to upgrade the virtual machine, the pre-stored device status data can be read in batches from different storage locations in the shared data pool through the target process.
[0059] Step S208: performing batch recovery processing on at least one virtual device in the upgraded virtual machine based on the batch read device status data.
[0060] In combination with step S206, it can be seen that the implementable solution of the present application is to perform batch recovery processing on at least one virtual device in the upgraded virtual machine based on the device status data read in batches. For example, batch recovery processing can be performed on the operating status of at least one virtual device in the upgraded virtual machine.
[0061] The following is an example of an optional solution. In the technical solution provided in the above step S208 of the present application, after the upgraded virtual machine accesses the shared data pool through the target process to obtain the device status data, the operating status of the virtual device in the upgraded virtual machine can be restored based on the device status data. Different types of virtual machine devices have different corresponding attributes. The attributes of the virtual device can be used to characterize the basic situation and technical characteristics of the virtual machine, for example, it can be used to characterize the physical device mapping, memory management, network management and other information of the virtual machine.
[0062] Since in the process of upgrading the virtual machine, it is necessary to receive and copy all device status data of the virtual devices from the virtual machine before the upgrade (also called the source virtual machine) to the upgraded virtual machine, if the device status data is downloaded from the source virtual machine and then uploaded to the target virtual machine, this process will consume a lot of download time, especially when a large amount of device status data is required, it will take more download time, and in the process of data downloading, the device status data can only be downloaded serially one by one, and multiple device status data cannot be downloaded in batches, resulting in a technical problem of low processing efficiency of the device status data of the virtual machine.
[0063] To solve the above problem, in this embodiment, a shared data pool that can be shared between the source virtual machine and the target virtual machine is created, and the device status data can be stored in the shared data pool. During the operation of the source virtual machine, the device status data can be stored in batches in the shared data pool. When the target virtual machine needs to use the device status data in the source virtual machine, it can directly obtain the device status data in batches from the shared data pool, avoiding the process of downloading the device status data, thereby saving data processing time and achieving the technical effect of improving the processing efficiency of the device status data of the virtual machine.
[0064] Optionally, after obtaining the upgraded virtual machine, the target process may be called to directly obtain the device status data from the storage location of the shared data pool. This method may obtain a large amount of device status data from the shared data pool in batches at the same time.
[0065] For example, before upgrading a virtual machine, the device status data of the virtual devices in the virtual machine before the upgrade can be stored in a shared data pool. In response to an upgrade instruction of the virtual machine, it is determined that the working state of the virtual machine is converted to an upgraded state. A target process can be created, and the upgrade file of the virtual machine is run through the target process to obtain the upgraded virtual machine. The target process obtains device status data in batches from different storage locations in the shared data pool, and restores the operating state of the virtual devices in the upgraded virtual machine based on the obtained device status data.
[0066] In an embodiment of the present application, in response to the working state of the virtual machine being an upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, the device state data of the upgraded virtual machine is obtained from the shared data pool, and the operating state of the virtual device in the upgraded virtual machine is restored based on the device state data, thereby achieving the purpose of batch and concurrent processing of the state data of the virtual machine, thereby achieving the technical effect of improving the processing efficiency of the state data of the virtual machine, and solving the technical problem of low processing efficiency of the state data of the virtual machine.
[0067] The above method of this embodiment is further introduced below.
[0068] As an optional implementation, step S208, based on the device status data read in batches, performs batch recovery processing on at least one virtual device in the upgraded virtual machine, including: determining at least one virtual device to be batch recovered in the upgraded virtual machine, wherein there is a one-to-one correspondence between the virtual devices to be batch recovered and the virtual devices in the virtual machine before the upgrade; marking the device status data read in batches as target status data; and using the target status data, batch updating the current operating status of the virtual devices to be batch recovered.
[0069] The achievable scheme of this embodiment is to determine at least one virtual device to be restored in the upgraded virtual machine; based on the device status data read in batches, mark it as the target status data of at least one virtual device in the upgraded virtual machine, wherein the target status data can be used to characterize the target operating state to which the virtual device is to be restored; and update the current operating state of the virtual device using the target status data, which can be updated to the target operating state. There is a one-to-one correspondence between the virtual devices to be batch restored and the virtual devices in the virtual machine before the upgrade. The current operating state can also be called the initial operating state, which can be used to characterize the operating state of the virtual device before the upgrade. The target operating state can be used to characterize the operating state of the updated virtual device.
[0070] Optionally, after obtaining the upgraded virtual machine, the virtual device to be restored in the upgraded virtual machine can be determined, and the target state data of the virtual device can be determined based on the device state data. Using the target state data, the initial running state of the virtual device can be updated to the target running state. The target running state can be used to characterize the target running state to which the virtual device is to be restored, which is consistent with the running state of the virtual device in the virtual machine before the upgrade.
[0071] Optionally, in the process of batch recovery of virtual devices, first determine the virtual devices to be recovered in the upgraded virtual machine, determine the target state data of the virtual devices from the device state data, and use the target state data to update the initial operation state of the virtual devices to the target operation state.
[0072] As an optional implementation, determining at least one virtual device in an upgraded virtual machine to be processed in batch recovery includes: obtaining the device identifier of each virtual device in the virtual machine before the upgrade; in the upgraded virtual machine, based on the device identifier of at least one virtual device in the virtual machine before the upgrade, determining the virtual devices with the same device identifier in the upgraded virtual machine as virtual devices to be processed in batch recovery.
[0073] The feasible scheme of the present application is to determine the device identification of each virtual device in the virtual machine before the upgrade, and the device identification can be used to determine the target device type of the virtual machine, and based on the target device type, can be used to determine the virtual device corresponding to each virtual device in the virtual machine before the upgrade in the upgraded virtual machine. In the upgraded virtual machine, based on the device identification of at least one virtual device in the virtual machine before the upgrade, the virtual devices with the same device identification in the upgraded virtual machine are determined as virtual devices to be processed for batch recovery. Among them, the device identification can be used to distinguish virtual devices, and can be the name, location, purpose, identity information, type, etc. of the virtual device. This is only for example, and no specific limitation is imposed on the type of device identification.
[0074] In this embodiment, determining the virtual devices to be batch restored in the upgraded virtual machine may include the following process: determining the device identifiers of the virtual devices in the virtual machine before the upgrade, determining the target device types of the virtual devices in the virtual machine before the upgrade based on the device identifiers, and determining the virtual devices in the upgraded virtual machine whose device types are the same as the target device types as the virtual devices to be restored. The target device types may include serial port types, controller types, etc., which are only used as examples and do not specifically limit the types of virtual devices.
[0075] Optionally, different types of virtual devices require different device status data. For example, the device status data of a Peripheral Component Interconnect (PCI) device may be the device status data of the configuration space. Therefore, when the device status data of a virtual device in a virtual machine before the upgrade is obtained from the shared data pool, the device status data may be used to restore the operating status of at least one virtual device in the upgraded virtual machine that has the same device identifier as the virtual device corresponding to the device status data.
[0076] For example, the device status data of the PCI device in the virtual machine before the upgrade in the shared data pool is obtained, the target device type of the PCI device is determined to be a computer hardware device, and the PCI device whose device type is a computer hardware device in the upgraded virtual machine is determined to be a virtual device. The target status data of the virtual device is determined based on the device status data, and the operating status of the upgraded PCI devices is restored in batches based on the target status data.
[0077] As an optional implementation, the device status data read in batches is marked as target status data, including: in response to the fact that the device identifier of at least one virtual device in the virtual machine before the upgrade is the same as the device identifier of the virtual device to be batch recovered, the device status data read in batches is determined as the target status data.
[0078] In this embodiment, if at least one virtual device in the virtual machine before the upgrade has the same device identifier as the virtual device to be batch restored, it can be determined that there is a one-to-one correspondence between the two virtual devices, and the device status data read in batches can be determined as the target status data. The target status data is used to complete the recovery of the operating status of the virtual devices in the upgraded virtual machine.
[0079] In the case where the device identifier can determine the device type of the virtual device, the target device type of the virtual device is determined based on the device identifier, and the virtual device corresponding to the virtual device in the virtual machine before the upgrade in the virtual machine after the upgrade is determined based on the target device type. In response to the fact that at least one virtual device in the virtual machine before the upgrade has the same device identifier as the virtual device to be batch restored, the device status data of the virtual device can be determined as the target status data of the virtual device, and the operating status of the virtual device can be restored based on the target status data.
[0080] As an optional implementation, the current running status of the virtual devices to be batch recovered is updated in batches using the target status data, including: when there are multiple virtual devices to be batch recovered, triggering an instruction to concurrently execute the batch recovery; in response to the instruction to batch recover, controlling the multiple virtual devices to be batch recovered to concurrently execute the batch recovery so that the device status data of each virtual device is restored to the target status data.
[0081] In this embodiment, there may be a situation where the running status of multiple virtual devices needs to be restored. In the case where there are multiple virtual devices to be restored in batch, an instruction to perform batch restoration concurrently may be triggered. In response to the instruction to perform batch restoration, multiple virtual devices to be restored in batch may be controlled to perform batch restoration concurrently, so that the device status data of each virtual device in the upgraded virtual machine is restored to the target status data.
[0082] In combination with the achievable scheme in the above steps, a concurrent instruction batch recovery processing instruction can be triggered to concurrently obtain device status data corresponding to multiple virtual devices stored in different storage locations in the shared data pool to obtain multiple device status data. The device status data stored in different storage locations can be used to concurrently restore the device status data of each virtual device to the target status data, so as to restore the initial running state of the virtual device in the corresponding upgraded virtual machine to the corresponding target running state.
[0083] Optionally, in order to distinguish the virtual devices in the upgraded virtual machine from the virtual devices in the virtual machine before the upgrade, the virtual devices in the upgraded virtual machine can also be called target virtual devices. After the shared data pool is introduced, the device status data of the virtual devices in the virtual machine before the upgrade and the device status data of the upgraded virtual machine can be stored in a shared data pool that can be accessed together. When the virtual machine is upgraded, a large amount of virtual device data can be directly obtained in batches from different storage locations in the shared data pool, and the virtual device data of the virtual device can be determined based on the large amount of virtual device data. The operating status of multiple virtual devices is restored in parallel based on the virtual device data, thereby achieving the purpose of improving the data processing efficiency during the virtual machine upgrade process.
[0084] After the device status data is downloaded serially, the running status of the virtual devices in the upgraded virtual machine can only be restored in sequence, resulting in a problem of low data processing efficiency. In this embodiment, the destination virtual machine process (i.e., the target process) can download the device status data in the shared data pool in one go, in batches, and restore the running status of the target virtual device, thereby achieving the purpose of improving data processing efficiency.
[0085] As an optional implementation, respectively acquiring the device status data stored in different storage locations in the shared data pool includes: batch acquiring the device status data stored in different storage locations from the shared data pool through the target process.
[0086] In this embodiment, since the data in the virtual machine is managed by a process, a target process can be created in response to an upgrade instruction of the virtual machine, and the device status data stored in different storage locations can be obtained in batches from the shared data pool through the target process.
[0087] In this embodiment, virtual device data is uniformly managed by a shared data pool, which can save and restore device status data of virtual devices in batches. When restoring the status of virtual devices, the virtual device status data does not need to be copied, and the virtual device data in the shared data pool can be directly saved and restored in batches concurrently through the target process, thereby achieving the technical effect of improving the processing efficiency of the virtual machine's status data and solving the technical problem of low processing efficiency of the virtual machine's status data.
[0088] As an optional implementation, step S206, batch reading device status data from different storage locations in the shared data pool, includes: performing batch reading operations regularly or at predetermined intervals to obtain device status data stored in different storage locations in the shared data pool.
[0089] An implementable scheme of this embodiment is that, when the operating status of the virtual device in the upgraded virtual machine needs to be updated, a batch read operation can be performed periodically or at predetermined intervals to obtain device status data at different storage locations respectively; and / or the device status data stored by the initial process at different storage locations can be obtained respectively, wherein the initial process is used to maintain the device status data of the virtual device in the virtual machine before the upgrade, and can be a source virtual machine process.
[0090] In this embodiment, before upgrading the virtual machine, it is necessary to maintain the device status data of the virtual devices in the virtual machine before the upgrade. The device status data of the virtual device can be regularly transmitted to the shared data pool for storage to achieve the purpose of maintaining the device status data. When the virtual machine starts to be upgraded, the status data of the virtual device in the virtual machine before the upgrade can be transmitted to the shared data pool for storage through the initial process. After the upgrade of the virtual machine is completed, a batch read operation can be performed regularly or at predetermined intervals to obtain the device status data stored in different storage locations of the shared data pool, and the running status of the virtual devices in the upgraded virtual machine can be batch restored based on the device status data.
[0091] For example, when creating a source virtual machine, it is necessary to maintain a shared data pool. Virtual device data can be transferred to the shared data pool, and all device status data can be saved in the shared data pool, so that the target process can obtain the device status data stored in different storage locations from the shared data pool, thereby achieving the purpose of improving data processing efficiency.
[0092] As an optional implementation, step S202, in response to the working state of the virtual machine being an upgrade state, creates a target process, including: in response to the upgrade instruction, obtains a creation instruction for creating the target process issued by the virtual machine before the upgrade; in response to the creation instruction, creates the target process.
[0093] In this embodiment, when the working state of the virtual machine is the upgrade state, the source virtual machine does not need to send device status data to the destination virtual machine process, but only needs to issue a creation instruction for creating a target process. Based on the creation instruction, the target process can be created, and batch recovery of device status data can be started based on the target process.
[0094] For example, when hot migration or hot upgrade occurs, it is determined that the virtual machine is in an upgrade state. In response to the upgrade instruction, the source virtual machine does not need to send device status data to the destination virtual machine process, but only needs to send a creation instruction to inform the destination virtual machine process that it can start batch concurrent recovery of devices. The cloud can obtain the creation instruction for creating the target process issued by the virtual machine before the upgrade to create the target process.
[0095] As an optional implementation, the method also includes: in the case where there are multiple virtual machines that all perform an upgrade, before the upgrade, different virtual machines store device status data in different storage areas of a shared data pool, and each virtual machine records the storage address locally, and the storage address recorded locally by each virtual machine is used to indicate the corresponding storage area in the shared data pool, and the storage area includes different storage locations, wherein the method also includes: after the virtual machine is upgraded, based on the locally recorded storage address, performing a batch read operation on the storage area corresponding to the shared data pool, so that the device status data is batch read from different storage locations in the shared data pool.
[0096] The implementation scheme of this embodiment is that different virtual machines may correspond to different storage areas. In the case where multiple virtual machines are performing upgrades, different virtual machines may store device status data in different storage areas of a shared data pool before the upgrade, and each virtual machine may record the storage address locally, and the storage address may be used to indicate the storage area corresponding to the virtual machine in the shared data pool. The storage address may also be called a memory address, which may be used to indicate a storage location.
[0097] In this embodiment, after the virtual machine is upgraded, a batch read operation can be performed on the storage area corresponding to the shared data pool based on the locally recorded storage address, and the device status data can be batch read from different storage locations in the shared data pool according to the storage address. Optionally, the storage address can be sent to the target process of the upgraded virtual machine through a create instruction, and the target process can determine the corresponding storage area in the shared data pool based on the storage address to batch read the device status data from the storage area.
[0098] This embodiment can obtain the storage address from the target address and obtain the corresponding device status data based on the storage address through the following steps: the creation instruction can include a memory address, and the creation instruction can be used to send the storage address to the target process. When the working state is the upgrade state, a creation instruction can be issued, and the target process is created based on the creation instruction. The creation instruction is parsed to obtain the memory address in the creation instruction, and the corresponding memory address is allocated to the target process. Among them, the memory address (DevPtr) can be pre-set and can be used to determine the storage location of the device status data. For example, it can be a virtual address or a physical address in the kernel state. It should be noted that this is only an example and does not specifically limit the type of memory address.
[0099] Based on the above method, after creating the target process, a corresponding memory address can be allocated to the target process to obtain a memory space (i.e., a storage area) that can be read by the target process. The target process can be configured with the same memory address as the initial process of the virtual machine before the upgrade, so that the memory space corresponding to the target process and the initial process is the same.
[0100] Optionally, the device status data is obtained from the data pool. This method can obtain a large amount of device status data from the shared data pool in batches at the same time.
[0101] For example, the target virtual machine process executes the upgrade file corresponding to the virtual machine to obtain the upgraded virtual machine, obtains the device status information in the shared data pool based on the memory address, and restores the running status of the virtual device in the upgraded virtual machine based on the device status information. That is, in this embodiment, the device status data of the virtual device is stored in the shared data pool. When the virtual machine is upgraded, the memory address storing the device status data in the shared data pool can be assigned to the target process. In the target process, the virtual device data can be obtained from the shared data pool based on the memory address, and the running status of the virtual device can be restored based on the device status data, thereby achieving the technical effect of improving the processing efficiency of the virtual machine's status data and solving the technical problem of low processing efficiency of the virtual machine's status data.
[0102] To take another example, the device status data of the source virtual machine is sent to the shared data pool. When the source virtual machine is ready to be upgraded, the source virtual machine sends a creation instruction, wherein the creation instruction includes a memory address for storing the device status data. In response to the creation instruction sent by the source virtual machine, a target process is created, and a corresponding memory address is allocated to the target process.
[0103] As an optional implementation, running the upgrade file of the virtual machine to obtain the upgraded virtual machine includes: running the upgrade file of the virtual machine, controlling hot upgrade or hot migration of the virtual machine, and obtaining the upgraded virtual machine.
[0104] In this embodiment, the upgrade state may include a state in which the virtual machine starts hot upgrade or hot migration, that is, the target process may be called to perform hot upgrade or hot migration on the virtual machine.
[0105] Optionally, during the hot migration or hot upgrade process, the preservation and restoration of the device status data of the virtual device also occupies a certain proportion of the download time. The more virtual devices there are, the longer the download time is. To solve the above problem, in this embodiment, if hot migration and hot upgrade are performed on the local machine, the device status data of the virtual device does not need to be copied, and the new virtual machine process can directly obtain the status data of the virtual device stored in the memory address from the shared data pool, and then restore the running status of the virtual device, so that the running status of all virtual devices of the virtual machine can be saved and restored in batches and concurrently, thereby reducing the overall download time of the device status data.
[0106] In an embodiment of the present application, when a virtual machine is upgraded, a target process is created, an upgraded virtual machine is obtained based on the target process, device status data of the upgraded virtual machine is obtained from a shared data pool, and the operating status of the virtual devices in the upgraded virtual machine is restored based on the device status data, thereby achieving the purpose of batch and concurrent processing of the status data of the virtual machine, thereby achieving the technical effect of improving the processing efficiency of the status data of the virtual machine, and solving the technical problem of low processing efficiency of the status data of the virtual machine.
[0107] The embodiment of the present application also provides a data processing method for a virtual machine from the memory side. Figure 3 is a flow chart of another data processing method of a virtual machine according to an embodiment of the present application. Figure 3 As shown, the method may include the following steps.
[0108] Step S302, in response to an access instruction of the virtual machine before the upgrade, obtaining device status data of at least one or more virtual devices in the virtual machine before the upgrade, wherein the virtual machine is deployed in the cloud.
[0109] The achievable solution of the present application is that, in response to the access instruction of the virtual machine before the upgrade, the device status data of at least one or more different virtual devices in the virtual machine before the upgrade can be obtained. The access instruction can be used to access the shared data pool to transfer the device status data to the shared data pool.
[0110] Step S304: storing device status data of different virtual devices in different storage locations in the shared data pool.
[0111] In the technical solution provided in the above step S304 of the present application, the initial process of the virtual machine before the upgrade can regularly maintain the device status data of the virtual device to send the device status data of the virtual device to the shared data pool. The shared data pool can obtain the device status data of the virtual device in the virtual machine and store it. Among them, the device status data can be used to characterize the operating status of the virtual device currently running in the virtual machine before the upgrade.
[0112] Step S306, in response to the batch transmission operation, the device status data at different storage locations are batch transmitted to the virtual devices of the upgraded virtual machine, wherein the batch transmitted device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, and the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade.
[0113] An implementable solution of the present application is that, in response to a batch transfer operation, device status data at different storage locations are batch transferred to the virtual devices of the upgraded virtual machine through a target process, wherein the target process is created based on the upgrade instructions of the virtual machine before the upgrade, and the device status data transmitted to the virtual device is used for batch recovery processing of the operating status of at least one virtual device in the upgraded virtual machine.
[0114] It can be explained that in the technical solution provided in the above step S306 of the present application, the shared data pool stores the device status data. When the working state of the virtual machine is the upgrade state, a target process can be created. The target process is called to run the upgrade file to complete the upgrade of the virtual machine and obtain the upgraded virtual machine. The device status data can be obtained from the storage location of the shared data pool. The shared data pool can transfer the device status data stored at the storage location to the virtual device of the upgraded virtual machine through the target process to restore the operating state of the virtual device in the upgraded virtual machine.
[0115] As an optional implementation, step S304, storing device status data of different virtual devices in different storage locations of a shared data pool, includes: in response to concurrently executing storage instructions, concurrently storing device status data of different virtual devices in different storage locations.
[0116] In this embodiment, the virtual machine needs to maintain the device status data in the shared data pool. In response to the concurrent execution storage instruction, the virtual machine before the upgrade can concurrently store the device status data of different virtual devices in different storage locations.
[0117] Optionally, a memory address corresponding to the virtual device is determined to determine a storage location corresponding to the virtual device. Multiple device status data may be concurrently stored in a storage location corresponding to the memory address, so that the target process can obtain the corresponding device status data based on the memory address to restore the running state of the virtual device.
[0118] Optionally, the shared data pool can not only store the device status data, but also provide access, query and processing functions for the data, so as to improve the data processing efficiency through the shared data pool.
[0119] As an optional implementation, step S304, storing device status data of different virtual devices in different storage locations of the shared data pool, includes: storing device status data of different virtual devices in different storage locations regularly or at predetermined intervals.
[0120] Optionally, when the shared data pool obtains the device status data of multiple virtual machines transmitted by the initial process of the virtual machine before the upgrade, the storage location corresponding to the virtual device can be determined, and the device status data of different virtual devices can be stored concurrently in different storage locations at regular intervals or at predetermined intervals.
[0121] As an optional implementation, the method may further include: sending multiple device status data in parallel to the virtual devices corresponding to the device status data.
[0122] In this embodiment, the target process can send multiple device status data in the shared shared data pool to the virtual device at one time, in batches, and concurrently to concurrently restore the running status of the virtual device.
[0123] Optionally, the virtual device data of the virtual machines in the virtual machine before the upgrade can be saved and restored in batches concurrently. In scenarios with a large number of virtual devices, the download time during the hot migration or hot upgrade of the virtual machine can be significantly reduced, thereby reducing the impact on customer upgrade requirements due to excessive data volume.
[0124] Optionally, when creating a source virtual machine, it is necessary to maintain the device status data in the shared data pool. All device status data of the virtual machine before the upgrade can be stored in the shared data pool through the initial process, and the device status data can be transmitted according to a certain target period or fixed time. For example, the device status data can be transmitted to the shared data pool through the initial process every week or every Monday. It should be noted that this is only an example and does not impose specific restrictions on the time for transmitting the device status data. In response to the upgrade instruction of the virtual machine, multiple device status data can be obtained from different storage locations and sent in parallel to the virtual devices corresponding to the device status data.
[0125] As an optional implementation, the method may further include: when there are multiple virtual machines that are all upgraded, different storage areas of the shared data pool store device status data of different virtual machines before the virtual machines are upgraded, and the storage areas include different storage locations.
[0126] In this embodiment, when there are multiple virtual machines that are all performing upgrades, the device status data of virtual devices in different virtual machines can be stored at different storage locations in the shared data pool, and the storage location of the device status data is determined using the storage address.
[0127] In this embodiment, in response to an access instruction of the virtual machine before the upgrade, device status data of at least one or more virtual devices in the virtual machine before the upgrade is obtained, wherein the virtual machine is deployed in the cloud; the device status data of different virtual devices are stored in different storage locations of a shared data pool; in response to a batch transmission operation, the device status data at different storage locations are batch transmitted to the virtual devices of the upgraded virtual machine, wherein the batch transmitted device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, and the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade, thereby achieving the purpose of batch and concurrent processing of the status data of the virtual machine, and further achieving the technical effect of improving the processing efficiency of the status data of the virtual machine, and solving the technical problem of low processing efficiency of the status data of the virtual machine.
[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0129] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0131] Example 2
[0132] According to an embodiment of the present application, an embodiment of a data processing system for a virtual machine is also provided. Figure 4is a schematic diagram of a data processing system of a virtual machine according to an embodiment of the present application, such as Figure 4 As shown, the data processing system 400 of a virtual machine may include: a virtual machine 402 and a memory 404 .
[0133] The cloud 402 is used to run the upgrade file of the virtual machine in response to the working state of the virtual machine being an upgrade state to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud.
[0134] In this embodiment, the cloud 402 may run a virtual machine. The virtual machine may include a virtual machine before upgrading and a virtual machine after upgrading. The virtual machine before upgrading may be referred to as a source virtual machine, and the virtual machine after upgrading may be referred to as a destination virtual machine.
[0135] Optionally, the cloud 402 is used to restore the operating status of the virtual device in the upgraded virtual machine based on the device status data transmitted to the virtual device.
[0136] In this embodiment, the cloud 402 can be used to trigger access to a shared data pool during a virtual machine upgrade, batch read device status data from different storage locations in the shared data pool, and perform batch recovery processing on at least one virtual device in the upgraded virtual machine based on the batch read device status data.
[0137] The memory 404 is used to obtain the device status data of at least one or more virtual devices in the virtual machine before the upgrade in response to the access instruction of the virtual machine before the upgrade, and store the device status data of different virtual devices in different storage locations of the shared data pool.
[0138] In this embodiment, the memory 404 may be a shared data pool, which may be referred to as a data pool. In response to the access instruction of the virtual machine before the upgrade, the memory 404 may obtain the device status data of at least one or more virtual devices in the virtual machine before the upgrade through the target process, and transmit the device status data stored in different storage locations in the shared data pool to the virtual device of the upgraded virtual machine through the target process, wherein the device status data is accessed by the virtual machine before the upgrade and stored in the shared data pool, and is used to characterize the running status of the virtual device in the virtual machine before the upgrade.
[0139] In this embodiment, the memory can be used to store device status data of virtual devices from the virtual machine before the upgrade, and through the target process, the device status data stored in different storage locations in the shared data pool are respectively transmitted to the virtual devices of the upgraded virtual machine to restore the operating status of the virtual devices in the upgraded virtual machine.
[0140] In this embodiment, through the cloud 402, in response to the working state of the virtual machine being an upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud; through the storage 404, in response to the access instruction of the virtual machine before the upgrade, the device status data of at least one or more virtual devices in the virtual machine before the upgrade is obtained, and the device status data of different virtual devices are stored in different storage locations of the shared data pool; wherein, the cloud 402 is used to trigger access to the shared data pool during the virtual machine upgrade process, batch read the device status data from different storage locations of the shared data pool, and batch restore the at least one virtual device in the upgraded virtual machine based on the batch read device status data, thereby achieving the purpose of batch and concurrent processing of the virtual machine status data, and then achieving the technical effect of improving the processing efficiency of the virtual machine status data, and solving the technical problem of low processing efficiency of the virtual machine status data.
[0141] Example 3
[0142] Currently, during the hot migration or hot upgrade process, the preservation and restoration of device state data of the virtual device of the virtual machine also occupies a certain proportion of the download time. The more virtual devices there are, the more download time there is.
[0143] In the related art, Figure 5 is a schematic diagram of device status data maintenance according to an embodiment of the present application, such as Figure 5 As shown, the source virtual machine 51 may include device status data of multiple virtual devices, such as device status data 501, ..., device status data 50n, etc., and the target virtual machine 52 may include device status data of multiple target virtual devices. The source virtual machine and the target virtual machine maintain corresponding device status data through their respective virtual machine processes. Hot upgrade or hot migration requires receiving and copying all device status data from the source virtual machine to the target virtual machine.
[0144] Figure 6 is a schematic diagram of restoring device status data according to an embodiment of the present application, such as Figure 6As shown, the device status data of the virtual devices are stored serially, that is, in order, the device status data of the first virtual device 601, the device status data of the second virtual device 602, and the device status data of the last virtual device 60n are sequentially stored, and the device status data are sequentially sent to the destination virtual machine process through the data stream. The destination virtual machine process receives the device status data of the first virtual device, and based on the device status data, restores the operating status of the virtual devices 61, 62, ..., 6n in the destination process, and so on, until the operating status preservation and restoration of the last virtual device is completed. That is, in this embodiment, the state preservation and recovery process of the virtual device is executed serially: if the virtual machine and the physical device are directly connected, or some functions are simulated in the kernel state, then the state recovery of the virtual device may involve the switching between the kernel state and the user state, as well as the operation of the real hardware. Serial execution will have a relatively large overhead, which will eventually increase the overall download time of the hot migration or hot upgrade, thereby resulting in a technical problem of low processing efficiency of the virtual state data.
[0145] To solve the above problems, this embodiment provides a virtual device state saving method based on a data pool. The method creates a shared data pool for storing device states between the new and old virtual machine processes. After the data pool is introduced, the device state data of the destination virtual machine process and the source virtual machine process can be stored in a data pool that can be accessed together, so that there is no need to transmit the device state data through the network data stream. The target virtual machine process can directly obtain the device state data for updating the running state of the target virtual device from the data pool, thereby enabling batch and concurrent save and restore operations on the running state of all virtual devices of the virtual machine, thereby reducing the overall download time.
[0146] In this embodiment, if hot migration and hot upgrade are performed locally, the device status data does not need to be copied, and the new virtual machine process (i.e., the target process) can directly obtain the memory address of the storage device status data from the data pool, and then restore the status of the virtual device, thereby achieving the purpose of batch and concurrent processing of the device status data of the virtual machine, thereby achieving the technical effect of improving the processing efficiency of the virtual machine's status data and solving the technical problem of low processing efficiency of the virtual machine's status data.
[0147] Figure 7 is a schematic diagram of restoring the operating state of a virtual device through a data pool according to an embodiment of the present application, such as Figure 7As shown, a shared data pool for storing device status can be created between the new and old virtual machine processes, and the device status data in the destination virtual machine 71 is transmitted to the data pool 72 through the destination virtual machine process, and the device status data in the source virtual machine 73 is stored in the data pool 72 through the source virtual machine process. The destination virtual machine process and the source virtual machine process can obtain the device status data stored in the data pool based on the memory address (Ptr). In this embodiment, the preservation and restoration of the virtual device status can be processed one-time, in batches, and concurrently.
[0148] Figure 8 is a schematic diagram of batch concurrent processing of device status data according to an embodiment of the present application, such as Figure 8 As shown, when the source virtual machine is created, it maintains a device status data pool (which can be referred to as the data pool for short) and saves all device status data in the data pool; when hot migration or hot upgrade occurs, the source virtual machine does not need to send the device status data to the destination, but only needs to inform the destination virtual machine process that it can start batch concurrent recovery of the device and the memory address of the device status data. The destination virtual machine process restores the running status of the virtual device in one go and in batches concurrently based on the device status data in the shared data pool.
[0149] In this embodiment, the target process can restore the operating status of virtual devices in batches concurrently. In scenarios with a large number of devices, the data download time for hot migration or hot upgrade can be significantly reduced, reducing the impact on customer upgrade needs.
[0150] In the embodiment of the present application, the device state data of the virtual devices in the virtual machine are uniformly managed by the data pool, and the device state data of the virtual devices can be saved and restored in batches during hot migration or hot upgrade. When the local machine is hot migrated or hot upgraded, the virtual device state data does not need to be copied, and can be directly saved and restored in batches from the data pool in parallel, thereby achieving the purpose of batch and concurrent processing of the state data of the virtual machine, thereby achieving the technical effect of improving the processing efficiency of the state data of the virtual machine, and solving the technical problem of low processing efficiency of the state data of the virtual machine.
[0151] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application, such as weather forecast results and other data, are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0152] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0154] Example 4
[0155] According to an embodiment of the present application, there is also provided a method for implementing the above Figure 2 The virtual machine data processing method shown is a virtual machine data processing device.
[0156] Fig. 9 is a schematic diagram of a data processing device of a virtual machine according to an embodiment of the present application, such as Fig. 9 As shown, the data processing device 900 of the virtual machine may include: an operating unit 902 , an access unit 904 , a reading unit 906 and a processing unit 908 .
[0157] The running unit 902 is used to run the upgrade file of the virtual machine in response to the working state of the virtual machine being the upgrade state to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud.
[0158] Access unit 904 is used to trigger access to a shared data pool during a virtual machine upgrade, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and device status data of different virtual devices are stored in different storage locations of the shared data pool.
[0159] The reading unit 906 is used to read the device status data in batches from different storage locations in the shared data pool.
[0160] The processing unit 908 is configured to perform batch recovery processing on at least one virtual device in the upgraded virtual machine based on the batch read device status data.
[0161] It should be noted that the above-mentioned operation unit 902, access unit 904, reading unit 906 and processing unit 908 correspond to steps S202 to S208 in Example 1, and the four units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned units can be hardware components or software components stored in a memory and processed by one or more processors, and the above-mentioned units can also be run in the computer terminal provided in Example 1 as part of the device.
[0162] According to an embodiment of the present application, another method for implementing the above Figure 3 The virtual machine data processing method shown is a virtual machine data processing device.
[0163] Fig.10 is a schematic diagram of another data processing device of a virtual machine according to an embodiment of the present application, such as Fig.10 As shown, the data processing device 1000 of the virtual machine may include: an acquisition unit 1002 , a storage unit 1004 and a transmission unit 1006 .
[0164] The acquisition unit 1002 is used to obtain device status data of at least one or more virtual devices in the virtual machine before the upgrade in response to an access instruction of the virtual machine before the upgrade, wherein the virtual machine is deployed in the cloud.
[0165] The storage unit 1004 is used to store device status data of different virtual devices in different storage locations in the shared data pool.
[0166] The transmission unit 1006 is used to respond to the batch transmission operation and batch transmit the device status data at different storage locations to the virtual devices of the upgraded virtual machine, wherein the batch transmitted device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, and the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade.
[0167] It should be noted that the acquisition unit 1002, storage unit 1004 and transmission unit 1006 correspond to steps S302 to S306 in Example 1, and the three units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned units can be hardware components or software components stored in a memory and processed by one or more processors, and the above-mentioned units can also be run in the computer terminal provided in Example 1 as part of the device.
[0168] In the above-mentioned device, in response to the working state of the virtual machine being an upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, the device state data of the upgraded virtual machine is obtained from the shared data pool, and the operating state of the virtual device in the upgraded virtual machine is restored based on the device state data, thereby achieving the purpose of batch and concurrent processing of the state data of the virtual machine, and further achieving the technical effect of improving the processing efficiency of the state data of the virtual machine, and solving the technical problem of low processing efficiency of the state data of the virtual machine.
[0169] Example 5
[0170] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.
[0171] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0172] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the data processing method of the virtual machine: in response to the working state of the virtual machine being an upgrade state, running the upgrade file of the virtual machine to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud; in the process of virtual machine upgrade, triggering access to a shared data pool, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and the device status data of different virtual devices are stored in different storage locations of the shared data pool; batch reading device status data from different storage locations of the shared data pool; based on the batch read device status data, batch recovery processing is performed on at least one virtual device in the upgraded virtual machine.
[0173] Optionally, Fig.11 is a structural block diagram of a computer terminal according to an embodiment of the present application. Fig.11 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 1102 , a memory 1104 and a transmission device 1106 .
[0174] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data processing method and device of the virtual machine in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the data processing method of the virtual machine mentioned above. The memory 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 instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0175] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: in response to the working state of the virtual machine being an upgrade state, run the upgrade file of the virtual machine to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud; during the virtual machine upgrade process, trigger access to a shared data pool, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and the device status data of different virtual devices are stored in different storage locations of the shared data pool; batch read device status data from different storage locations of the shared data pool; based on the batch read device status data, batch recovery processing is performed on at least one virtual device in the upgraded virtual machine.
[0176] Optionally, the processor may also execute program code for the following steps: determining at least one virtual device to be processed in batch recovery in the upgraded virtual machine, wherein there is a one-to-one correspondence between the virtual devices to be processed in batch recovery and the virtual devices in the virtual machine before the upgrade; marking the device status data read in batches as target status data; and using the target status data, batch updating the current operating status of the virtual devices to be processed in batch recovery.
[0177] Optionally, the processor may also execute the program code of the following steps: obtaining the device identification of each virtual device in the virtual machine before the upgrade; in the upgraded virtual machine, based on the device identification of at least one virtual device in the virtual machine before the upgrade, determining the virtual devices with the same device identification in the upgraded virtual machine as virtual devices to be batch recovered.
[0178] Optionally, the processor may also execute program code of the following steps: in response to at least one virtual device in the virtual machine before upgrading having the same device identifier as the virtual device to be batch restored, determining the batch read device status data as target status data.
[0179] Optionally, the processor may also execute program code for the following steps: when there are multiple virtual devices to be processed in batch, trigger an instruction to concurrently execute batch recovery processing; in response to the instruction to concurrently execute batch recovery processing, control multiple virtual devices to be processed in batch to concurrently execute batch recovery processing, so that the device status data of each virtual device is restored to the target status data.
[0180] Optionally, the processor may also execute program codes of the following steps: performing batch reading operations regularly or at predetermined intervals to respectively obtain device status data stored in different storage locations of the shared data pool.
[0181] Optionally, the processor may also execute the following program code: after the virtual machine is upgraded, based on the locally recorded storage address, a batch read operation is performed on the storage area corresponding to the shared data pool, so that device status data is batch read from different storage locations in the shared data pool.
[0182] Optionally, the processor may further execute program codes of the following steps: running an upgrade file of the virtual machine, controlling hot upgrade or hot migration of the virtual machine, and obtaining an upgraded virtual machine.
[0183] As an optional example, the processor can call the information and applications stored in the memory through the transmission device to perform the following steps: in response to the access instruction of the virtual machine before the upgrade, obtain the device status data of at least one or more virtual devices in the virtual machine before the upgrade, wherein the virtual machine is deployed in the cloud; store the device status data of different virtual devices in different storage locations in a shared data pool; in response to the batch transmission operation, batch transmit the device status data at different storage locations to the virtual devices of the upgraded virtual machine, wherein the batch transmitted device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, and the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade.
[0184] Optionally, the processor may also execute program code of the following steps: in response to the concurrent execution storage instruction, concurrently store device status data of different virtual devices in different storage locations.
[0185] Optionally, the processor may also execute program code of the following steps: storing device status data of different virtual devices in different storage locations at regular intervals or at predetermined intervals.
[0186] By adopting the embodiment of the present application, in response to the working state of the virtual machine being an upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, the device state data of the upgraded virtual machine is obtained from the shared data pool, and the operating state of the virtual device in the upgraded virtual machine is restored based on the device state data, thereby achieving the purpose of batch and concurrent processing of the state data of the virtual machine, and further achieving the technical effect of improving the processing efficiency of the state data of the virtual machine, and solving the technical problem of low processing efficiency of the state data of the virtual machine.
[0187] It can be understood by those skilled in the art that Fig.11 The structure shown is for illustration only, and the computer terminal A may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.11 It does not limit the structure of the above-mentioned computer terminal A. For example, the computer terminal A may also include Fig.11 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.11 Different configurations shown.
[0188] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0189] Example 6
[0190] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the data processing method of the virtual machine provided in the first embodiment.
[0191] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0192] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: in response to the working state of the virtual machine being an upgraded state, running the upgrade file of the virtual machine to obtain an upgraded virtual machine, wherein the virtual machine is deployed in the cloud; during the virtual machine upgrade process, triggering access to a shared data pool, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and the device status data of different virtual devices are stored in different storage locations of the shared data pool; batch reading device status data from different storage locations of the shared data pool; and batch recovery processing of at least one virtual device in the upgraded virtual machine based on the batch read device status data.
[0193] Optionally, the computer-readable storage medium may also execute program code for the following steps: determining at least one virtual device to be processed in batch recovery in the upgraded virtual machine, wherein there is a one-to-one correspondence between the virtual devices to be processed in batch recovery and the virtual devices in the virtual machine before the upgrade; marking the device status data read in batches as target status data; and using the target status data, batch updating the current operating status of the virtual devices to be processed in batch recovery.
[0194] Optionally, the computer-readable storage medium may also execute program code for the following steps: obtaining the device identification of each virtual device in the virtual machine before the upgrade; and in the upgraded virtual machine, based on the device identification of at least one virtual device in the virtual machine before the upgrade, determining the virtual devices with the same device identification in the upgraded virtual machine as virtual devices to be subjected to batch recovery processing.
[0195] Optionally, the computer-readable storage medium may also execute program code of the following steps: in response to at least one virtual device in the virtual machine before the upgrade having the same device identifier as the virtual device to be batch restored, determining the device status data read in batches as target status data.
[0196] Optionally, the computer-readable storage medium may also execute program code for the following steps: when there are multiple virtual devices to be processed in batch, trigger an instruction to concurrently execute batch recovery processing; in response to the instruction to concurrently execute batch recovery processing, control multiple virtual devices to be processed in batch to concurrently execute batch recovery processing, so that the device status data of each virtual device is restored to the target status data.
[0197] Optionally, the computer-readable storage medium may also execute program code for the following steps: performing batch reading operations regularly or at predetermined intervals to respectively obtain device status data stored in different storage locations of the shared data pool.
[0198] Optionally, the computer-readable storage medium may also execute program code of the following steps: after the virtual machine is upgraded, based on the locally recorded storage address, a batch read operation is performed on the storage area corresponding to the shared data pool, so that device status data is read in batches from different storage locations of the shared data pool.
[0199] Optionally, an upgrade file of the virtual machine is run to control hot upgrade or hot migration of the virtual machine to obtain an upgraded virtual machine.
[0200] As an optional example, a computer-readable storage medium is configured to store program code for performing the following steps: in response to an access instruction of a virtual machine before an upgrade, obtaining device status data of at least one or more virtual devices in the virtual machine before an upgrade, wherein the virtual machine is deployed in the cloud; storing device status data of different virtual devices in different storage locations in a shared data pool; in response to a batch transfer operation, batch transferring device status data at different storage locations to virtual devices of the upgraded virtual machine, wherein the batch transferred device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, and the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade.
[0201] Optionally, the computer-readable storage medium may also execute program code for the following steps: in response to concurrently executing stored instructions, concurrently storing device status data of different virtual devices in different storage locations.
[0202] Optionally, the computer-readable storage medium may also execute program code for the following steps: storing device status data of different virtual devices in different storage locations at regular intervals or at predetermined intervals.
[0203] By adopting the embodiment of the present application, in response to the working state of the virtual machine being an upgraded state, the upgrade file of the virtual machine is run to obtain the upgraded virtual machine, the device state data of the upgraded virtual machine is obtained from the shared data pool, and the operating state of the virtual device in the upgraded virtual machine is restored based on the device state data, thereby achieving the purpose of batch and concurrent processing of the state data of the virtual machine, and further achieving the technical effect of improving the processing efficiency of the state data of the virtual machine, and solving the technical problem of low processing efficiency of the state data of the virtual machine.
[0204] Example 7
[0205] An embodiment of the present application may provide an electronic device, which may include a memory and a processor.
[0206] Fig.12It is a block diagram of an electronic device according to a data processing method of a virtual machine according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0207] like Fig.12 As shown, the device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 to a random access memory (RAM) 1203. In RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, ROM 1202, and RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0208] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1204, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0209] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above, such as a data processing method of a virtual machine. For example, in some embodiments, the data processing method of a virtual machine may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via the ROM 1202 and / or the communication unit 12010. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the data processing method of the virtual machine described above may be executed. Alternatively, in other embodiments, the computing unit 1201 may be configured to execute the data processing method of the virtual machine in any other appropriate manner (eg, by means of firmware).
[0210] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0211] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0212] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0213] To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having: a display device (e.g., a cathode ray tube or liquid crystal display, monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or path ball) through which the user can provide input to the computer. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0214] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area networks, wide area networks, and the Internet.
[0215] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0216] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0217] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0218] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0219] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0220] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0221] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, read-only memory random access memories, mobile hard disks, magnetic disks or optical disks.
[0222] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data processing method for a virtual machine, characterized in that: Applied in the cloud, including: In response to the working state of the virtual machine being an upgraded state, running an upgrade file of the virtual machine to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud; During the upgrade of the virtual machine, access to a shared data pool is triggered, wherein the shared data pool is used to store device status data of at least one or more virtual devices in the virtual machine before the upgrade, and device status data of different virtual devices are stored in different storage locations of the shared data pool; Reading device status data in batches from different storage locations of the shared data pool; Based on the device status data read in batches, batch recovery processing is performed on at least one virtual device in the upgraded virtual machine.
2. The method according to claim 1, characterized in that Based on the device status data read in batches, batch recovery processing is performed on at least one virtual device in the upgraded virtual machine, including: Determine at least one virtual device in the upgraded virtual machine to be subjected to the batch recovery process, wherein the virtual device to be subjected to the batch recovery process has a one-to-one correspondence with the virtual device in the virtual machine before the upgrade; Marking the device status data read in batches as target status data; The target status data is used to batch update the current running status of the virtual devices to be subjected to the batch recovery process.
3. The method according to claim 2, characterized in that Determining at least one virtual device in the upgraded virtual machine to perform the batch recovery process includes: Obtaining a device identifier of each virtual device in the virtual machine before upgrading; In the upgraded virtual machine, based on the device identifier of at least one virtual device in the virtual machine before the upgrade, virtual devices with the same device identifier in the upgraded virtual machine are determined as virtual devices to be subjected to the batch recovery process.
4. The method according to claim 3, characterized in that The device status data read in batches is marked as target status data, including: In response to at least one virtual device in the virtual machine before the upgrade having the same device identifier as the virtual device to be subjected to the batch recovery process, the device state data read in batches is determined as the target state data.
5. The method according to claim 2, characterized in that: Using the target status data, batch updating the current running status of the virtual devices to be subjected to the batch recovery process includes: In case there are multiple virtual devices to be executed with the batch recovery process, triggering an instruction to concurrently execute the batch recovery process; In response to the batch recovery processing instruction, a plurality of virtual devices to be executed with the batch recovery processing are controlled to concurrently execute the batch recovery processing, so that the device state data of each virtual device is recovered to the target state data.
6. The method according to claim 1, characterized in that Batch reading device status data from different storage locations of the shared data pool includes: The batch reading operation is performed regularly or every predetermined period to respectively obtain the device status data stored in different storage locations of the shared data pool.
7. The method according to claim 1, characterized in that In the case where there are multiple virtual machines that all perform an upgrade, before the upgrade, different virtual machines store the device state data in different storage areas of the shared data pool, and each virtual machine records a storage address locally, and the storage address recorded locally by each virtual machine is used to indicate the corresponding storage area in the shared data pool, and the storage area includes the different storage locations, wherein the method further includes: After the virtual machine is upgraded, the batch read operation is performed on the storage area corresponding to the shared data pool based on the storage address recorded locally, so that the device status data is read in batches from the different storage locations of the shared data pool.
8. The method according to any one of claims 1 to 7, characterized in that Running the upgrade file of the virtual machine to obtain the upgraded virtual machine includes: The upgrade file of the virtual machine is run to control hot upgrade or hot migration of the virtual machine to obtain the upgraded virtual machine.
9. A data processing method for a virtual machine, characterized in that: include: In response to an access instruction of a virtual machine before upgrading, obtaining device status data of at least one or more virtual devices in the virtual machine before upgrading, wherein the virtual machine is deployed in the cloud; storing the device status data of different virtual devices in different storage locations of a shared data pool; In response to a batch transfer operation, the device status data at the different storage locations are batch transferred to the virtual devices of the upgraded virtual machine, wherein the batch transferred device status data is used for batch recovery processing of at least one virtual device in the upgraded virtual machine, and the upgraded virtual machine is obtained by running the upgrade file of the virtual machine before the upgrade.
10. The method according to claim 9, characterized in that Storing device status data of different virtual devices in different storage locations of a shared data pool includes: In response to concurrently executing the storage instruction, the device status data of different virtual devices are concurrently stored in the different storage locations.
11. The method according to claim 9, characterized in that Storing device status data of different virtual devices in different storage locations of a shared data pool includes: The device status data of different virtual devices are stored in the different storage locations at regular intervals or at predetermined intervals.
12. The method according to claim 9, characterized in that In the case that there are multiple virtual machines that are all upgraded, different storage areas of the shared data pool store the device status data of different virtual machines before the virtual machines are upgraded, and the storage areas include the different storage locations.
13. A data processing system for a virtual machine, characterized in that: include: The cloud is used to run the upgrade file of the virtual machine in response to the working state of the virtual machine being an upgrade state, so as to obtain the upgraded virtual machine, wherein the virtual machine is deployed in the cloud; A memory, configured to obtain device status data of at least one or more virtual devices in the virtual machine before the upgrade in response to an access instruction of the virtual machine before the upgrade, and store device status data of different virtual devices in different storage locations of the shared data pool; Among them, the cloud is used to trigger access to the shared data pool during the upgrade of the virtual machine, batch read device status data from different storage locations of the shared data pool, and batch restore at least one virtual device in the upgraded virtual machine based on the batch read device status data.
14. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 12 are implemented.