Cloud desktop data synchronization method and device, electronic equipment and storage medium
By determining the target resource pool with the lowest delay in the cloud platform and allocating shadow cloud desktops, combined with the different data synchronization technology, the delay problem of cloud desktop users when changing the workplace is solved, fast and complete data synchronization is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411664602.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-11-20
AI Technical Summary
In cloud desktop applications, when users need to change their workplace due to business trips or other reasons, the physical distance between the new workplace and the computer room where the original cloud desktop resource pool is located is large, resulting in an increase in interaction delay and affecting the user experience.
By responding to the user's boot command at the target location, the target resource pool with the lowest delay between the target location in the cloud platform and allocating a shadow cloud desktop to the resource pool. Based on the data difference between the original seed mirror of the original cloud desktop and the first disk, the first difference data is determined and transmitted to the target resource pool, and the original seed mirror of the shadow cloud desktop and the difference data are imported to build the target cloud desktop.
It realizes the rapid and complete synchronization of the system data of the user's personal desktop to the cloud closer to the user without copying the entire cloud desktop image, reducing the time and delay of data synchronization and improving the user experience.
Smart Images

Figure CN119828992A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of cloud computing, and more specifically, to a cloud desktop data synchronization method, device, electronic device, and storage medium. Background Art
[0002] In recent years, with the rapid development of cloud computing technology, cloud desktops have gradually become popular in all walks of life. The convenience of cloud desktops is that users can easily access their personal desktop environment through the Internet, achieving flexible office work across devices and platforms.
[0003] However, if a user needs to change his or her work location due to a business trip or other reasons, and the new work location is physically far away from the computer room where the original cloud desktop resource pool is located, it will cause a large interaction delay and affect the user experience. Therefore, how to quickly and completely synchronize the system data of the user's personal desktop to the cloud closer to the user has become an urgent problem to be solved in this field. Summary of the invention
[0004] The embodiments of the present application provide a cloud desktop data synchronization method, device, electronic device and storage medium, aiming to solve the problem of how to quickly and completely synchronize the system data of a user's personal desktop to a cloud that is closer to the user.
[0005] A first aspect of an embodiment of the present application provides a cloud desktop data synchronization method, the method comprising:
[0006] In response to a power-on instruction from a user at a target location, a target resource pool is determined, where the target resource pool is a resource pool in the cloud platform with the lowest latency to the target location;
[0007] Allocate a shadow cloud desktop in the target resource pool, wherein the shadow cloud desktop has the same original seed image as the original cloud desktop;
[0008] Based on the data difference between the original seed image in the original cloud desktop and the first disk corresponding to the original cloud desktop, determining first differential data and transmitting it to the target resource pool;
[0009] The target resource pool imports the first differential data, and obtains the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data.
[0010] In an optional implementation, determining the first differential data based on the data difference between the original seed image in the original cloud desktop and the first disk corresponding to the original cloud desktop includes:
[0011] Obtaining the original seed image in the original cloud desktop;
[0012] Based on the original seed image, generating an original seed image snapshot, and based on the first disk of the original cloud desktop, generating a first disk snapshot;
[0013] The first differential data is determined based on a data difference between the original seed image snapshot and the first disk snapshot.
[0014] In an optional implementation manner, determining the first differential data based on the data difference between the original seed image snapshot and the first disk snapshot includes:
[0015] Iteratively calculating the original seed image snapshot and the first disk snapshot to determine a difference between the data volume of the original seed image snapshot and the data volume of the first disk snapshot as the first differential data;
[0016] The first differential data at least includes a newly added portion of the first disk snapshot relative to the original seed image snapshot, and a modified portion of the original seed image template volume in the first disk snapshot relative to the original seed image snapshot.
[0017] In an optional implementation, the target resource pool imports the first differential data, and obtains the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data, including:
[0018] Based on a transmission protocol, the target resource pool receives the first differential data in an original resource pool corresponding to the original cloud desktop;
[0019] Based on the original seed image of the shadow cloud desktop, using a write instruction of a block device, importing the first differential data into the target resource pool;
[0020] Based on the first differential data and the original seed image of the shadow cloud desktop, the data of the second disk corresponding to the shadow cloud desktop is reconstructed to obtain the target cloud desktop.
[0021] In an optional implementation, reconstructing data of a second disk corresponding to the shadow cloud desktop based on the first differential data and the original seed image of the shadow cloud desktop includes:
[0022] Acquire initial data of a second disk corresponding to the shadow cloud desktop, where the initial data of the second disk includes the original seed image and initial incremental data;
[0023] The initial incremental data of the second disk is replaced with the first differential data to obtain updated data of the second disk corresponding to the shadow cloud desktop.
[0024] In an optional implementation, determining the target resource pool in response to a power-on instruction from a user at a target location includes:
[0025] In response to a power-on instruction from a user at the target location, obtaining delay information between a plurality of resource pools at different locations in the cloud platform and the target location;
[0026] Based on the delay information between the multiple resource pools and the target location, a resource pool with the smallest delay information with the target location is determined as the target resource pool.
[0027] In an optional implementation, after obtaining the target cloud desktop, the method further includes:
[0028] Determining second differential data based on a data difference between the original seed image in the target cloud desktop and a second disk corresponding to the target cloud desktop;
[0029] Transmitting the second differential data to an original resource pool corresponding to the original cloud desktop based on a transmission protocol;
[0030] The original resource pool imports the first differential data into the first disk to update the data of the first disk and obtain an updated original cloud desktop.
[0031] A second aspect of an embodiment of the present application provides a cloud desktop data synchronization device, the device comprising:
[0032] A target resource pool module, for determining a target resource pool in response to a power-on instruction from a user at a target location, wherein the target resource pool is a resource pool in the cloud platform with the lowest latency to the target location;
[0033] A shadow cloud desktop module, used to allocate a shadow cloud desktop in the target resource pool, wherein the shadow cloud desktop has the same original seed image as the original cloud desktop;
[0034] A first differential data module, configured to determine first differential data based on a data difference between the original seed image in the original cloud desktop and a first disk corresponding to the original cloud desktop, and transmit the first differential data to the target resource pool;
[0035] The target cloud desktop module is used for the target resource pool to import the first differential data, and obtain the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data.
[0036] In an optional implementation, the first differential data module includes:
[0037] An original seed image acquisition submodule, used to acquire the original seed image in the original cloud desktop;
[0038] A snapshot generation submodule, used to generate an original seed image snapshot based on the original seed image, and to generate a first disk snapshot based on the first disk of the original cloud desktop;
[0039] The first differential data submodule is configured to determine the first differential data based on a data difference between the original seed image snapshot and the first disk snapshot.
[0040] In an optional implementation, the first differential data submodule includes:
[0041] A first differential data unit is used to iteratively calculate the original seed image snapshot and the first disk snapshot to determine a difference between the data volume of the original seed image snapshot and the data volume of the first disk snapshot as the first differential data;
[0042] The first differential data at least includes a newly added portion of the first disk snapshot relative to the original seed image snapshot, and a modified portion of the original seed image template volume in the first disk snapshot relative to the original seed image snapshot.
[0043] In an optional implementation, the target cloud desktop module includes:
[0044] A first transmission submodule, configured to receive, by the target resource pool, the first differential data in the original resource pool corresponding to the original cloud desktop based on a transmission protocol;
[0045] A first import submodule is used to import the first differential data into the target resource pool based on the original seed image of the shadow cloud desktop using a write instruction of a block device;
[0046] The target cloud desktop submodule is used to reconstruct the data of the second disk corresponding to the shadow cloud desktop based on the first differential data and the original seed image of the shadow cloud desktop to obtain the target cloud desktop.
[0047] In an optional implementation, the target cloud desktop submodule includes:
[0048] An initial data acquisition unit, used to acquire initial data of a second disk corresponding to the shadow cloud desktop, wherein the initial data of the second disk includes the original seed image and initial incremental data;
[0049] The differential data updating unit is used to replace the initial incremental data of the second disk with the first differential data to obtain the updated data of the second disk corresponding to the shadow cloud desktop.
[0050] In an optional implementation, the target resource pool module includes:
[0051] A delay information acquisition submodule, configured to obtain delay information between a plurality of resource pools at different locations in the cloud platform and the target location in response to a user's power-on instruction at the target location;
[0052] The target resource pool submodule is used to determine, based on the delay information between the multiple resource pools and the target location, a resource pool with the smallest delay information with the target location as the target resource pool.
[0053] In an optional implementation, the cloud desktop data synchronization device further includes:
[0054] A second differential data module, configured to determine second differential data based on a data difference between the original seed image in the target cloud desktop and a second disk corresponding to the target cloud desktop;
[0055] A second transmission module, configured to transmit the second differential data to an original resource pool corresponding to the original cloud desktop based on a transmission protocol;
[0056] The original cloud desktop update module is used for the original resource pool to import the first differential data into the first disk to update the data of the first disk to obtain an updated original cloud desktop.
[0057] A third aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the methods described in the first aspect of the embodiment of the present application.
[0058] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps of the method described in any one of the first aspect of the embodiments of the present application are implemented.
[0059] Beneficial effects:
[0060] The embodiment of the present application provides a cloud desktop data synchronization method, device, electronic device and storage medium, which relates to the field of cloud computing. The method includes: in response to a user's power-on instruction at a target location, determining a target resource pool, the target resource pool being a resource pool in the cloud platform with the lowest latency to the target location; allocating a shadow cloud desktop in the target resource pool, the shadow cloud desktop having the same original seed image as the original cloud desktop; based on the data difference between the original seed image in the original cloud desktop and the first disk corresponding to the original cloud desktop, determining the first differential data and transmitting it to the target resource pool; the target resource pool imports the first differential data, and obtains the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data. The present application allocates a shadow cloud desktop in the target resource pool with the closest latency to the target location, and separates the differential data in the original cloud desktop and transmits it to the target resource pool. In this case, the data of the original cloud desktop can be quickly and completely synchronized to the target resource pool without copying the entire cloud desktop image, thereby realizing fast switching across resource pools for cloud desktop services and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0062] Figure 1 It is a schematic diagram of a cloud desktop data synchronization method in the prior art;
[0063] Figure 2 This is a schematic diagram of the steps of a cloud desktop data synchronization method proposed in one embodiment of the present application;
[0064] Figure 3 It is a schematic diagram of a cloud desktop data synchronization method proposed in an embodiment of the present application;
[0065] Figure 4 This is a schematic diagram of the first differential data synchronization principle in a cloud desktop data synchronization method proposed in an embodiment of the present application;
[0066] Figure 5 It is a structural diagram of a cloud desktop data synchronization device proposed in one embodiment of the present application;
[0067] Figure 6 It is a schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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 are within the scope of protection of this application.
[0069] In the drawings, the size of the constituent elements, the thickness of the layer or the area may be exaggerated for the sake of clarity. Therefore, any implementation of the present disclosure is not necessarily limited to the size shown in the drawings, and the shapes and sizes of the components in the drawings do not reflect the true proportions. In addition, the drawings schematically show ideal examples, and any implementation of the present disclosure is not limited to the shapes or values shown in the drawings.
[0070] First, some professional terms involved in the embodiments of this application are explained:
[0071] Cloud desktop: Cloud desktop is a service based on cloud computing technology that moves the user's desktop environment, applications, and data storage to cloud servers, allowing users to access and operate their personal computing environment anytime and anywhere via the Internet.
[0072] Seed image: refers to an initial image that contains an operating system, applications, and configurations. This image contains a standardized, pre-configured desktop environment.
[0073] In recent years, with the rapid development of cloud computing technology, the application of cloud desktops in various industries has gradually become popular. The convenience of cloud desktops is that users can easily access their personal desktop environment through the Internet, realizing flexible office work across devices and platforms. However, if a user needs to change his or her workplace due to a business trip or other reasons, and the new workplace is physically far away from the computer room where the original cloud desktop resource pool is located, it will cause a large interaction delay, affecting the user experience.
[0074] Figure 1 A schematic diagram of a cloud desktop data synchronization method in the prior art is shown. Figure 1 As shown, in the prior art, the location of the user is city A, and the cloud service provider builds resource pool A in the computer room of city A, and the cloud desktop service is deployed in the resource pool A. When the user is located in the city A, the cloud desktop can be opened and used in the resource pool A of the city A. At this time, since the user is physically close to the computer room of city A, the latency of accessing the cloud desktop service through the resource pool A is also at a low level, so that the delay of the user in using the cloud desktop service is small (for example, Figure 1However, when the user changes his workplace to city B due to a business trip or other reasons, he needs to start the cloud desktop service in city B, and all the data related to the user's cloud desktop is stored in resource pool A in city A. Therefore, when the user uses the cloud desktop service in city B, he can only connect to the cloud desktop service in resource pool A. However, when city B is far away from resource pool A in city A, the delay in connecting to the cloud desktop service will be relatively large (for example, Figure 1 200ms shown in ), which means that when users use the cloud desktop service in city B, they are prone to lag problems, resulting in poor user experience.
[0075] On the other hand, the cloud service provider has built a resource pool B in the computer room in city B. However, since the user's permanent workplace is not in city B, all the user's cloud desktop-related data is stored in resource pool A in city A. Therefore, when the user uses the cloud desktop service in city B, the cloud desktop service cannot be realized through resource pool B in city B, and the computing power of resource pool B, which is physically closer, is not well utilized.
[0076] In view of this, the present application embodiment proposes a cloud desktop data synchronization method. Figure 2 A schematic diagram of the steps of a cloud desktop data synchronization method proposed in an embodiment of the present application is shown. Figure 2 As shown, the method comprises the following steps:
[0077] S101. In response to a power-on instruction from a user at a target location, a target resource pool is determined, where the target resource pool is a resource pool in a cloud platform with the lowest latency to the target location.
[0078] When the step S101 is specifically implemented, in response to the user's power-on instruction at the target location, the target resource pool is determined, wherein the target resource pool is the resource pool in the cloud platform with the lowest latency to the target location. In the embodiment of the present application, the resource pool generally refers to a data center or server cluster of a cloud computing service, and the resource pool at each location is deployed in a computer room of a cloud desktop service at the corresponding location; the target location is another geographical location different from the location of the resource pool where the user often uses to start the cloud desktop service. For example, the target location can be another workplace where the user temporarily or temporarily stays due to business trips or other reasons from his or her permanent workplace (original location).
[0079] In the embodiment of the present application, the cloud platform is a cloud computing service platform for controlling the cloud desktop service provided by the user. The cloud platform uses cloud computing technology to migrate the traditional desktop computing environment to the cloud. Users can access their cloud desktop environment anytime and anywhere through various terminal devices (such as personal computers, tablet computers, smart phones, etc.), wherein the cloud service provider deploys multiple computer rooms in different geographical locations to provide multiple resource pools in different locations, and controls them through the cloud platform. Since there is a physical distance between the target location and the original location, when the user turns on the cloud desktop service at the target location, in order to reduce the delay of the user using the cloud desktop service, it is necessary to determine a target resource pool with a lower delay than the original resource pool at the original location.
[0080] In some optional implementations, the target resource pool is determined according to the following steps: First, in response to the user's power-on instruction at the target location, the delay information between multiple resource pools at different locations in the cloud platform and the target location is obtained, wherein the delay information between the resource pool at each location and the target location represents the total time required for the user terminal device at the target location to send to the resource pool at each location and return the result. In the case where the delay information between the resource pool and the target location is large, it indicates that when the resource pool is used as the target resource pool for running the cloud desktop service, there will be a large delay in data transmission between the target resource pool and the user terminal device at the target location; on the contrary, in the case where the delay information between the resource pool and the target location is small, it indicates that when the resource pool is used as the target resource pool for running the cloud desktop service, there will be a small delay in data transmission between the target resource pool and the user terminal device at the target location. Subsequently, based on the delay information between the multiple resource pools and the target location, the resource pool with the smallest delay information between the resource pool and the target location is determined as the target resource pool.
[0081] In some other optional implementations, the target resource pool can also be determined in the following manner: first, in response to the user's power-on instruction at the target location, the distance information between multiple resource pools at different locations in the cloud platform and the target location is obtained. When the distance information between the resource pool and the target location is large, it indicates that when the resource pool is used as the target resource pool for running the cloud desktop service, the target resource pool and the user terminal device at the target location need to transmit a longer distance, resulting in a larger delay in data transmission; on the contrary, when the distance information between the resource pool and the target location is small, it indicates that when the resource pool is used as the target resource pool for running the cloud desktop service, the target resource pool and the user terminal device at the target location need to transmit a shorter distance for data transmission, resulting in a smaller delay in data transmission. Subsequently, based on the distance information between the multiple resource pools and the target location, the resource pool with the smallest distance information to the target location is determined as the target resource pool.
[0082] S102: Allocate a shadow cloud desktop in the target resource pool, where the shadow cloud desktop has the same original seed image as the original cloud desktop.
[0083] When the step S102 is specifically implemented, after determining the target resource pool, a shadow cloud desktop is allocated in the target resource pool. Among them, the shadow cloud desktop is configured so that the user can directly use the cloud desktop service through the shadow cloud desktop of the target resource pool. In the embodiment of the present application, in order to achieve data synchronization between the resource pools at different locations, the shadow cloud desktop has the same original seed image and specifications as the original cloud desktop, and the original seed image (or referred to as a base image, a mother image, etc.) refers to the initial image file used to create a cloud desktop instance, and the original seed image usually includes an operating system, necessary drivers, pre-installed software, and configuration information, etc. The original seed image is the cornerstone of the cloud desktop service environment; the original cloud desktop refers to the cloud desktop service used by the user in the original resource pool at the original location. By ensuring that the shadow cloud desktop has the same original seed image and specifications as the original cloud desktop, the system version, memory, CPU and other operating environments of the cloud desktop service are kept consistent when the user uses the cloud desktop service in the target resource pool.
[0084] S103: Based on the data difference between the original seed image in the original cloud desktop and the first disk corresponding to the original cloud desktop, determine the first differential data and transmit it to the target resource pool.
[0085] When the step S103 is specifically implemented, since most of the disk data of the cloud desktop is cloned based on the snapshot of the template volume of the original seed image, and the original seed image corresponds to the initialization state of the cloud desktop application, after the user uses the cloud desktop, the amount of incremental modification of the disk data of the cloud desktop relative to the original seed image is relatively small. For example, the total actual data volume of the system disk of a cloud desktop is 50GB, of which the actual data volume of the template volume of the original seed image is 48GB, but the incremental modification data of the system disk of this cloud desktop relative to the template volume of the original seed image may be only 2GB. It should be noted that the above example is only an optional example given to enable those skilled in the art to better understand the scheme of the embodiment of the present application. The data volume of the system disk, original seed image and incremental modification data of the specific cloud desktop can be determined according to actual conditions, and the embodiment of the present application is not limited here.
[0086] In an embodiment of the present application, since the shadow cloud desktop of the target resource pool and the original cloud desktop have the same original seed image, when synchronizing the data in the target resource pool and the original resource pool, the amount of data to be synchronized between different resource pools can be reduced by transmitting only the incremental modified data in the cloud desktop system disk of the original resource pool relative to the original seed image, thereby greatly reducing the time consumption of data synchronization, saving data transmission traffic, and significantly reducing the delay caused by data synchronization.
[0087] Specifically, first, the original seed image used to create the original cloud desktop is obtained from the original cloud desktop; based on the original seed image, an original seed image snapshot is generated; and based on the first disk of the original cloud desktop, a first disk snapshot is generated, wherein the original seed image snapshot is a complete record or copy of the data of the original seed image at a specific point in time, and the original seed image snapshot is used as the basis for subsequent template volume cloning operations, that is, the system disk of each cloud desktop in a different resource pool is cloned based on the original seed image snapshot. The first disk refers to the system disk of the original resource pool used to run the original cloud desktop service, and the first disk snapshot is a complete record or copy of the data of the first disk at the time when the user is at the target location to start the cloud desktop service, and the first disk snapshot is used to obtain differential data of the original resource pool.
[0088] It should be noted that, since the original seed image snapshot is obtained based on the original seed image, other subsequent system disks are only obtained based on the original seed image snapshot, so modifications to system disks of other resource pools will not affect the original seed image.
[0089] Subsequently, based on the data difference between the original seed image snapshot and the first disk snapshot, the first differential data is determined, and the first differential data is the data in the original resource pool that is incremented and / or modified by the user in the process of running the original cloud desktop service relative to the data of the original seed image. Specifically, the original seed image snapshot and the first disk snapshot are iteratively calculated to determine the difference between the data volume of the original seed image snapshot and the data volume of the first disk snapshot as the first differential data, wherein the first differential data includes at least the newly added part of the first disk snapshot relative to the original seed image snapshot, and the modified part of the original seed image template volume in the first disk snapshot relative to the original seed image snapshot.
[0090] Optionally, an export command of a block device (rbd export-diff command) is used to iteratively calculate the original seed image snapshot and the first disk snapshot to determine the difference between the data volume of the original seed image snapshot and the data volume of the first disk snapshot as the first differential data, wherein the export command (rbd export-diff command) is a tool for performing incremental snapshot export on a RADOS block device (rbd) in a Ceph distributed storage system. At the block device layer, the export command allows a user to export the change data of an rbd image since its creation or since a specified snapshot, rather than a complete copy of the entire image, thereby greatly saving backup time and storage space.
[0091] Finally, the original resource pool transmits the first differential data to the target resource pool to support the target resource pool in constructing disk data identical to the first disk data of the target resource pool, thereby quickly achieving data synchronization of the cloud desktop. Optionally, the original resource pool transmits the first differential data to the target resource pool based on a transmission protocol, and exemplarily, the transmission protocol may be an SSH protocol.
[0092] For example, Figure 4 FIG. 1 shows a schematic diagram of a first differential data synchronization principle in a cloud desktop data synchronization method proposed in an embodiment of the present application. Figure 4As shown, resource pool A is the original resource pool, and resource pool B is the target resource pool. First, in resource pool A, the original seed image I for creating the original cloud desktop and the original cloud desktop disk S1 (that is, the first disk corresponding to the original cloud desktop) are found, and the data of the original seed image I and the first disk S1 are quickly iterated and calculated to find the difference between the original seed image I and the first disk S1, that is, the first difference data S1-I, and this part of the first difference data is transmitted to the resource pool B through the SSH protocol.
[0093] S104: The target resource pool imports the first differential data, and obtains a target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data.
[0094] When step S104 is specifically implemented, the target resource pool imports the first differential data, and obtains the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data. In an embodiment of the present application, since the shadow cloud desktop has the same original seed image as the original cloud desktop, the target resource pool obtains data synchronized with the original resource pool based on the local original seed image and the first differential data transmitted by the original resource pool, thereby enabling the user to use the cloud desktop based on the target resource pool. Specifically, first, the target resource pool receives the first differential data in the original resource pool corresponding to the original cloud desktop based on the transmission protocol. Exemplarily, the transmission protocol can be the SSH protocol.
[0095] Subsequently, based on the original seed image of the shadow cloud desktop, the first differential data is imported into the target resource pool using a write instruction of a block device. Optionally, the first differential data is imported into the target resource pool using a write command of a block device (rbdimport-diff command), wherein the write command (rbdimport-diff command) is a command for importing the image difference file of the rbd block device in the Ceph distributed storage system. In the Ceph environment, the rbd block device provides block-level storage, similar to a physical hard disk or partition, and the write command (rbdimport-diff command) is used to re-import the first differential data previously exported by the export command (rbd export-diff command) into the rbd image of the target resource pool.
[0096] After the first differential data is imported into the target resource pool, the data of the second disk corresponding to the shadow cloud desktop is reconstructed based on the first differential data and the original seed image of the shadow cloud desktop to obtain the target cloud desktop. Specifically, the initial data of the second disk corresponding to the shadow cloud desktop is obtained, and the initial data of the second disk includes the original seed image and the initial incremental data, wherein the initial incremental data refers to the incremental data generated when the user turns on the cloud desktop service in the target resource pool at the target location, and the second disk refers to the system disk used by the target resource pool to run the target cloud desktop service; the first differential data is used to replace the initial incremental data of the second disk to obtain the updated data of the second disk corresponding to the shadow cloud desktop.
[0097] For example, Figure 4 As shown, resource pool A is the original resource pool, and resource pool B is the target resource pool. In resource pool B, since the shadow cloud desktop and the original cloud desktop are the same original seed image, the original seed image I that is the same as that in resource pool A can definitely be found in resource pool B. The data S2 of the second disk is obtained by combining the original seed image I and the received first differential data S1-I. The data S2 of the second disk is I+S1-I=S1, that is, the data of the second disk is completely consistent with the data of the first disk corresponding to the original cloud desktop. This data is then replaced with the disk data of the shadow cloud desktop, so that the data of the shadow cloud desktop is exactly the same as the data of the original cloud desktop, thereby completing the data synchronization between the target cloud desktop and the original cloud desktop.
[0098] In an embodiment of the present application, when a cloud desktop user needs to change his or her work location, the cloud platform can automatically detect the target resource pool with the lowest access delay based on the user's target location, and open a shadow cloud desktop with the same specifications and the same image for the user in the target resource pool. After the user arrives at the destination, he or she uses the newly opened shadow cloud desktop to achieve nearby access at the computing power level. At the same time, the first differential data is extracted at the block device level, and the cloud platform automatically, quickly, and completely synchronizes the first differential data of the original cloud desktop to the shadow cloud desktop, thereby achieving nearby access at the data level. The cloud desktop data synchronization method based on differential data proposed in an embodiment of the present application effectively ensures that the application and system data of the shadow cloud desktop remain completely consistent with the original cloud desktop, that is, cross-resource pool switching of cloud desktop services is achieved. This implementation ensures that the computing power and data of the cloud desktop can be obtained near the user's location, reducing interaction delays. Users do not need to manually migrate cloud desktop data, which improves the overall user experience and achieves data and computing following people.
[0099] On the other hand, the method provided by the embodiment of the present application quickly iterates and calculates the data difference between the original seed image of the original cloud desktop and the first disk at the block device layer, and transmits the first differential data corresponding to the differential part to the target resource pool using a transmission protocol, imports the first differential data into the target resource pool according to the same original seed image, and replaces the final data obtained with the disk of the shadow cloud desktop, thereby realizing data synchronization between the two cloud desktops. This method enables only the differential part to be transmitted without copying the full cloud desktop disk data, greatly improving the efficiency of data synchronization and reducing user waiting time.
[0100] In some optional implementations, after obtaining the target cloud desktop, since new differential data will be generated when the user operates on the target cloud desktop, in order to ensure that when the user returns from the target location to the initial location of the original cloud desktop (such as the permanent workplace), the original cloud desktop can be directly used to obtain the operation data on the target cloud desktop to improve the user experience, this part of the new differential data will also be returned for synchronization in the embodiments of the present application. Specifically, after obtaining the target cloud desktop, the second differential data is determined based on the data difference between the original seed image in the target cloud desktop and the second disk corresponding to the target cloud desktop; the second differential data is transmitted to the original resource pool corresponding to the original cloud desktop based on the transmission protocol; the original resource pool imports the first differential data into the first disk to update the data of the first disk to obtain an updated original cloud desktop.
[0101] In order to enable those skilled in the art to understand the present application more clearly, the cloud desktop data synchronization method described in the present application is now described in detail through the following embodiments.
[0102] Figure 3 A schematic diagram of a cloud desktop data synchronization method proposed in an embodiment of the present application is shown. Figure 3As shown, the user's permanent workplace is city A, and the computer room in city A is equipped with an original resource pool for running the original cloud desktop. When the user goes to city B, city B, as the target location, first responds to the user's power-on command in city B, obtains the delay information between multiple resource pools at different locations in the cloud platform and the target location, and then determines resource pool B with the smallest delay information as the target resource pool corresponding to city B, and allocates the shadow cloud desktop of the original cloud desktop in resource pool B; finds the original seed image and the first disk for creating the original cloud desktop, performs rapid iterative calculations on the snapshot data of the original seed image and the first disk, finds the first differential data between the original seed image and the first disk, and transfers this part of the first differential data to resource pool B; resource pool B combines the first differential data with the local original seed image as the data of the second disk to obtain the target cloud desktop of resource pool B.
[0103] When the user goes to city C, the city C is used as the target location. First, in response to the user's power-on command in the city C, the delay information between multiple resource pools at different locations in the cloud platform and the target location is obtained, and then the resource pool C with the smallest delay information is determined as the target resource pool corresponding to the city C, and the shadow cloud desktop of the original cloud desktop is allocated in the resource pool C; the original seed image and the first disk for creating the original cloud desktop are found, and the snapshot data of the original seed image and the first disk are quickly iterated and calculated to find the first differential data between the original seed image and the first disk, and this part of the first differential data is transferred to the resource pool C; the resource pool C combines the first differential data with the local original seed image as the data of the second disk to obtain the target cloud desktop of the resource pool C.
[0104] The embodiment of the present application provides a cloud desktop data synchronization method, device, electronic device and storage medium, which relates to the field of cloud computing. The method includes: in response to a user's power-on instruction at a target location, determining a target resource pool, the target resource pool being a resource pool in the cloud platform with the lowest latency to the target location; allocating a shadow cloud desktop in the target resource pool, the shadow cloud desktop having the same original seed image as the original cloud desktop; based on the data difference between the original seed image in the original cloud desktop and the first disk corresponding to the original cloud desktop, determining the first differential data and transmitting it to the target resource pool; the target resource pool imports the first differential data, and obtains the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data. The present application allocates a shadow cloud desktop in the target resource pool with the closest latency to the target location, and separates the differential data in the original cloud desktop and transmits it to the target resource pool. In this case, the data of the original cloud desktop can be quickly and completely synchronized to the target resource pool without copying the entire cloud desktop image, thereby realizing fast switching across resource pools for cloud desktop services and improving user experience.
[0105] Based on the same inventive concept, the present application embodiment discloses a cloud desktop data synchronization device. Figure 5 A schematic diagram of the structure of a cloud desktop data synchronization device proposed in an embodiment of the present application is shown. Figure 5 As shown, the device comprises:
[0106] A target resource pool module, for determining a target resource pool in response to a power-on instruction from a user at a target location, wherein the target resource pool is a resource pool in the cloud platform with the lowest latency to the target location;
[0107] A shadow cloud desktop module, used to allocate a shadow cloud desktop in the target resource pool, wherein the shadow cloud desktop has the same original seed image as the original cloud desktop;
[0108] A first differential data module, configured to determine first differential data based on a data difference between the original seed image in the original cloud desktop and a first disk corresponding to the original cloud desktop, and transmit the first differential data to the target resource pool;
[0109] The target cloud desktop module is used for the target resource pool to import the first differential data, and obtain the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data.
[0110] In an optional implementation, the first differential data module includes:
[0111] An original seed image acquisition submodule, used to acquire the original seed image in the original cloud desktop;
[0112] A snapshot generation submodule, used to generate an original seed image snapshot based on the original seed image, and to generate a first disk snapshot based on the first disk of the original cloud desktop;
[0113] The first differential data submodule is configured to determine the first differential data based on a data difference between the original seed image snapshot and the first disk snapshot.
[0114] In an optional implementation, the first differential data submodule includes:
[0115] A first differential data unit is used to iteratively calculate the original seed image snapshot and the first disk snapshot to determine a difference between the data volume of the original seed image snapshot and the data volume of the first disk snapshot as the first differential data;
[0116] The first differential data at least includes a newly added portion of the first disk snapshot relative to the original seed image snapshot, and a modified portion of the original seed image template volume in the first disk snapshot relative to the original seed image snapshot.
[0117] In an optional implementation, the target cloud desktop module includes:
[0118] A first transmission submodule, configured to receive, by the target resource pool, the first differential data in the original resource pool corresponding to the original cloud desktop based on a transmission protocol;
[0119] A first import submodule is used to import the first differential data into the target resource pool based on the original seed image of the shadow cloud desktop using a write instruction of a block device;
[0120] The target cloud desktop submodule is used to reconstruct the data of the second disk corresponding to the shadow cloud desktop based on the first differential data and the original seed image of the shadow cloud desktop to obtain the target cloud desktop.
[0121] In an optional implementation, the target cloud desktop submodule includes:
[0122] An initial data acquisition unit, used to acquire initial data of a second disk corresponding to the shadow cloud desktop, wherein the initial data of the second disk includes the original seed image and initial incremental data;
[0123] The differential data updating unit is used to replace the initial incremental data of the second disk with the first differential data to obtain the updated data of the second disk corresponding to the shadow cloud desktop.
[0124] In an optional implementation, the target resource pool module includes:
[0125] A delay information acquisition submodule, configured to obtain delay information between a plurality of resource pools at different locations in the cloud platform and the target location in response to a user's power-on instruction at the target location;
[0126] The target resource pool submodule is used to determine, based on the delay information between the multiple resource pools and the target location, a resource pool with the smallest delay information with the target location as the target resource pool.
[0127] In an optional implementation, the cloud desktop data synchronization device further includes:
[0128] A second differential data module, configured to determine second differential data based on a data difference between the original seed image in the target cloud desktop and a second disk corresponding to the target cloud desktop;
[0129] A second transmission module, configured to transmit the second differential data to an original resource pool corresponding to the original cloud desktop based on a transmission protocol;
[0130] The original cloud desktop update module is used for the original resource pool to import the first differential data into the first disk to update the data of the first disk to obtain an updated original cloud desktop.
[0131] Based on the same inventive concept, the present application embodiment discloses an electronic device, Figure 6 A schematic diagram of an electronic device proposed in an embodiment of the present application is shown, such as Figure 6 As shown, the electronic device 100 includes: a memory 110 and a processor 120, the memory 110 and the processor 120 are connected via a bus communication, the memory 110 stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set can be loaded and run on the processor 120 to implement the steps in the cloud desktop data synchronization method disclosed in the embodiment of the present application.
[0132] Based on the same inventive concept, an embodiment of the present application discloses a computer-readable storage medium, on which is stored at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the steps in the cloud desktop data synchronization method disclosed in the embodiment of the present application.
[0133] Based on the same inventive concept, an embodiment of the present application discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the cloud desktop data synchronization method disclosed in the embodiment of the present application.
[0134] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other.
[0135] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, electronic devices, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0136] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0138] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0139] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0140] The above is a detailed introduction to a cloud desktop data synchronization method, device, electronic device and storage medium provided by 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 of the present application and its core idea; at the same time, for general technical personnel in this field, 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.
Claims
1. A cloud desktop data synchronization method, characterized in that: The method comprises: In response to a power-on instruction from a user at a target location, a target resource pool is determined, where the target resource pool is a resource pool in the cloud platform with the lowest latency to the target location; Allocate a shadow cloud desktop in the target resource pool, wherein the shadow cloud desktop has the same original seed image as the original cloud desktop; Based on the data difference between the original seed image in the original cloud desktop and the first disk corresponding to the original cloud desktop, determining first differential data and transmitting it to the target resource pool; The target resource pool imports the first differential data, and obtains the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data.
2. The cloud desktop data synchronization method according to claim 1, characterized in that: The determining first differential data based on the data difference between the original seed image in the original cloud desktop and the first disk corresponding to the original cloud desktop includes: Obtaining the original seed image in the original cloud desktop; Based on the original seed image, generating an original seed image snapshot, and based on the first disk of the original cloud desktop, generating a first disk snapshot; The first differential data is determined based on a data difference between the original seed image snapshot and the first disk snapshot.
3. The cloud desktop data synchronization method according to claim 2, characterized in that: The determining the first differential data based on the data difference between the original seed image snapshot and the first disk snapshot includes: Iteratively calculating the original seed image snapshot and the first disk snapshot to determine a difference between the data volume of the original seed image snapshot and the data volume of the first disk snapshot as the first differential data; The first differential data at least includes a newly added portion of the first disk snapshot relative to the original seed image snapshot, and a modified portion of the original seed image template volume in the first disk snapshot relative to the original seed image snapshot.
4. The cloud desktop data synchronization method according to claim 1, characterized in that: The target resource pool imports the first differential data, and obtains the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data, including: Based on a transmission protocol, the target resource pool receives the first differential data in an original resource pool corresponding to the original cloud desktop; Based on the original seed image of the shadow cloud desktop, using a write instruction of a block device, importing the first differential data into the target resource pool; Based on the first differential data and the original seed image of the shadow cloud desktop, the data of the second disk corresponding to the shadow cloud desktop is reconstructed to obtain the target cloud desktop.
5. The cloud desktop data synchronization method according to claim 4, characterized in that: The reconstructing the data of the second disk corresponding to the shadow cloud desktop based on the first differential data and the original seed image of the shadow cloud desktop includes: Acquire initial data of a second disk corresponding to the shadow cloud desktop, where the initial data of the second disk includes the original seed image and initial incremental data; The initial incremental data of the second disk is replaced with the first differential data to obtain updated data of the second disk corresponding to the shadow cloud desktop.
6. The cloud desktop data synchronization method according to claim 1, characterized in that: The step of determining the target resource pool in response to a power-on instruction from a user at a target location includes: In response to a power-on instruction from a user at the target location, obtaining delay information between a plurality of resource pools at different locations in the cloud platform and the target location; Based on the delay information between the multiple resource pools and the target location, a resource pool with the smallest delay information with the target location is determined as the target resource pool.
7. The cloud desktop data synchronization method according to any one of claims 1 to 6, characterized in that: After obtaining the target cloud desktop, the method further includes: Determining second differential data based on a data difference between the original seed image in the target cloud desktop and a second disk corresponding to the target cloud desktop; Transmitting the second differential data to an original resource pool corresponding to the original cloud desktop based on a transmission protocol; The original resource pool imports the first differential data into the first disk to update the data of the first disk and obtain an updated original cloud desktop.
8. A cloud desktop data synchronization device, characterized in that: The device comprises: A target resource pool module, for determining a target resource pool in response to a power-on instruction from a user at a target location, wherein the target resource pool is a resource pool in the cloud platform with the lowest latency to the target location; A shadow cloud desktop module, used to allocate a shadow cloud desktop in the target resource pool, wherein the shadow cloud desktop has the same original seed image as the original cloud desktop; A first differential data module, configured to determine first differential data based on a data difference between the original seed image in the original cloud desktop and a first disk corresponding to the original cloud desktop, and transmit the first differential data to the target resource pool; The target cloud desktop module is used for the target resource pool to import the first differential data, and obtain the target cloud desktop based on the original seed image of the shadow cloud desktop and the first differential data.
9. An electronic device, characterized in that: It includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps in the cloud desktop data synchronization method described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps in the cloud desktop data synchronization method described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
System mirror image file updating method of virtual machine, cloud data center and system
CN105094948A
Method and system for switching cloud desktops
CN105791400A
Cloud desktop data persistence method and system based on ZNBase database cluster
CN114443774A
Image data real-time modification method and device in cloud desktop image transmission process
CN115913939A
Data updating method and device, equipment and storage medium
CN116257280A