Virtual machine data processing method, device, electronic device and storage medium

By establishing communication connections with the front-end and the proxy on the server, the login device limitation and operation complexity problems during virtual machine data backup are solved, and users can perform backup processing at any time and on any device, simplifying the process and Improved efficiency.

CN118860576BActive Publication Date: 2025-02-11WUHAN STONE INFORMATION SERVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411346494.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-02-11
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In the prior art, there are problems such as restricting login equipment when backing up virtual machine data, complex operation and requiring professional operation, making it difficult to provide a simple and simple backup and recovery method.

Method used

By establishing a communication connection with the front-end and the proxy on the server, receiving and encrypting the cloud platform login information sent by the front-end, establishing a communication connection with the cloud platform, obtaining and returning virtual machine information, responding to backup requests, and determining the target backup policy and transmission policy and send it to the proxy for backup processing.

Benefits of technology

It enables users to backup virtual machines through the cloud platform at any time and on any device, simplifying the backup process, making it easier for non-professional personnel to use, and improving backup efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860576B_ABST
    Figure CN118860576B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for processing virtual machine data, which are applied to a server, and the server is respectively connected to a front end and an agent. The method includes receiving login information of a cloud platform sent by the front end, sending the login information to the agent, so that the agent establishes a communication connection with the cloud platform, and returning the virtual machine information under the cloud platform to the server. The server sends the virtual machine information to the front end so that the front end can display it to the user, and in response to the backup request sent by the front end, determines the target backup strategy and the target transmission strategy and sends them to the agent, so that the agent performs backup processing on the target virtual machine according to the target backup strategy and the target transmission strategy. The use of the present invention enables users to perform backup processing on the target virtual machine through the cloud platform at any time point and device, which not only simplifies the backup processing flow, facilitates the use of non-professionals, but also improves the backup efficiency of the backup processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for processing virtual machine data. Background Art

[0002] Data backup and recovery is used to prevent data loss caused by server failures, and to restore lost data in the server when the server fails, effectively ensuring the effectiveness and security of data storage in the server. Specifically, data backup and recovery mainly copies the data in the server in advance and stores it in other storage devices, and when the data in the original server is needed, the data in the original server can be restored from the storage device, achieving the purpose of restoring the original server data when the original server fails.

[0003] In the application of virtual machines, data backup is often required. In related technologies, cloud platforms are usually used to manage virtual machines created in the operating systems of various users. Specifically, after the user logs in to the cloud platform, the cloud platform can automatically schedule and manage the various device resources in the operating system to achieve efficient backup operations for the virtual machines.

[0004] However, the cloud platform requires not only an account password, but also key verification to log in to the cloud platform. At the same time, the cloud platform also has login device restrictions, and it is impossible to log in to the cloud platform at any time and on any device. At the same time, when backing up a virtual machine, the user is usually required to configure the backup operation on the operating system. If the user wants to view it, he must log in to the system first; and the existing virtual machine backup software requires professional staff to perform related backup operations, which is not friendly to non-professional users.

[0005] Therefore, how to provide a backup and recovery method with simple configuration and easy operation is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for processing virtual machine data, so as to solve at least one technical problem existing in the related art when backing up virtual machine data.

[0007] In a first aspect, an embodiment of the present invention provides a method for processing virtual machine data, which is applied to a server, wherein the server is respectively connected to a front end and an agent, and the method comprises:

[0008] Receive the login information of the cloud platform sent by the front end, and send the login information to the agent end, the agent end is used to encrypt the login information, so as to establish a communication connection with the cloud platform through the encrypted login information, and return the virtual machine information of all virtual machines under the cloud platform to the server end after establishing the communication connection with the cloud platform;

[0009] Sending virtual machine information of all virtual machines to the front end, wherein the front end is used to display the virtual machine information of all virtual machines to the user;

[0010] In response to a backup request for backing up a target virtual machine sent by the front end, determining a target backup strategy and a target transmission strategy corresponding to the target virtual machine;

[0011] The target backup strategy and the target transmission strategy are sent to the proxy end, and the proxy end is further used to perform backup processing on the to-be-backed-up data of the target virtual machine according to the target backup strategy and the target transmission strategy.

[0012] In some embodiments, the step of determining a target backup strategy and a target transmission strategy corresponding to the target virtual machine in response to a backup request sent by the front end to back up the target virtual machine includes:

[0013] In response to a backup request for backing up a target virtual machine sent by the front end, acquiring target virtual machine information of the target virtual machine;

[0014] Determining a target backup strategy corresponding to the target virtual machine according to the target virtual machine information;

[0015] A target transmission policy corresponding to the target virtual machine is determined according to the target virtual machine information.

[0016] In some embodiments, the target virtual machine information includes identification information;

[0017] The step of determining a target backup policy corresponding to the target virtual machine according to the target virtual machine information includes:

[0018] The identification information and the backup data detection request are sent to the agent, and the agent is further used to detect whether there is backup data corresponding to the identification information in the cloud platform according to the identification information and the backup data detection request;

[0019] In the case where backup data corresponding to the identification information exists in the cloud platform, taking incremental backup as the target backup strategy;

[0020] In the case that the backup data corresponding to the identification information does not exist in the cloud platform, full backup is used as the target backup strategy.

[0021] In some embodiments, the target virtual machine information includes network status information;

[0022] The step of determining a target transmission policy corresponding to the target virtual machine according to the target virtual machine information includes:

[0023] Determining a current data transmission level of the target virtual machine according to the current network status information of the target virtual machine;

[0024] When the data transmission level is the first level, determining a direct data transmission method as a target transmission strategy;

[0025] When the data transmission level is the second level, a method of compressing first and then transmitting is determined as the target transmission strategy, and the data transmission rate corresponding to the first level is greater than the data transmission rate corresponding to the second level.

[0026] In some embodiments, the step of sending the target backup strategy and the target transmission strategy to the agent includes:

[0027] The target backup strategy, the target transmission strategy and the data transmission rate detection request are sent to the proxy end, and the proxy end is further used to detect the data transmission rate of the target virtual machine in the cloud platform under the target backup strategy and the target transmission strategy according to the data transmission rate detection request;

[0028] Receive the data transmission rate returned by the proxy end, and when the data transmission rate is less than a preset threshold, send a cache instruction to the proxy end, and the proxy end is also used to control the target virtual machine in the cloud platform to cache the to-be-backed-up data in the disk of the target virtual machine into the cache space of the target virtual machine according to the cache instruction, so as to back up the to-be-backed-up data of the target virtual machine in the cache space according to the target backup strategy and the target transmission strategy.

[0029] In some embodiments, the method further comprises:

[0030] receiving a recovery request for recovering the target virtual machine sent by the front end;

[0031] The restore request is sent to the agent end, and the agent end is also used to control the cloud platform to create a new virtual machine according to the restore request, and restore the backup data of the target virtual machine that has been backed up to the new virtual machine.

[0032] In some embodiments, the step of sending the restore request to the agent, wherein the agent is further configured to control the cloud platform to create a new virtual machine according to the restore request, and restore the backup data of the target virtual machine that has been backed up to the new virtual machine, includes:

[0033] The recovery request and target recovery strategy are sent to the agent end, and the agent end is also used to control the cloud platform to create a new virtual machine according to the recovery request, and control the cloud platform to transfer the backup data of the target virtual machine to the cache pool of the new virtual machine according to the target recovery strategy, and at the same time control the cloud platform to restore the backup data in the cache pool to the new virtual machine.

[0034] In a second aspect, an embodiment of the present invention provides a device for processing virtual machine data, which is applied to a server, wherein the server is respectively connected to a front end and an agent, and the device comprises:

[0035] A first sending module is used to receive the login information of the cloud platform sent by the front end, and send the login information to the agent end, the agent end is used to encrypt the login information, so as to establish a communication connection with the cloud platform through the encrypted login information, and return the virtual machine information of all virtual machines under the cloud platform to the server end after establishing the communication connection with the cloud platform;

[0036] A second sending module, used to send virtual machine information of all virtual machines to the front end, and the front end is used to display the virtual machine information of all virtual machines to the user;

[0037] A determination module, configured to determine a target backup strategy and a target transmission strategy corresponding to the target virtual machine in response to a backup request for backing up the target virtual machine sent by the front end;

[0038] The third sending module is used to send the target backup strategy and the target transmission strategy to the proxy end, and the proxy end is also used to back up the to-be-backed-up data of the target virtual machine according to the target backup strategy and the target transmission strategy.

[0039] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in any one of the above-mentioned methods for processing virtual machine data when executing the computer program.

[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for processing virtual machine data described in any one of the above items are implemented.

[0041] The embodiment of the present invention provides a method, device, electronic device and storage medium for processing virtual machine data. The method sends login information sent by a front end to an agent end, so that the agent end can establish a communication connection with a cloud platform, and returns the virtual machine information under the cloud platform to a server end, so that the server end can send the virtual machine information to the front end so that the front end can display it to the user, and then respond to the backup request sent by the front end, determine the target backup strategy and the target transmission strategy and send them to the agent end, so that the agent end can quickly back up the target virtual machine according to the target backup strategy and the target transmission strategy. In this way, the user can back up the target virtual machine through the cloud platform at any time point and on any device, which not only simplifies the backup processing flow and facilitates the use of non-professionals, but also improves the backup efficiency of the backup processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of a method for processing virtual machine data provided by an embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of a process for determining a target backup strategy and a target transmission strategy provided by an embodiment of the present invention;

[0044] Figure 3 is another flowchart of a method for processing virtual machine data provided by an embodiment of the present invention;

[0045] Figure 4 is a third flow chart of the method for processing virtual machine data provided by an embodiment of the present invention;

[0046] Figure 5 It is a structural schematic diagram of a device for processing virtual machine data provided by an embodiment of the present invention;

[0047] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present invention;

[0048] Figure 7 This is another structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0051] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0052] In the related art, a cloud platform is usually used to manage virtual machines created in the operating system of each user. Specifically, after the user logs in to the cloud platform, the cloud platform can automatically schedule and manage the various device resources in the operating system to achieve efficient backup operations on the virtual machines.

[0053] However, the cloud platform requires not only an account password, but also key verification to log in to the cloud platform. At the same time, the cloud platform also has login device restrictions, and it is impossible to log in to the cloud platform at any time and on any device. At the same time, when backing up a virtual machine, the user is usually required to configure the backup operation on the operating system. If the user wants to view it, he must log in to the system first; and the existing virtual machine backup software requires professional staff to perform related backup operations, which is not friendly to non-professional users.

[0054] Therefore, how to provide a backup and recovery method with simple configuration and easy operation is a technical problem that needs to be solved urgently.

[0055] In order to solve the technical problems existing in the related art, an embodiment of the present invention provides a method for processing virtual machine data, which is applied to a server, and the server is respectively connected to a front end and a proxy end for communication. Figure 1 , Figure 1 is a flow chart of a method for processing virtual machine data provided by an embodiment of the present invention, the method comprising steps 101 to 104;

[0056] Step 101, receiving the login information of the cloud platform sent by the front end, and sending the login information to the agent end, the agent end is used to encrypt the login information to establish a communication connection with the cloud platform through the encrypted login information, and after establishing a communication connection with the cloud platform, the agent end returns the virtual machine information of all virtual machines under the cloud platform to the server end.

[0057] In this embodiment, the front end provided in this embodiment can be a PC or a web program, and the front end can be any PC or web program. That is to say, the user can establish a communication connection with the server through the front end at any time or place to complete the method steps in the virtual machine data processing method provided in this embodiment, thereby greatly improving the backup efficiency of the user's virtual machine data backup.

[0058] Among them, the front end provided by this embodiment can facilitate customers' viewing and management, and the configuration process is simple and clear, and does not require too much relevant knowledge, thereby simplifying the virtual machine data backup method, facilitating the use of non-professionals, and effectively improving the virtual machine data backup efficiency.

[0059] Specifically, the communication connection between the server and the front end of this embodiment can be established by wireless network connection, wired connection, Bluetooth connection, etc. The specific connection method can be selected as needed according to the actual application scenario and is not specifically limited here.

[0060] In this embodiment, the agent provided in this embodiment may be provided with a USB key, so that after receiving the login information sent by the server, that is, the account password, the USB key can be used to encrypt the account password, and then a communication connection can be established with the cloud platform through the cloud platform API, so that the virtual machines in the cloud platform can be scanned to scan out the virtual machine information of all virtual machines in the cloud platform and return it to the server. Among them, this embodiment can achieve the purpose of controlling the cloud platform through the cloud platform API, so that the cloud platform can be controlled through the cloud platform API to view and store the virtual machine configuration, and various operations in the backup and recovery process of the virtual machine.

[0061] Step 102: sending virtual machine information of all virtual machines to the front end, and the front end is used to display the virtual machine information of all virtual machines to the user.

[0062] In this embodiment, after receiving the virtual machine information returned by the agent, the virtual machine information of all virtual machines can be sent to the front end, so that the front end can display the virtual machine information of all virtual machines to the user, thereby facilitating the user to view and select the target virtual machine to be backed up in the front end, avoiding the user from performing cloud platform login operations, password verification operations and virtual machine information query operations, thereby improving the backup efficiency of virtual machines.

[0063] It should be noted that the virtual machine information provided in this embodiment may include the device name information of the virtual machine, the management record information of the virtual machine, etc., as long as it can facilitate the user to select the information of the virtual machine to be backed up from multiple virtual machines, and no specific limitation is made here.

[0064] Step 103: In response to the backup request for backing up the target virtual machine sent by the front end, determine a target backup strategy and a target transmission strategy corresponding to the target virtual machine.

[0065] In this embodiment, in order to improve the backup rate of virtual machine data, when receiving a backup request for backing up a target virtual machine sent by the front end, this embodiment can match a backup strategy that can improve the backup efficiency of the corresponding virtual machine for different virtual machines according to the virtual machine information of the virtual machine. For details, please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of determining a target backup strategy and a target transmission strategy provided by an embodiment of the present invention. Figure 2 As shown, it includes steps 201 to 203;

[0066] Step 201: In response to a backup request for backing up a target virtual machine sent by the front end, target virtual machine information of the target virtual machine is obtained.

[0067] In this embodiment, in order to select matching backup strategies for different virtual machines that can improve the backup efficiency of virtual machines, this embodiment can obtain the target virtual machine information of the target virtual machine when receiving a backup request for backing up the target virtual machine sent by the front end, so as to facilitate the subsequent selection of a matching target backup strategy for the target virtual machine.

[0068] Step 202: Determine a target backup policy corresponding to the target virtual machine according to the target virtual machine information.

[0069] In this embodiment, the target virtual machine information provided in this embodiment may include identification information, then the step of determining the target backup strategy corresponding to the target virtual machine based on the target virtual machine information provided in this embodiment may be: sending the identification information and the backup data detection request to the agent end, the agent end is also used to detect whether there is backup data corresponding to the identification information in the cloud platform based on the identification information and the backup data detection request; in the case that the backup data corresponding to the identification information exists in the cloud platform, incremental backup is used as the target backup strategy; in the case that the backup data corresponding to the identification information does not exist in the cloud platform, full backup is used as the target backup strategy.

[0070] Among them, the identification information provided in this embodiment is the unique identification information of the virtual machine, which is used to distinguish different virtual machines. When it is detected that there is backup data corresponding to the identification information in the cloud platform, that is, there is backup data when the target virtual machine has been backed up, it can be determined that the target virtual machine has been backed up at least once, so that it can be determined that the previous backup operation of the target virtual machine was a full backup operation or an incremental backup operation. However, regardless of whether the previous backup operation of the target virtual machine was a full backup operation or an incremental backup operation, the backup operation performed on the target virtual machine this time can be a full backup operation or an incremental backup operation, and the specific backup operation mode can be selected by the user.

[0071] In order to improve the backup efficiency of virtual machine data, this embodiment can perform incremental backup operations on the target virtual machine with backup data in the cloud platform to reduce the amount of data that needs to be transmitted, thereby improving the backup efficiency of the target virtual machine.

[0072] Specifically, the incremental backup operation performed on the target virtual machine in this embodiment can be: first determine all the backup data corresponding to the target virtual machine stored in the cloud platform, and then compare them with the data in the disk of the target virtual machine to determine the data that does not exist in the cloud platform, and use these data as the data to be backed up, and determine the backup operation of the data to be backed up as an incremental backup, thereby avoiding the transmission of data already existing in the cloud platform and improving the efficiency of data transmission.

[0073] When it is detected that there is no backup data corresponding to the identification information in the cloud platform, that is, there is no backup data corresponding to the target virtual machine, it can be determined that the target virtual machine has not been backed up. At this time, full backup can be used as the target backup strategy.

[0074] Step 203: Determine a target transmission policy corresponding to the target virtual machine according to the target virtual machine information.

[0075] In this embodiment, the target virtual machine information provided in this embodiment may include network status information, then the step of determining the target transmission strategy corresponding to the target virtual machine based on the target virtual machine information provided in this embodiment may be: determining the current data transmission level of the target virtual machine based on the current network status information of the target virtual machine; when the data transmission level is the first level, determining the direct data transmission method as the target transmission strategy; when the data transmission level is the second level, determining the compression before transmission method as the target transmission strategy, and the data transmission rate corresponding to the first level is greater than the data transmission rate corresponding to the second level.

[0076] Among them, the network status information provided by this embodiment may include a state of good network status and a state of poor network status. Therefore, this embodiment can determine the data transmission level when the current network status information of the target virtual machine is a good network status as the first level, and determine the data transmission level when the current network status information of the target virtual machine is a poor network status as the second level.

[0077] Specifically, when the current network status information of the target virtual machine indicates that the network status is good, it can be determined that the rate at which the target virtual machine transmits data through the network is stable, which can effectively ensure the stability of data transmission and avoid intermittent data transmission due to poor network status. Therefore, direct data transmission can be used as the target transmission strategy to transmit backup data.

[0078] When the current network status information of the target virtual machine is a poor network status, it can be determined that the rate at which the target virtual machine transmits data through the network is unstable, that is, there is a phenomenon that the network speed is sometimes fast and sometimes slow, which affects the backup efficiency of the data to be backed up. Therefore, the method of compressing first and then transmitting can be adopted as the target transmission strategy. The specific method can be: first compress the data to be backed up, and then transmit the compressed data to be backed up through the network. In this way, the amount of data transmitted over the network can be reduced, thereby effectively improving the efficiency of data transmission when the network status is poor.

[0079] Step 104: Send the target backup policy and the target transmission policy to the proxy end, and the proxy end is further used to perform backup processing on the to-be-backed-up data of the target virtual machine according to the target backup policy and the target transmission policy.

[0080] Among them, this embodiment can use Ceph storage technology to implement backup and recovery processing based on snapshots. Specifically, this embodiment can use the import and export function of Ceph's RBD block storage to quickly export and backup snapshots to achieve efficient backup processing. In order to determine the block devices of the block storage contained in each virtual machine, the virtual machine information provided by this embodiment can include the block device name corresponding to the virtual machine, so that during the backup processing, the corresponding block device can be accurately found according to the block device name in the virtual machine information for backup processing.

[0081] In this embodiment, the agent provided in this embodiment may include a first agent and a second agent. The first agent is mainly used to encrypt the login information to establish a communication connection with the cloud platform through the encrypted login information, and can manage various functions in the cloud platform and view and obtain virtual machine information of each virtual machine in the cloud platform, and can also send the target backup strategy and target transmission strategy sent by the server to the second agent; the second agent is mainly used to back up the target virtual machine according to the target backup strategy and the target transmission strategy.

[0082] It should be noted that, since this embodiment mainly utilizes the import and export function of Ceph's RBD block storage to quickly export and back up snapshots and achieve efficient backup processing, the second proxy provided in this embodiment can use the rbd diff command to back up block device data and send the progress to the server in real time, so that the server can send the progress to the front end in real time, so that the user can view the progress of the backup processing on the front-end page.

[0083] As an optional embodiment, in order to further improve the backup efficiency of the target virtual machine backup operation, see Figure 3 , Figure 3 FIG. 1 is another flow chart of a method for processing virtual machine data provided by an embodiment of the present invention. Figure 3 As shown, the method for processing virtual machine data provided in this embodiment further includes steps 301 to 302;

[0084] Step 301, the target backup strategy, the target transmission strategy and the data transmission rate detection request are sent to the agent end, and the agent end is also used to detect the data transmission rate of the target virtual machine in the cloud platform under the target backup strategy and the target transmission strategy according to the data transmission rate detection request.

[0085] Step 302, receiving the data transmission rate returned by the proxy end, and sending a cache instruction to the proxy end when the data transmission rate is less than a preset threshold value. The proxy end is also used to control the target virtual machine in the cloud platform to cache the to-be-backed-up data in the disk of the target virtual machine into the cache space of the target virtual machine according to the cache instruction, so as to back up the to-be-backed-up data of the target virtual machine in the cache space according to the target backup strategy and the target transmission strategy.

[0086] Among them, the preset threshold provided in this embodiment can be the data transmission rate expected by the user, such as the normal transmission rate of the target virtual machine, or 90% of the normal transmission rate, etc., which can be set according to different application requirements and is not specifically limited here.

[0087] When it is detected that the data transmission rate of the target virtual machine under the target backup strategy and the target transmission strategy is less than a preset threshold, it means that the data transmission rate of the current target virtual machine cannot reach the normal transmission rate. In this case, the data to be backed up in the disk of the target virtual machine can be cached into the cache space of the target virtual machine first, so as to achieve the purpose of subsequent data transmission by utilizing the characteristic of the cache space that can access data at high speed, thereby improving the transmission rate of the data to be backed up.

[0088] Optionally, this embodiment can simultaneously execute the operation of storing the data to be backed up in the cache space and the backup operation of the data to be backed up in the cache space through the second proxy end, so that during the backup operation, after the data to be backed up is stored in the cache space, there is no need to wait for the data to be completely written, but other threads can be started to read the data from the buffer space to perform the backup processing operation, thereby further improving the backup efficiency of the target virtual machine.

[0089] In some other embodiments, this embodiment can also perform a recovery operation on the target virtual machine. For details, see Figure 4 , Figure 4 FIG. 4 is a third flow chart of a method for processing virtual machine data provided by an embodiment of the present invention. Figure 4 As shown, the method for processing virtual machine data provided in this embodiment may further include: step 401 to step 402;

[0090] Step 401: receiving a recovery request for recovering the target virtual machine sent by the front end.

[0091] Step 402, sending the recovery request to the agent, the agent is also used to control the cloud platform to create a new virtual machine according to the recovery request, and restore the backup data of the target virtual machine that has been backed up to the new virtual machine.

[0092] Specifically, in order to improve the recovery efficiency of the recovery operation on the target virtual machine, the step of sending the recovery request to the agent provided in this embodiment, wherein the agent is also used to control the cloud platform to create a new virtual machine according to the recovery request, and restore the backup data of the target virtual machine that has been backed up to the new virtual machine, can be: sending the recovery request and the target recovery strategy to the agent, wherein the agent is also used to control the cloud platform to create a new virtual machine according to the recovery request, and control the cloud platform to transfer the backup data of the target virtual machine to the cache pool of the new virtual machine according to the target recovery strategy, and at the same time control the cloud platform to restore the backup data in the cache pool to the new virtual machine.

[0093] In this embodiment, the read and write operations provided by this embodiment are performed through the cache pool, which is the same cache strategy as the read and write operations provided by the cache space provided in the above embodiment. It is mainly for the purpose of starting multiple threads at the same time and performing data writing and reading operations in the cache pool at the same time, so as to improve data transmission efficiency.

[0094] As an optional embodiment, this embodiment can also compress the written data in the cache pool, and then write the compressed data to the new virtual machine, so as to further improve the recovery efficiency of data recovery. For the specific way in which the agent software simultaneously performs data writing operations, compression operations and reading operations, please refer to the embodiment corresponding to the above-mentioned backup process, which will not be repeated here.

[0095] In summary, an embodiment of the present invention provides a method for processing virtual machine data, the method comprising receiving login information of a cloud platform sent by a front end, sending the login information to an agent end, enabling the agent end to establish a communication connection with the cloud platform, and returning virtual machine information under the cloud platform to a server end, wherein the server end sends the virtual machine information to the front end so that the front end can display it to the user, and in response to a backup request sent by the front end, determines a target backup strategy and a target transmission strategy and sends them to the agent end so that the agent end can perform backup processing on the target virtual machine according to the target backup strategy and the target transmission strategy. The present invention enables users to perform backup processing on the target virtual machine through a cloud platform at any time point and on any device, which not only simplifies the backup processing flow and facilitates the use of non-professionals, but also improves the backup efficiency of the backup processing.

[0096] According to the method described in the above embodiment, this embodiment will be further described from the perspective of a processing device for virtual machine data. The processing device for virtual machine data can be implemented as an independent entity or integrated in an electronic device, such as a terminal. The terminal may include a mobile phone, a tablet computer, etc.

[0097] In order to solve the same technical problem, this embodiment also provides a virtual machine data processing device, which is applied to the server, and the server is respectively connected to the front end and the proxy end for communication. For details, see Figure 5 , Figure 5 is a structural diagram of a device for processing virtual machine data provided by an embodiment of the present invention, such as Figure 5 As shown, a virtual machine data processing device 500 provided in an embodiment of the present invention includes: a first sending module 501, a second sending module 502, a determining module 503 and a third sending module 504;

[0098] Among them, the first sending module 501 is used to receive the login information of the cloud platform sent by the front end, and send the login information to the agent end. The agent end is used to encrypt the login information so as to establish a communication connection with the cloud platform through the encrypted login information, and return the virtual machine information of all virtual machines under the cloud platform to the server end after establishing a communication connection with the cloud platform.

[0099] The second sending module 502 is used to send the virtual machine information of all virtual machines to the front end, and the front end is used to display the virtual machine information of all virtual machines to the user.

[0100] The determination module 503 is configured to determine a target backup strategy and a target transmission strategy corresponding to the target virtual machine in response to a backup request for backing up the target virtual machine sent by the front end.

[0101] In this embodiment, the determination module 503 provided in this embodiment is specifically used to: in response to a backup request for backing up the target virtual machine sent by the front end, obtain the target virtual machine information of the target virtual machine; determine the target backup policy corresponding to the target virtual machine based on the target virtual machine information; determine the target transmission policy corresponding to the target virtual machine based on the target virtual machine information.

[0102] In some embodiments, the target virtual machine information provided in this embodiment includes identification information, and the determination module 503 provided in this embodiment is specifically used to: send the identification information and the backup data detection request to the agent end, and the agent end is also used to detect whether there is backup data corresponding to the identification information in the cloud platform based on the identification information and the backup data detection request; in the case that the backup data corresponding to the identification information exists in the cloud platform, incremental backup is used as the target backup strategy; in the case that the backup data corresponding to the identification information does not exist in the cloud platform, full backup is used as the target backup strategy.

[0103] In other embodiments, the target virtual machine information provided in this embodiment includes network status information, and the determination module 503 provided in this embodiment is also specifically used to: determine the current data transmission level of the target virtual machine based on the current network status information of the target virtual machine; when the data transmission level is the first level, determine the direct data transmission method as the target transmission strategy; when the data transmission level is the second level, determine the compression before transmission method as the target transmission strategy, and the data transmission rate corresponding to the first level is greater than the data transmission rate corresponding to the second level.

[0104] The third sending module 504 is used to send the target backup strategy and the target transmission strategy to the proxy end, and the proxy end is further used to perform backup processing on the to-be-backed-up data of the target virtual machine according to the target backup strategy and the target transmission strategy.

[0105] In this embodiment, the third sending module 504 provided in this embodiment is specifically used to: send the target backup strategy, the target transmission strategy and the data transmission rate detection request to the agent end, and the agent end is also used to detect the data transmission rate of the target virtual machine in the cloud platform under the target backup strategy and the target transmission strategy according to the data transmission rate detection request; receive the data transmission rate returned by the agent end, and when the data transmission rate is less than a preset threshold, send a cache instruction to the agent end, and the agent end is also used to control the target virtual machine in the cloud platform to cache the data to be backed up in the disk of the target virtual machine into the cache space of the target virtual machine according to the cache instruction, so as to back up the data to be backed up of the target virtual machine in the cache space according to the target backup strategy and the target transmission strategy.

[0106] As an optional embodiment, the virtual machine data processing device provided in this embodiment may further include: a receiving module, a fourth sending module;

[0107] Wherein, the receiving module is used to receive a recovery request sent by the front end to recover the target virtual machine;

[0108] The fourth sending module is used to send the recovery request to the agent end, and the agent end is also used to control the cloud platform to create a new virtual machine according to the recovery request, and restore the backup data of the target virtual machine that has been backed up to the new virtual machine.

[0109] In this embodiment, the fourth sending module provided in this embodiment is specifically used to: send the recovery request and the target recovery strategy to the agent end, and the agent end is also used to control the cloud platform to create a new virtual machine according to the recovery request, and control the cloud platform to transfer the backup data of the target virtual machine to the cache pool of the new virtual machine according to the target recovery strategy, and at the same time control the cloud platform to restore the backup data in the cache pool to the new virtual machine.

[0110] During specific implementation, the above modules and / or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules and / or units can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.

[0111] Also, see Figure 6 , Figure 6 1 is a schematic diagram of a structure of an electronic device provided by an embodiment of the present invention, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 602. The processor 601 is electrically connected to the memory 602.

[0112] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 600 and processes data by running or loading applications stored in the memory 602 and calling data stored in the memory 602, thereby monitoring the electronic device 600 as a whole.

[0113] In this embodiment, the processor 601 in the electronic device 600 will load the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 will run the application stored in the memory 602, thereby implementing any step in the virtual machine data processing method provided in the above embodiment.

[0114] The electronic device 600 can implement the steps in any embodiment of the method for processing virtual machine data provided in the embodiments of the present invention, and therefore can achieve the beneficial effects that can be achieved by any method for processing virtual machine data provided in the embodiments of the present invention. For details, please refer to the previous embodiments and will not be repeated here.

[0115] See also Figure 7 , Figure 7 is another structural schematic diagram of an electronic device provided by an embodiment of the present invention, such as Figure 7 As shown, Figure 7The electronic device 700 is a block diagram of a specific structure of an electronic device provided by an embodiment of the present invention, and the electronic device can be used to implement the method for processing virtual machine data provided in the above embodiment. The electronic device 700 can be a mobile terminal such as a smart phone or a laptop computer.

[0116] The RF circuit 710 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 710 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks may use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0117] The memory 720 can be used to store software programs and modules, such as program instructions / modules corresponding to the method for processing virtual machine data in the above-mentioned embodiment. The processor 780 executes various functional applications and processes virtual machine data by running the software programs and modules stored in the memory 720.

[0118] The memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 720 may further include a memory remotely arranged relative to the processor 780, and these remote memories may be connected to the electronic device 700 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.

[0119] The input unit 730 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also known as a touch display screen or touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 731), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 731 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch-sensitive surface 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0120] The display unit 740 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 700, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 740 may include a display panel 741, and optionally, the display panel 741 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 731 may cover the display panel 741, and when the touch-sensitive surface 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of the touch event, and then the processor 780 provides corresponding visual output on the display panel 741 according to the type of the touch event. Although in the figure, the touch-sensitive surface 731 and the display panel 741 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 731 and the display panel 741 can be integrated to implement input and output functions.

[0121] The electronic device 700 may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 700, they will not be repeated here.

[0122] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the electronic device 700. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another terminal through the RF circuit 710, or the audio data is output to the memory 720 for further processing. The audio circuit 760 may also include an earplug jack to provide communication between an external headset and the electronic device 700.

[0123] The electronic device 700 can help the user receive requests, send information, etc. through the transmission module 770 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 770 is shown in the figure, it can be understood that it is not a necessary component of the electronic device 700 and can be omitted as needed without changing the essence of the invention.

[0124] The processor 780 is the control center of the electronic device 700. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the electronic device 700 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 780.

[0125] The electronic device 700 also includes a power supply 790 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 790 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0126] Although not shown, the electronic device 700 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to implement any step in the method for processing virtual machine data provided in the above embodiment.

[0127] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0128] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, which stores multiple instructions, and when the instructions are executed by the processor, any step in the method for processing virtual machine data provided in the above embodiments can be implemented.

[0129] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0130] Since the instructions stored in the storage medium can execute the steps in any embodiment of the method for processing virtual machine data provided in the embodiments of the present invention, the beneficial effects that can be achieved by any method for processing virtual machine data provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0131] The above is a detailed introduction to a method, device, electronic device and storage medium for processing virtual machine data provided by the embodiments of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application. In addition, for those of ordinary skill in the art, without departing from the principles of the present invention, several improvements and modifications can be made, and these improvements and modifications are also regarded as the protection scope of the present invention.

Claims

1. A method for processing virtual machine data, characterized in that: Applied to a server, the server is respectively connected to a front end and a proxy end for communication, the method comprising: Receive the login information of the cloud platform sent by the front end, and send the login information to the agent end, the agent end is used to encrypt the login information, so as to establish a communication connection with the cloud platform through the encrypted login information, and return the virtual machine information of all virtual machines under the cloud platform to the server end after establishing the communication connection with the cloud platform; Sending virtual machine information of all virtual machines to the front end, wherein the front end is used to display the virtual machine information of all virtual machines to the user; In response to a backup request for backing up a target virtual machine sent by the front end, determining a target backup strategy and a target transmission strategy corresponding to the target virtual machine; The target backup strategy, the target transmission strategy and the data transmission rate detection request are sent to the proxy end, and the proxy end is further used to detect the data transmission rate of the target virtual machine in the cloud platform under the target backup strategy and the target transmission strategy according to the data transmission rate detection request; Receive the data transmission rate returned by the proxy end, and when the data transmission rate is less than a preset threshold, send a cache instruction to the proxy end, and the proxy end is also used to control the target virtual machine in the cloud platform to cache the to-be-backed-up data in the disk of the target virtual machine into the cache space of the target virtual machine according to the cache instruction, so as to back up the to-be-backed-up data of the target virtual machine in the cache space according to the target backup strategy and the target transmission strategy.

2. The method for processing virtual machine data according to claim 1, characterized in that: The step of determining a target backup strategy and a target transmission strategy corresponding to the target virtual machine in response to the backup request for backing up the target virtual machine sent by the front end includes: In response to a backup request for backing up a target virtual machine sent by the front end, acquiring target virtual machine information of the target virtual machine; Determining a target backup strategy corresponding to the target virtual machine according to the target virtual machine information; A target transmission policy corresponding to the target virtual machine is determined according to the target virtual machine information.

3. The method for processing virtual machine data according to claim 2, characterized in that: The target virtual machine information includes identification information; The step of determining a target backup policy corresponding to the target virtual machine according to the target virtual machine information includes: The identification information and the backup data detection request are sent to the agent, and the agent is further used to detect whether there is backup data corresponding to the identification information in the cloud platform according to the identification information and the backup data detection request; In the case where backup data corresponding to the identification information exists in the cloud platform, taking incremental backup as the target backup strategy; In the case that the backup data corresponding to the identification information does not exist in the cloud platform, full backup is used as the target backup strategy.

4. The method for processing virtual machine data according to claim 3, characterized in that: The target virtual machine information includes network status information; The step of determining a target transmission policy corresponding to the target virtual machine according to the target virtual machine information includes: Determining a current data transmission level of the target virtual machine according to the current network status information of the target virtual machine; When the data transmission level is the first level, determining a direct data transmission method as a target transmission strategy; When the data transmission level is the second level, a method of compressing first and then transmitting is determined as the target transmission strategy, and the data transmission rate corresponding to the first level is greater than the data transmission rate corresponding to the second level.

5. The method for processing virtual machine data according to claim 1, characterized in that: The method further comprises: receiving a recovery request for recovering the target virtual machine sent by the front end; The restore request is sent to the agent end, and the agent end is also used to control the cloud platform to create a new virtual machine according to the restore request, and restore the backup data of the target virtual machine that has been backed up to the new virtual machine.

6. The method for processing virtual machine data according to claim 5, characterized in that: The step of sending the recovery request to the agent, wherein the agent is further used to control the cloud platform to create a new virtual machine according to the recovery request, and recover the backup data of the target virtual machine that has been backed up to the new virtual machine, includes: The recovery request and target recovery strategy are sent to the agent end, and the agent end is also used to control the cloud platform to create a new virtual machine according to the recovery request, and control the cloud platform to transfer the backup data of the target virtual machine to the cache pool of the new virtual machine according to the target recovery strategy, and at the same time control the cloud platform to restore the backup data in the cache pool to the new virtual machine.

7. A device for processing virtual machine data, characterized in that: Applied to a server, the server is respectively connected to a front end and a proxy end for communication, and the device comprises: A first sending module is used to receive the login information of the cloud platform sent by the front end, and send the login information to the agent end, the agent end is used to encrypt the login information, so as to establish a communication connection with the cloud platform through the encrypted login information, and return the virtual machine information of all virtual machines under the cloud platform to the server end after establishing the communication connection with the cloud platform; A second sending module, used to send virtual machine information of all virtual machines to the front end, and the front end is used to display the virtual machine information of all virtual machines to the user; A determination module, configured to determine a target backup strategy and a target transmission strategy corresponding to the target virtual machine in response to a backup request for backing up the target virtual machine sent by the front end; The third sending module is used to send the target backup strategy, the target transmission strategy and the data transmission rate detection request to the agent end, and the agent end is also used to detect the data transmission rate of the target virtual machine in the cloud platform under the target backup strategy and the target transmission strategy according to the data transmission rate detection request; receive the data transmission rate returned by the agent end, and send a cache instruction to the agent end when the data transmission rate is less than a preset threshold. The agent end is also used to control the target virtual machine in the cloud platform to cache the data to be backed up in the disk of the target virtual machine into the cache space of the target virtual machine according to the cache instruction, so as to back up the data to be backed up of the target virtual machine in the cache space according to the target backup strategy and the target transmission strategy.

8. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Virtual machine visit system and server based on temporary agent

    CN104580496A

  • Disaster recovery backup method and device, electronic equipment and storage medium

    CN112948177A

  • Password Encryption for Hybrid Cloud Services

    US20160330177A1