CN114238253A - Virtual cloud desktop storage sharing method and device, computer equipment and storage medium - Google Patents

Virtual cloud desktop storage sharing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114238253A
CN114238253A CN202111402285.8A CN202111402285A CN114238253A CN 114238253 A CN114238253 A CN 114238253A CN 202111402285 A CN202111402285 A CN 202111402285A CN 114238253 A CN114238253 A CN 114238253A
Authority
CN
China
Prior art keywords
file
stored
storage
data
cloud desktop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111402285.8A
Other languages
Chinese (zh)
Inventor
洪哲盛
廖敏飞
吴孟晴
董思
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111402285.8A priority Critical patent/CN114238253A/en
Publication of CN114238253A publication Critical patent/CN114238253A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket

Abstract

The application relates to a virtual cloud desktop storage sharing method and device, computer equipment and a storage medium. The method comprises the following steps: constructing a storage resource pool based on the storage array, and setting a file storage layer in the storage resource pool to perform unified management on the data disk of the virtual cloud desktop; when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk or not according to the unique identifier corresponding to the stored file; and establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer based on the judgment result. By the method, the use efficiency of the cloud desktop data disk can be improved.

Description

Virtual cloud desktop storage sharing method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of cloud computing resource scheduling, in particular to a virtual cloud desktop storage sharing method and device, computer equipment and a storage medium.
Background
A Virtual cloud Desktop based on a Virtual Desktop Infrastructure (VDI) technology is an implementation manner of remote office. The VDI is a virtual cloud desktop infrastructure with centralized computing and centralized storage, all computing resources are based on a server, all operations are performed on the server, the front end only needs a thin terminal to be connected with the virtual cloud desktop on the server through a network and displayed on a display, and each user is an independent operating system and is completely separated logically. VDI has great advantages in terms of resource on-demand allocation, mobile device access, centralized management control, server architecture design, data security, etc. Through the virtual cloud desktop, a user can access working environments on various different devices of the user at any time and any place, and almost consistent working experience is obtained.
Generally, a cloud desktop of a user has a system disk and a data disk, the system disk is generally configured to reset data after the system is restarted, and data to be retained by the user is stored in the data disk. The data disks of each user are respectively and independently drawn from the total storage pool, and when the number of users is large, the space requirement of the total storage pool is also large. As the demand for storage space increases by users, the total storage pool also needs to be expanded. However, the storage requirements of different users are different, the allocated storage space is often caught for the heavy users, and the expansion of the total storage pool is often delayed, which results in the technical problem of low utilization efficiency of the existing cloud desktop data disk.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a virtual cloud desktop storage sharing method, apparatus, computer device and storage medium capable of improving the efficiency of data disk usage.
A virtual cloud desktop storage sharing method, the method comprising:
constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on a data disk of the virtual cloud desktop;
when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk or not according to the unique identifier corresponding to the stored file;
and establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer based on the judgment result.
In one embodiment, the method further comprises the following steps: if the stored file is not in the data disc, recording the file information and the storage position of the stored file into a file table of the data disc, and establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer;
and if the stored file is in the data disc, directly establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer.
In one embodiment, the method further comprises the following steps: when a user of the virtual cloud desktop deletes a file, deleting a mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer;
and when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc.
In one embodiment, the method further comprises the following steps: when a user of the virtual cloud desktop modifies a file, deleting a mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer;
and modifying the file to be modified to generate a modified file, and establishing a mapping relation between the modified file in the data disc and the modified file in the file storage layer.
In one embodiment, the method further comprises the following steps: setting a file storage layer in the storage resource pool, and realizing a storage interface between the storage resource pool and a data disc of a virtual cloud desktop based on the file storage layer;
distributing corresponding storage limits for different virtual cloud desktop users in the file storage layer, wherein the upper limit of the storage limits is the maximum capacity of the data disk.
In one embodiment, the method further comprises the following steps: comparing the unique identification corresponding to the stored file with the unique identification corresponding to the stored file in the data disc;
and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
In one embodiment, the method further comprises the following steps: if the unique identification which is the same as the unique identification corresponding to the stored file exists in the unique identification corresponding to the stored file in the data disc, judging that the stored file is in the data disc;
and if the unique identifier corresponding to the stored file does not exist in the unique identifiers corresponding to the stored files in the data disk, judging that the stored file is not in the data disk.
A virtual cloud desktop storage sharing apparatus, the apparatus comprising:
the storage construction module is used for constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on the data disk of the virtual cloud desktop;
the identification generation module is used for generating a unique identification corresponding to the stored file based on the content of the stored file when the user of the virtual cloud desktop stores the file, and judging whether the stored file is in the data disk according to the unique identification corresponding to the stored file;
and the storage module is used for establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer based on the judgment result.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on a data disk of the virtual cloud desktop;
when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk or not according to the unique identifier corresponding to the stored file;
and establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer based on the judgment result.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on a data disk of the virtual cloud desktop;
when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk or not according to the unique identifier corresponding to the stored file;
and establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer based on the judgment result.
According to the virtual cloud desktop storage sharing method, the virtual cloud desktop storage sharing device, the computer equipment and the storage medium, the storage resource pool is built based on the storage array, the file storage layer is arranged in the storage resource pool to carry out unified management on the data disc of the virtual cloud desktop, when the user of the virtual cloud desktop stores the file, the unique identifier corresponding to the stored file is generated based on the content of the stored file, whether the stored file is in the data disc or not is judged according to the unique identifier corresponding to the stored file, and based on the judgment result, the stored file in the data disc and the stored file in the file storage layer are subjected to mapping relation. According to the method provided by the embodiment, physical storage space does not need to be allocated to the user, only a logical storage space quota needs to be allocated, for files with the same content, only one copy of the file is reserved on the shared storage, reading of a plurality of users can be achieved, space occupation is reduced, and the use efficiency of the cloud desktop data disk is improved.
Drawings
FIG. 1 is a diagram of an application environment of a virtual cloud desktop storage sharing method in one embodiment;
FIG. 2 is a schematic flow diagram of a virtual cloud desktop storage sharing method in one embodiment;
FIG. 3 is a schematic flow chart illustrating the steps of writing data to the virtual cloud desktop in one embodiment;
FIG. 4 is a schematic flow chart illustrating steps of deleting data from a virtual cloud desktop in one embodiment;
FIG. 5 is a block diagram of an embodiment of a virtual cloud desktop storage sharing device;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The virtual cloud desktop storage sharing method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a virtual cloud desktop storage sharing method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step 202, a storage resource pool is constructed based on the storage array, and a file storage layer is arranged in the storage resource pool to perform unified management on the data disks of the virtual cloud desktop.
Specifically, a virtual cloud desktop of a user usually has a system disk and a data disk, and the system disk is generally configured to reset data after the system is restarted; the data to be reserved by the user is stored in the data disk. A pool of storage resources is constructed using the storage array. And a file storage layer is added on the storage resource pool, a storage interface of a disk is realized through the file storage layer, and the whole storage resource pool is managed in a unified way.
Step 204, when the user of the virtual cloud desktop stores the file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk according to the unique identifier corresponding to the stored file.
Specifically, fig. 3 is a schematic flow chart of a step of writing data into the virtual cloud desktop in an embodiment, and as shown in fig. 3, when a user of the virtual cloud desktop stores data in a data disk space allocated to the user, a file storage layer generates a unique identifier for each file by using the file as a unit. The generation process of the unique identifier is calculated only according to the content of the file and is not influenced by the path and the name of the file. The generated unique identifications are consistent as long as the files have the same content. When a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and comparing the unique identifier corresponding to the stored file with the unique identifier of the stored file in the data disk to judge whether the stored file is in the data disk.
And step 206, based on the judgment result, establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer.
Specifically, whether the stored file is in the data disc is judged according to the unique identifier corresponding to the stored file, and for different judgment results, a mapping relation is established between the stored file in the data disc and the stored file in the file storage layer.
In one embodiment, the mapping the stored files in the data disk with the stored files in the file storage layer based on the determination result includes:
if the stored file is not in the data disc, recording the file information and the storage position of the stored file into a file table of the data disc, and establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer.
And if the stored file is in the data disc, directly establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer.
Specifically, whether the stored file is in the data disc or not is judged by comparing the unique identifier of the stored file with the unique identifier of each file in the data disc, if the stored file is not in the data disc, the file information and the storage position of the stored file are recorded in a file table of the data disc, and meanwhile, a mapping relation is established between the stored file in the data disc and the stored file in the file storage layer, namely, the stored file in the data disc and the stored file in the file storage layer are bound to realize quick search. And if the stored file is in the data disc, directly establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer.
In the virtual cloud desktop storage and sharing method, a storage resource pool is built based on a storage array, a file storage layer is arranged in the storage resource pool to carry out unified management on a data disc of the virtual cloud desktop, when a user of the virtual cloud desktop stores a file, a unique identifier corresponding to the stored file is generated based on the content of the stored file, whether the stored file is in the data disc is judged according to the unique identifier corresponding to the stored file, when the stored file is not in the data disc, the file information and the storage position of the stored file are recorded in a file table of the data disc, meanwhile, a mapping relation is established between the stored file in the data disc and the stored file in the file storage layer, when the stored file is in the data disc, the mapping relation is directly established between the stored file in the data disc and the stored file in the file storage layer, and the same file is only stored once, the service efficiency of the cloud desktop data disk is improved.
In one embodiment, the virtual cloud desktop storage sharing method further includes: when a user of the virtual cloud desktop deletes a file, deleting a mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer;
and when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc.
Specifically, fig. 4 is a schematic flowchart of a data deleting step of the virtual cloud desktop in an embodiment, as shown in fig. 4, when a user of the virtual cloud desktop deletes a file, the file stored in the data disk does not need to be directly deleted, and only a mapping relationship between the file to be deleted in the data disk and the file to be deleted in the file storage layer needs to be deleted, that is, when another user needs to store the file to be deleted of the user, only the mapping relationship between the corresponding file to be deleted and the file to be deleted in the file storage layer needs to be deleted. When the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc; at this time, since no user has stored the file to be deleted in the data disk, the file to be deleted can be deleted directly in the data disk.
In the embodiment, when a user of the virtual cloud desktop deletes a file, the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is only deleted, when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, the file to be deleted in the data disc is deleted, only one necessary backup is reserved on shared storage for the files with the same content, a plurality of users read the same file, space occupation is reduced, the mapping relation between the file to be deleted and the file in the file storage layer of the user is only deleted when the file is deleted, and the use efficiency of the cloud desktop data disc is improved.
In one embodiment, the virtual cloud desktop storage sharing method further includes: when a user of the virtual cloud desktop modifies a file, deleting a mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer;
and modifying the file to be modified to generate a modified file, and establishing a mapping relation between the modified file in the data disc and the modified file in the file storage layer.
Specifically, when a user of the virtual cloud desktop modifies a file, a mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer is deleted, the file to be modified is modified to generate a modified file after the mapping relation is deleted, and a mapping relation between the modified file in the data disc and the modified file in the file storage layer is established for the modified file according to the generation step of the new file.
In the embodiment, when a user of the virtual cloud desktop modifies a file, the mapping relationship between the file to be modified in the data disc and the file to be modified in the file storage layer is deleted, the file to be modified is modified to generate a modified file, and the mapping relationship between the modified file in the data disc and the modified file in the file storage layer is established, so that the modification of the file stored by the user is realized, and the use efficiency of the cloud desktop data disc is improved.
In an embodiment, the setting, in the storage resource pool, a file storage layer to perform unified management on a data disk of a virtual cloud desktop includes:
setting a file storage layer in the storage resource pool, and realizing a storage interface between the storage resource pool and a data disc of a virtual cloud desktop based on the file storage layer;
distributing corresponding storage limits for different virtual cloud desktop users in the file storage layer, wherein the upper limit of the storage limits is the maximum capacity of the data disk.
Specifically, when the storage resource pool is provided with a file storage layer to perform unified management on the data disc of the virtual cloud desktop, firstly, the file storage layer is arranged in the storage resource pool, a storage interface between the storage resource pool and the data disc of the virtual cloud desktop is realized based on the file storage layer, and the connection and management of the storage resource pool through the file storage layer are realized. The corresponding storage quota is distributed for different virtual cloud desktop users in the file storage layer, the distributed storage quota is consumed when the users of different virtual cloud desktops store the same file, the different users can meet the storage requirements of the different users on the same file only by storing the same file once, and the upper limit of the storage quota is the maximum capacity of the data disc.
In the embodiment, the file storage layer is arranged in the storage resource pool, the storage interface of the storage resource pool and the data disc of the virtual cloud desktop is realized based on the file storage layer, the corresponding storage limit is distributed to different virtual cloud desktop users in the file storage layer, the upper limit of the storage limit is the maximum capacity of the data disc, the storage of the same file by different users is realized only once, and the repeated storage efficiency of the same resource is improved.
In one embodiment, the determining whether the stored file is already in the data disc according to the unique identifier corresponding to the stored file includes:
comparing the unique identification corresponding to the stored file with the unique identification corresponding to the stored file in the data disc;
and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
Specifically, when judging whether the stored file is in the data disk, comparing the unique identifier corresponding to the stored file with the unique identifier corresponding to the stored file in the data disk, and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
In this embodiment, the unique identifier corresponding to the stored file is compared with the unique identifier corresponding to the stored file in the data disk, and whether the stored file is already in the data disk is determined according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file, so that whether the stored file is in the data disk is determined, and the storage efficiency of the same file in the data disk is improved.
In one embodiment, the determining whether the stored file is already in the data disk according to whether the unique identifier corresponding to the file stored in the data disk is the same as the unique identifier corresponding to the stored file includes:
if the unique identification which is the same as the unique identification corresponding to the stored file exists in the unique identification corresponding to the stored file in the data disc, judging that the stored file is in the data disc;
and if the unique identifier corresponding to the stored file does not exist in the unique identifiers corresponding to the stored files in the data disk, judging that the stored file is not in the data disk.
Specifically, when judging whether the stored file is in the data disc, when the unique identifier corresponding to the stored file exists in the unique identifier corresponding to the stored file in the data disc, the stored file is judged to be in the data disc, and when the unique identifier corresponding to the stored file does not exist in the unique identifier corresponding to the stored file in the data disc, the stored file is judged not to be in the data disc.
In this embodiment, when the unique identifier corresponding to the stored file in the data disk has the unique identifier that is the same as the unique identifier corresponding to the stored file, it is determined that the stored file is already in the data disk; when the unique identification corresponding to the stored file in the data disk does not have the unique identification which is the same as the unique identification corresponding to the stored file, the stored file is judged not to be in the data disk, the judgment of whether the stored file in the data disk contains the stored file is realized, and a precondition is created for further improving the storage efficiency of the data disk.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a virtual cloud desktop storage sharing apparatus, including: a storage construction module 501, an identification generation module 502 and a storage module 503, wherein:
the storage construction module 501 is configured to construct a storage resource pool based on a storage array, and set a file storage layer in the storage resource pool to perform unified management on a data disk of a virtual cloud desktop;
the identification generation module 502 is configured to, when a user of the virtual cloud desktop stores a file, generate a unique identification corresponding to the stored file based on the content of the stored file, and determine whether the stored file is already in the data disk according to the unique identification corresponding to the stored file;
and the storage module 503 is configured to establish a mapping relationship between the stored file in the data disc and the stored file in the file storage layer based on the determination result.
In one embodiment, the storage module 503 further includes: the first storage module is used for recording the file information and the storage position of the stored file into a file table of the data disc when the stored file is not in the data disc, and establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer; and the second storage module is used for directly establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer when the stored files are in the data disc.
In one embodiment, the virtual cloud desktop storage sharing apparatus further includes: the deleting module is used for deleting the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer when the user of the virtual cloud desktop deletes the file; and when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc.
In the embodiment, when a user of the virtual cloud desktop deletes a file, the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is only deleted, when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, the file to be deleted in the data disc is deleted, only one necessary backup is reserved on shared storage for the files with the same content, a plurality of users read the same file, space occupation is reduced, the mapping relation between the file to be deleted and the file in the file storage layer of the user is only deleted when the file is deleted, and the use efficiency of the cloud desktop data disc is improved.
In one embodiment, the virtual cloud desktop storage sharing apparatus further includes: the modification module is used for deleting the mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer when a user of the virtual cloud desktop modifies the file; and modifying the file to be modified to generate a modified file, and establishing a mapping relation between the modified file in the data disc and the modified file in the file storage layer.
In the embodiment, when a user of the virtual cloud desktop modifies a file, the mapping relationship between the file to be modified in the data disc and the file to be modified in the file storage layer is deleted, the file to be modified is modified to generate a modified file, and the mapping relationship between the modified file in the data disc and the modified file in the file storage layer is established, so that the modification of the file stored by the user is realized, and the use efficiency of the cloud desktop data disc is improved.
In one embodiment, the storage construction module 501 is specifically configured to: setting a file storage layer in the storage resource pool, and realizing a storage interface between the storage resource pool and a data disc of a virtual cloud desktop based on the file storage layer; distributing corresponding storage limits for different virtual cloud desktop users in the file storage layer, wherein the upper limit of the storage limits is the maximum capacity of the data disk.
In the embodiment, the file storage layer is arranged in the storage resource pool, the storage interface of the storage resource pool and the data disc of the virtual cloud desktop is realized based on the file storage layer, the corresponding storage limit is distributed to different virtual cloud desktop users in the file storage layer, the upper limit of the storage limit is the maximum capacity of the data disc, the storage of the same file by different users is realized only once, and the repeated storage efficiency of the same resource is improved.
In an embodiment, the identifier generating module 502 is specifically configured to: comparing the unique identification corresponding to the stored file with the unique identification corresponding to the stored file in the data disc; and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
In this embodiment, the unique identifier corresponding to the stored file is compared with the unique identifier corresponding to the stored file in the data disk, and whether the stored file is already in the data disk is determined according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file, so that whether the stored file is in the data disk is determined, and the storage efficiency of the same file in the data disk is improved.
In an embodiment, the identifier generating module 502 is specifically configured to: if the unique identification which is the same as the unique identification corresponding to the stored file exists in the unique identification corresponding to the stored file in the data disc, judging that the stored file is in the data disc; and if the unique identifier corresponding to the stored file does not exist in the unique identifiers corresponding to the stored files in the data disk, judging that the stored file is not in the data disk.
In this embodiment, when the unique identifier corresponding to the stored file in the data disk has the unique identifier that is the same as the unique identifier corresponding to the stored file, it is determined that the stored file is already in the data disk; when the unique identification corresponding to the stored file in the data disk does not have the unique identification which is the same as the unique identification corresponding to the stored file, the stored file is judged not to be in the data disk, the judgment of whether the stored file in the data disk contains the stored file is realized, and a precondition is created for further improving the storage efficiency of the data disk.
The virtual cloud desktop storage and sharing device comprises a storage resource pool constructed based on a storage array, a file storage layer arranged in the storage resource pool for carrying out unified management on a data disc of the virtual cloud desktop, a unique identifier corresponding to a stored file generated based on the content of the stored file when a user of the virtual cloud desktop stores the file, whether the stored file is in the data disc or not is judged according to the unique identifier corresponding to the stored file, when the stored file is not in the data disc, the file information and the storage position of the stored file are recorded in a file table of the data disc, a mapping relation is established between the stored file in the data disc and the stored file in the file storage layer, when the stored file is in the data disc, the mapping relation is directly established between the stored file in the data disc and the stored file in the file storage layer, and the same file is only stored once, the service efficiency of the cloud desktop data disk is improved.
For specific limitations of the virtual cloud desktop storage sharing apparatus, reference may be made to the above limitations of the virtual cloud desktop storage sharing method, which is not described herein again. The modules in the virtual cloud desktop storage sharing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a virtual cloud desktop storage sharing method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on a data disk of the virtual cloud desktop;
when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk or not according to the unique identifier corresponding to the stored file;
and establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer based on the judgment result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the stored file is not in the data disc, recording the file information and the storage position of the stored file into a file table of the data disc, and establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer; and if the stored file is in the data disc, directly establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when a user of the virtual cloud desktop deletes a file, deleting a mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer; and when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when a user of the virtual cloud desktop modifies a file, deleting a mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer; and modifying the file to be modified to generate a modified file, and establishing a mapping relation between the modified file in the data disc and the modified file in the file storage layer.
In one embodiment, the processor, when executing the computer program, further performs the steps of: setting a file storage layer in the storage resource pool, and realizing a storage interface between the storage resource pool and a data disc of a virtual cloud desktop based on the file storage layer; distributing corresponding storage limits for different virtual cloud desktop users in the file storage layer, wherein the upper limit of the storage limits is the maximum capacity of the data disk.
In one embodiment, the processor, when executing the computer program, further performs the steps of: comparing the unique identification corresponding to the stored file with the unique identification corresponding to the stored file in the data disc; and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the unique identification which is the same as the unique identification corresponding to the stored file exists in the unique identification corresponding to the stored file in the data disc, judging that the stored file is in the data disc; and if the unique identifier corresponding to the stored file does not exist in the unique identifiers corresponding to the stored files in the data disk, judging that the stored file is not in the data disk.
The computer equipment constructs a storage resource pool based on the storage array, sets a file storage layer in the storage resource pool to uniformly manage the data disks of the virtual cloud desktop, when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, judging whether the stored file is in the data disc or not according to the unique identification corresponding to the stored file, recording the file information and the storage position of the stored file into a file table of the data disc when the stored file is not in the data disc, meanwhile, the stored files in the data disc are mapped with the stored files in the file storage layer, when the stored file is in the data disc, the mapping relation is directly established between the stored file in the data disc and the stored file in the file storage layer, the same file is stored only once, and the use efficiency of the cloud desktop data disc is improved.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on a data disk of the virtual cloud desktop;
when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk or not according to the unique identifier corresponding to the stored file;
and establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer based on the judgment result.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the stored file is not in the data disc, recording the file information and the storage position of the stored file into a file table of the data disc, and establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer; and if the stored file is in the data disc, directly establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer.
In one embodiment, the computer program when executed by the processor further performs the steps of: when a user of the virtual cloud desktop deletes a file, deleting a mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer; and when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc.
In one embodiment, the computer program when executed by the processor further performs the steps of: when a user of the virtual cloud desktop modifies a file, deleting a mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer; and modifying the file to be modified to generate a modified file, and establishing a mapping relation between the modified file in the data disc and the modified file in the file storage layer.
In one embodiment, the computer program when executed by the processor further performs the steps of: setting a file storage layer in the storage resource pool, and realizing a storage interface between the storage resource pool and a data disc of a virtual cloud desktop based on the file storage layer; distributing corresponding storage limits for different virtual cloud desktop users in the file storage layer, wherein the upper limit of the storage limits is the maximum capacity of the data disk.
In one embodiment, the computer program when executed by the processor further performs the steps of: comparing the unique identification corresponding to the stored file with the unique identification corresponding to the stored file in the data disc; and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the unique identification which is the same as the unique identification corresponding to the stored file exists in the unique identification corresponding to the stored file in the data disc, judging that the stored file is in the data disc; and if the unique identifier corresponding to the stored file does not exist in the unique identifiers corresponding to the stored files in the data disk, judging that the stored file is not in the data disk.
The storage medium constructs a storage resource pool based on the storage array, sets a file storage layer in the storage resource pool to uniformly manage the data disk of the virtual cloud desktop, when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, judging whether the stored file is in the data disc or not according to the unique identification corresponding to the stored file, recording the file information and the storage position of the stored file into a file table of the data disc when the stored file is not in the data disc, meanwhile, the stored files in the data disc are mapped with the stored files in the file storage layer, when the stored file is in the data disc, the mapping relation is directly established between the stored file in the data disc and the stored file in the file storage layer, the same file is stored only once, and the use efficiency of the cloud desktop data disc is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A virtual cloud desktop storage sharing method, the method comprising:
constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on a data disk of the virtual cloud desktop;
when a user of the virtual cloud desktop stores a file, generating a unique identifier corresponding to the stored file based on the content of the stored file, and judging whether the stored file is in the data disk or not according to the unique identifier corresponding to the stored file;
and establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer based on the judgment result.
2. The method of claim 1, wherein mapping the stored files in the data disk to the stored files of the file storage layer based on the determination comprises:
if the stored file is not in the data disc, recording the file information and the storage position of the stored file into a file table of the data disc, and establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer;
and if the stored file is in the data disc, directly establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer.
3. The method of claim 1, wherein the virtual cloud desktop storage sharing method further comprises:
when a user of the virtual cloud desktop deletes a file, deleting a mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer;
and when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc.
4. The method of claim 3, wherein the virtual cloud desktop storage sharing method further comprises:
when a user of the virtual cloud desktop modifies a file, deleting a mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer;
and modifying the file to be modified to generate a modified file, and establishing a mapping relation between the modified file in the data disc and the modified file in the file storage layer.
5. The method according to claim 1, wherein the step of setting a file storage layer in the storage resource pool to perform unified management on the data disks of the virtual cloud desktop comprises:
setting a file storage layer in the storage resource pool, and realizing a storage interface between the storage resource pool and a data disc of a virtual cloud desktop based on the file storage layer;
distributing corresponding storage limits for different virtual cloud desktop users in the file storage layer, wherein the upper limit of the storage limits is the maximum capacity of the data disk.
6. The method of claim 1, wherein the determining whether the stored file is already in the data disk according to the unique identifier corresponding to the stored file comprises:
comparing the unique identification corresponding to the stored file with the unique identification corresponding to the stored file in the data disc;
and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
7. The method of claim 6, wherein the determining whether the stored file is already in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file comprises:
if the unique identification which is the same as the unique identification corresponding to the stored file exists in the unique identification corresponding to the stored file in the data disc, judging that the stored file is in the data disc;
and if the unique identifier corresponding to the stored file does not exist in the unique identifiers corresponding to the stored files in the data disk, judging that the stored file is not in the data disk.
8. A virtual cloud desktop storage sharing apparatus, the apparatus comprising:
the storage construction module is used for constructing a storage resource pool based on a storage array, and setting a file storage layer in the storage resource pool to perform unified management on the data disk of the virtual cloud desktop;
the identification generation module is used for generating a unique identification corresponding to the stored file based on the content of the stored file when the user of the virtual cloud desktop stores the file, and judging whether the stored file is in the data disk according to the unique identification corresponding to the stored file;
and the storage module is used for establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer based on the judgment result.
9. The apparatus of claim 8, wherein the storage module comprises:
the first storage module is used for recording the file information and the storage position of the stored file into a file table of the data disc when the stored file is not in the data disc, and establishing a mapping relation between the stored file in the data disc and the stored file in the file storage layer;
and the second storage module is used for directly establishing a mapping relation between the stored files in the data disc and the stored files in the file storage layer when the stored files are in the data disc.
10. The apparatus of claim 8, wherein the virtual cloud desktop storage sharing apparatus further comprises:
the deleting module is used for deleting the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer when the user of the virtual cloud desktop deletes the file; and when the number of the mapping relation between the file to be deleted in the data disc and the file to be deleted in the file storage layer is zero, deleting the file to be deleted in the data disc.
11. The apparatus of claim 9, wherein the virtual cloud desktop storage sharing apparatus further comprises:
the modification module is used for deleting the mapping relation between the file to be modified in the data disc and the file to be modified in the file storage layer when a user of the virtual cloud desktop modifies the file; and modifying the file to be modified to generate a modified file, and establishing a mapping relation between the modified file in the data disc and the modified file in the file storage layer.
12. The apparatus of claim 8, wherein the storage construction module is specifically configured to:
setting a file storage layer in the storage resource pool, and realizing a storage interface between the storage resource pool and a data disc of a virtual cloud desktop based on the file storage layer;
distributing corresponding storage limits for different virtual cloud desktop users in the file storage layer, wherein the upper limit of the storage limits is the maximum capacity of the data disk.
13. The apparatus of claim 8, wherein the identifier generation module is specifically configured to:
comparing the unique identification corresponding to the stored file with the unique identification corresponding to the stored file in the data disc;
and judging whether the stored file is in the data disk according to whether the unique identifier corresponding to the stored file in the data disk is the same as the unique identifier corresponding to the stored file.
14. The apparatus of claim 12, wherein the identifier generation module is specifically configured to:
if the unique identification which is the same as the unique identification corresponding to the stored file exists in the unique identification corresponding to the stored file in the data disc, judging that the stored file is in the data disc;
and if the unique identifier corresponding to the stored file does not exist in the unique identifiers corresponding to the stored files in the data disk, judging that the stored file is not in the data disk.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111402285.8A 2021-11-19 2021-11-19 Virtual cloud desktop storage sharing method and device, computer equipment and storage medium Pending CN114238253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111402285.8A CN114238253A (en) 2021-11-19 2021-11-19 Virtual cloud desktop storage sharing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111402285.8A CN114238253A (en) 2021-11-19 2021-11-19 Virtual cloud desktop storage sharing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114238253A true CN114238253A (en) 2022-03-25

Family

ID=80750778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111402285.8A Pending CN114238253A (en) 2021-11-19 2021-11-19 Virtual cloud desktop storage sharing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114238253A (en)

Similar Documents

Publication Publication Date Title
JP5932043B2 (en) Volatile memory representation of non-volatile storage set
CN110663019B (en) File system for Shingled Magnetic Recording (SMR)
WO2017107414A1 (en) File operation method and device
US10356150B1 (en) Automated repartitioning of streaming data
US20160364407A1 (en) Method and Device for Responding to Request, and Distributed File System
CN112532632B (en) Resource allocation method and device for multi-level cloud platform and computer equipment
CN111506269B (en) Disk storage space allocation method, device, equipment and storage medium
CN107423301B (en) Data processing method, related equipment and storage system
CN113806300B (en) Data storage method, system, device, equipment and storage medium
CN112825042A (en) Resource management method and device, electronic equipment and storage medium
CN111338779B (en) Resource allocation method, device, computer equipment and storage medium
US20210374583A1 (en) Qubit allocation service
CN115470156A (en) RDMA-based memory use method, system, electronic device and storage medium
CN110781159B (en) Ceph directory file information reading method and device, server and storage medium
CN108132759B (en) Method and device for managing data in file system
CN107329798B (en) Data replication method and device and virtualization system
CN111385294B (en) Data processing method, system, computer device and storage medium
CN116578410A (en) Resource management method, device, computer equipment and storage medium
CN109558082B (en) Distributed file system
CN111399999A (en) Computer resource processing method and device, readable storage medium and computer equipment
CN114238253A (en) Virtual cloud desktop storage sharing method and device, computer equipment and storage medium
CN115562871A (en) Memory allocation management method and device
CN111475279B (en) System and method for intelligent data load balancing for backup
CN108848136B (en) Shared storage method of cloud service cluster
CN113311995B (en) Cloud hard disk preparation method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination