CN108959573B - Desktop cloud based data migration method and device, electronic equipment and storage medium - Google Patents

Desktop cloud based data migration method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN108959573B
CN108959573B CN201810732780.7A CN201810732780A CN108959573B CN 108959573 B CN108959573 B CN 108959573B CN 201810732780 A CN201810732780 A CN 201810732780A CN 108959573 B CN108959573 B CN 108959573B
Authority
CN
China
Prior art keywords
user
network path
data
folder
weight
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.)
Active
Application number
CN201810732780.7A
Other languages
Chinese (zh)
Other versions
CN108959573A (en
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.)
BOE Technology Group Co Ltd
Hefei BOE Optoelectronics Technology Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Hefei BOE Optoelectronics Technology Co Ltd
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 BOE Technology Group Co Ltd, Hefei BOE Optoelectronics Technology Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN201810732780.7A priority Critical patent/CN108959573B/en
Publication of CN108959573A publication Critical patent/CN108959573A/en
Application granted granted Critical
Publication of CN108959573B publication Critical patent/CN108959573B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a desktop cloud-based data migration method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: searching data to be migrated in a file system under each network path according to the user information; respectively mounting the source folder and the target folder of the data to be migrated to a virtual machine; and copying the data to be migrated in the source folder into a target folder. The invention combines the random algorithm and the empirical value of the hash function, namely, the network paths are sequenced through the random algorithm in the initial state, as the searching times are increased, the weight is calculated for each network path in the existing production environment according to the probability of the user data successfully hit in the past, the network paths are sequenced according to the weight, and the network paths with higher weight are automatically searched, thereby improving the hit rate of user files, rapidly positioning data and reducing the waiting time of the searching algorithm.

Description

Desktop cloud based data migration method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a desktop cloud based data migration method and apparatus, an electronic device, and a storage medium.
Background
Cloud computing (Cloud computing) is a new resource utilization method based on the Internet, a virtualization technology is adopted in a Cloud computing bottom layer, resources are dynamic and easy to expand, and computing can be performed on demand for users by relying on heterogeneous and autonomous services on the Internet. Desktop Cloud (Desktop Cloud Service) is an application of Cloud computing, and a user accesses a virtual Desktop of the user through a Desktop Cloud terminal, that is, "cross-platform application programs can be accessed through a thin client or any other device connected to a network, and the whole client Desktop" is accessed. At present, the desktop cloud technology is widely applied to many enterprises, the technology is mature, the energy consumption problem of a traditional PC (Personal Computer) is reduced, the operation and maintenance cost of IT (information technology) personnel is also reduced, and the information safety is ensured.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
this is often encountered during desktop cloud use and expansion: when a traditional PC is transferred to a desktop cloud or desktop cloud storage is subject to update or capacity expansion, a large amount of user data needs to be migrated, and storage of the same brand often provides some convenient copying methods, such as File Replication (File Replication) of HDS storage, so that the user data can be quickly copied with authority, the user data does not need to be opened, and no risk of data leakage exists. However, for heterogeneous storage data, there is no convenient way to complete migration of user data.
Disclosure of Invention
In view of this, the present invention provides a desktop cloud-based data migration method, an apparatus, an electronic device, and a storage medium, so as to solve the problem that heterogeneous storage data cannot be conveniently migrated.
According to a first aspect of the present invention, there is provided a desktop cloud-based data migration method, including:
searching data to be migrated in a file system under each network path according to the user information;
respectively mounting the source folder and the target folder of the data to be migrated to a virtual machine logged by the user;
and copying the data to be migrated in the source folder into a target folder.
In some embodiments of the present invention, searching for data to be migrated in each file system according to user information includes:
determining a user identifier according to user information of a current user logging in the virtual machine;
and searching files matched with the user identification in the file system under each network path according to the user identification, and determining the files as the data to be migrated.
In some embodiments of the present invention, searching for a file matching the user identifier in a file system under each network path according to the user identifier includes:
Acquiring the weight of a user set corresponding to the user identification in each network path;
determining the priority of each network path according to the sequence of the weight values of the user set corresponding to the user identification in each network path from large to small;
and sequentially scanning the file systems under the network paths in sequence based on the priority of each network path so as to search the files matched with the user identification.
In some embodiments of the present invention, determining the priority of each network path according to the order from large to small of the weight of the user set corresponding to the user identifier in each network path includes:
for the weight value which is not zero, determining the priority of each network path according to the sequence that the weight value of the user set corresponding to the user identification in each network path is from large to small;
and for the weight value of zero, determining the priority of each network path by adopting a random algorithm of a hash function.
In some embodiments of the present invention, the weight of the user set corresponding to the user identifier in each network path is calculated by the following method:
for each network path, the weight of the user set corresponding to the user identifier in the network path is equal to the number of users found in the file system under the network path and belonging to the user set divided by the total number of users stored in the file system under the network path.
In some embodiments of the present invention, respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged in by the user, includes:
and respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged by the user in a network mapping mode, and naming the source folder and the target folder by using the designated disk symbols respectively.
In some embodiments of the present invention, copying the data to be migrated in the source folder into the destination folder includes:
compiling a script through an automatic copying command of an operating system installed on the virtual machine, and automatically copying the data to be migrated in the source folder into a target folder;
disconnecting the mounting of the source folder and the target folder on the virtual machine;
and restarting the virtual machine.
According to a second aspect of the present invention, there is provided a desktop cloud-based data migration apparatus, including:
the searching module is configured to search the data to be migrated in the file system under each network path according to the user information;
the mounting module is configured to mount a source folder and a target folder of data to be migrated to the virtual machine respectively;
And the copying module is configured to copy the data to be migrated in the source folder into the target folder.
In some embodiments of the invention, the lookup module is configured to:
determining a user identifier according to user information of a current user logging in the virtual machine;
and searching files matched with the user identification in the file system under each network path according to the user identification, and determining the files as the data to be migrated.
In some embodiments of the invention, the lookup module is further configured to:
acquiring the weight of a user set corresponding to the user identification in each network path;
determining the priority of each network path according to the sequence of the weight values of the user set corresponding to the user identification in each network path from large to small;
and sequentially scanning the file systems under the network paths in sequence based on the priority of each network path so as to search the files matched with the user identification.
In some embodiments of the invention, the lookup module is further configured to:
for the weight value which is not zero, determining the priority of each network path according to the sequence that the weight value of the user set corresponding to the user identification in each network path is from large to small;
And for the weight value of zero, determining the priority of each network path by adopting a random algorithm of a hash function.
In some embodiments of the present invention, the weight of the user set corresponding to the user identifier in each network path is calculated by the following method:
for each network path, the weight of the user set corresponding to the user identifier in the network path is equal to the number of users found in the file system under the network path and belonging to the user set divided by the total number of users stored in the file system under the network path.
In some embodiments of the invention, the mounting module is configured to:
and respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged by the user in a network mapping mode, and naming the source folder and the target folder by using a specified disk character.
In some embodiments of the invention, the copy module is configured to:
compiling a script through an automatic copying command of an operating system installed on the virtual machine, and automatically copying the data to be migrated in the source folder into a target folder;
disconnecting the mounting of the source folder and the target folder on the virtual machine;
And restarting the virtual machine.
According to a third aspect of the present invention, there is provided an electronic device, including a processor and a memory, where the memory is used to store computer instructions, and the computer instructions, when executed by the processor, perform the desktop cloud-based data migration method described in any of the above embodiments.
According to a fourth aspect of the present invention, there is provided a storage medium storing computer instructions adapted to be executed by a processor, the computer instructions being executed by the processor to perform the desktop cloud based data migration method according to any of the above embodiments.
The embodiment of the invention combines the random algorithm and the empirical value of the hash function, namely, the network paths are sequenced through the random algorithm in the initial state, as the searching times are increased, the weight is calculated according to the probability of the user data successfully hit in the past, the network paths in the existing production environment are sequenced according to the weight, and the network paths with higher weight are automatically searched, so that the hit rate of user files is improved, the data is quickly positioned, and the waiting time of the searching algorithm is reduced. In addition, the source folder and the target folder of the user data are mounted to the virtual machine in a network mounting mode, and automatic migration of the data is achieved through automatic copying, so that the safety of the user data is guaranteed, and the working efficiency of IT (information technology) workers is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow diagram of a desktop cloud based data migration method in one embodiment of the invention;
FIG. 2 is a diagram illustrating directory files at different levels according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a display interface when a folder is mounted on a virtual machine according to an embodiment of the present invention;
FIG. 4 is a flow chart of a desktop cloud based data migration method in accordance with yet another embodiment of the present invention;
FIG. 5 is a flowchart of a desktop cloud based data migration method according to another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a desktop cloud based data migration apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an electronic device for desktop cloud-based data migration according to another embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In an embodiment, as shown in fig. 1, an embodiment of the present invention provides a desktop cloud-based data migration method, where the method includes:
step 101, according to the user information, searching data to be migrated in the file system under each network path.
In the step, according to the user information of the user, files matched with the user information are respectively searched in the file systems under each network path, and therefore the data to be migrated are determined. Optionally, the user information includes a user identifier, and a file name of the data to be migrated is the user identifier, so that the matched data to be migrated is found through the user identifier. In some embodiments of the present invention, the user identifier may be a user job number, user data named by the user job number is stored in a file system under each network path, and the user data matched with the user job number is to-be-migrated data. In some embodiments of the present invention, the user identifier may be a user name, user data named by the user name is stored in the file system in each network path, and the user data matched with the user name is to-be-migrated data. The user identifier is not limited to the user job number and the user name, but the file name of the user data is the same as the user identifier, so that the data to be migrated matched with the user can be conveniently searched.
Fig. 2 is a schematic diagram of directory files at different levels according to an embodiment of the present invention. Taking the network path 10.60.121.115 as an example, in the file system under the network path, subfolders such as AppData, Desktop, and UserData are stored under the root folder NAS4oadate01, subfolders such as Documents, Favorites, HomeData, and Links are also stored under the subfolders UserData, and further, a plurality of folders named by user job numbers are also stored under the subfolders HomeData, for example: folder 00000001, folder 00000007, folder 00000020, etc. Each folder named by the user job number stores user data related to the user job number.
It should be noted that the present invention is only an example of folders under the subfolder HomeData, and in practice, a plurality of folders named by user job numbers are also stored under the subfolders of AppData, Desktop, Documents, Favorites, Links, and the like. Therefore, different types of user data corresponding to each user are respectively stored in subfolders such as Appdata, Desktop, Documents, Favorites, Links, HomeData and the like.
As still another embodiment of the present invention, step 101 may specifically include: determining a user identifier according to user information of a current user logging in the virtual machine; and searching files matched with the user identification in the file systems under all network paths according to the user identification.
In this embodiment, the user identifier of the user may be determined by logging in the user information of the current user of the virtual machine, and then the folder named by the user identifier of the user is searched in the file system under each network path according to the user identifier of the user, so as to find the file, that is, the data to be migrated, matching with the user identifier of the user.
It should be noted that the user identifier may also be input by the user, which is not limited in this embodiment of the present invention.
In some embodiments of the present invention, searching for a file matching the user identifier in a file system under each network path according to the user identifier includes: firstly, acquiring the weight of a user set corresponding to the user identification on each network path; then, according to the sequence that the weight of the user set corresponding to the user identification on each network path is from large to small, determining the priority of each network path; and finally, sequentially scanning the file systems under each network path in sequence based on the priority of each network path so as to search the files matched with the user identification. Optionally, the user set corresponding to the user identifier may be an identifier segment to which the user identifier belongs, or may also be a department to which the user identifier belongs, the priority of each network path is determined according to the known identifier segment to which the user identifier belongs and the weight of the department in each network path, and the file systems under each network path are sequentially scanned, so as to search for user data matching with the user identifier, so as to improve the search hit rate.
In the desktop cloud production environment, the file system division of the initial user has certain rules, for example, the file system division is distributed according to the user work number segment: for example, the user data with the user work number 00000001-00000099 is stored in the file system under the network path 1, and the user data with the user work number 00000100-00000199 is stored in the file system under the network path 2. And for example, the distribution is carried out according to departments where users are located: for example, the user data sets of financial departments are stored in the file systems under the network path 1 and the network path 2, and the user data of personnel departments are mostly concentrated in the file systems under the network path 2 and the network path 3, so that the job number segments or the weights of different departments can be sequenced through the network paths, and then the user data is searched in sequence, so that the search hit rate of the user data is greatly improved.
Optionally, determining the priority of each network path according to a sequence that the weight of the user set corresponding to the user identifier in each network path is from large to small, includes: for the weight value which is not zero, determining the priority of each network path according to the sequence that the weight value of the user set corresponding to the user identification in each network path is from large to small; and for the weight value of zero, determining the priority of each network path by adopting a random algorithm of a hash function. It should be noted that the priority of a network path with a non-zero weight is higher than that of a network path with a zero weight.
In some embodiments of the present invention, the weight of the user set corresponding to the user identifier in each network path is calculated by the following method: for each network path, the weight of the user set corresponding to the user identifier in the network path is equal to the number of users found in the file system under the network path and belonging to the user set divided by the total number of users stored in the file system under the network path.
For example, when the algorithm is started, the weight of each network path in the user set is initialized to 0, and as the number of users in the user set is found to be more and more, the weight is calculated according to the hit rate of the found user data, and the weight of each network path dynamically changes.
In a desktop cloud production environment, a storage rule of user data is generally based on departments, so that the method provided by the embodiment of the invention is based on the probability that the user data searched in the past is successful, namely an empirical value (namely a weight) searched in the past, and the method is mainly based on that the user data of the desktop cloud is divided into file systems according to the departments. The searching process comprises the following steps: the user data is searched in the initialization environment by adopting a random algorithm, namely the user data is searched in the file system under each network path at random, but as the search success records are more and more, the weight value of each network path for the search success of each department is not 0 any more, the network paths can be sequenced according to the weight value, and then the files of the users are searched in sequence.
Such as:
Figure BDA0001721324740000081
for example, there are 4 network paths, each network path has 100 users, the number of users who have found the financial department under network path1 is 5, the number of users who have found the financial department under network path2 is 3, and the rest are 0, then Weight [ Netpath1, Finance ] ═ 5/100 ═ 0.05, Weight [ Netpath2, Finance ] ═ 3/100 ═ 0.03, and the rest are 0. Then, when the user data of the financial department is searched again, the search is performed in order of network path1 > network path 2. And for the network path with the weight value of 0, sorting the priority by a random algorithm of a hash function, and searching in sequence.
It should be noted that after the search is completed, the weight of the network path will change dynamically with each search result until all the user data under the network path is searched.
Since the user data of the financial department is concentrated in 1-2 file systems, and weights (empirical values) are introduced, the probability of hit of searching the user data is greatly improved. In the initialization state, since no experience value can be used for reference, a hash function (random algorithm) is used for searching user data in each file system, and the probability of direct hit is greater than that of a sequential searching method; in the searching process, Weight [ Netpath2, Finance ] is dynamically changed, for example, there are 100 users under network path2, when the searching does not completely cover the file system under the network path, the empirical calculation weights are all dynamically changed, when the number of users of the financial department searched is 10, Weight [ Netpath2, Finance ] is 10/100-0.1, and when the number of users of the financial department found under the file system is 20, Weight [ Netpath2, Finance ] is 20/100-0.2.
Since the users in each file system dynamically change (such as enter-job, leave-job, and transfer), the weights can only be searched and calculated by a dynamic method, and cannot be assigned by a value assignment method. The generally understood data search is based on indexes, the search is performed through index retrieval, and in a file system of a desktop cloud, the indexes are not established, even if the indexes are generated, the search is performed according to a sequential method, the advantage of dividing the file system of the desktop cloud storage according to user departments or job number segments is not fully utilized, and the search method is not the most suitable search method.
And 102, respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged by the user.
Specifically, in this step, the source folder and the target folder of the data to be migrated may be mounted on the virtual machine that the user logs in respectively in a network mapping manner, and the source folder and the target folder are named by the specified disk identifiers respectively. Optionally, the embodiment of the present invention automatically implements that the source folder and the target folder are mounted on the virtual machine with the specified disk identifier by using a vbs (microsoft Visual Basic Script edition) Script automatic mapping manner.
As shown in fig. 2, in the Desktop cloud, user data is mainly stored in subfolders such as AppData, Desktop, Documents, Favorites, Links, HomeData, and the like, and in the past, user data is copied by opening a source file location and then opening a destination file location one by one, which is very inefficient.
In a desktop cloud production environment, each user file is named by a job number, so that the condition that the user data copy position is disordered occasionally occurs in actual operation and maintenance, and the workload of IT operation and maintenance personnel is greatly increased. Therefore, the data migration method provided by the embodiment of the invention is to mount the user folders (Appdata, Desktop, Documents, Favorites, Links, and HomeData) to the virtual machine logged in by the user in a network mapping manner and by using fixed disk identifiers, thereby avoiding the complex operation of searching and opening the files one by one. As shown in FIG. 3, after the mount is completed, the source folders (OLD Appdata, OLD Desktop, OLD Documents, OLD Favorites, OLD Links, OLD homeData) and the target folders (NEW Appdata, NEW Desktop, NEW Favorites, NEW Links, NEW homeData) are visible under the user virtual machine directory, and the respective folders are named with the designated disk characters. It should be noted that the 12 drive letters shown in fig. 3 are merely exemplary, and the embodiment of the present invention does not limit the drive letters.
Step 103, copying the data to be migrated in the source folder into a target folder.
On the basis of step 102, copying the user data to be migrated stored in the source folder into a destination folder. It should be noted that the network path of the target folder may be configured in advance, so that the user data to be migrated in the source folder is copied to the file system under the new network path, and data migration is implemented.
As still another embodiment of the present invention, step 103 may specifically include: firstly, writing a script by using an automatic copy command of an operating system installed on the virtual machine, and automatically copying data to be migrated in the source folder into a target folder; then, disconnecting the mounting of the source folder and the target folder on the virtual machine; and finally, restarting the virtual machine. Optionally, the virtual machine may be installed with a Windows operating system, and may also be installed with Linux, which is not limited in this embodiment of the present invention. In some embodiments of the present invention, if the Windows operating system is installed on the virtual machine, the script may be written through an Xcopy copy command carried by the Windows operating system, so as to automatically copy the data to be migrated in the source folder into the target folder.
XCopy is a copy command carried by Microsoft, is a very practical script command, can automatically realize data copy between a source drive symbol and a target drive symbol, realizes empty folder copy by adding parameter/e,/d realizes incremental copy,/h realizes copy of hidden files and system files, and has simple use and convenient operation. Because the bottom layer of the storage is not a Windows operating system, when the prior art cannot realize data migration from the bottom layer of the heterogeneous storage, the embodiment of the invention realizes automatic copying of user data through an XCopy script from a user use level (namely a Windows operating system level).
Currently, in desktop cloud usage, mainstream storage brands include Netapp, HDS, EMC, HP 3Par, and the like, and for storage of the same brand, data copying can be performed by using a quick copy method provided by a manufacturer, but such a tool is not applicable to storage of different brands, which is mainly caused by different technical implementation manners of the storage brands. In the desktop cloud storage expansion project, a large amount of heterogeneous storage data migration is involved, namely the data migration from Netapp storage to HDS storage is realized, and no convenient method is provided for realizing the data copying from the perspective of bottom storage.
In the following, File Replication and traditional copy and paste stored in the HDS are taken as examples, and the advantages and disadvantages are compared with the data migration method provided by the embodiment of the present invention:
Figure BDA0001721324740000101
fig. 4 is a flowchart of a desktop cloud-based data migration method according to another embodiment of the present invention. In this embodiment, the desktop cloud-based data migration method may include the following steps:
step 401, according to user information, searching data to be migrated in a file system under each network path;
step 402, judging whether to find the data to be migrated which is matched with the user information; if yes, go to step 403; if not, go to step 405;
step 403, respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged in by the user;
step 404, copying the data to be migrated in the source folder into a target folder.
Step 405, prompting that the data to be migrated which is matched with the user information is not found.
It should be noted that step 401 is similar to step 101, step 403 is similar to step 102, and step 404 is similar to step 103, which are not repeated.
Therefore, the desktop cloud-based data migration method provided by the embodiment of the invention mounts the source folder and the target folder of the user data to the virtual machine in a network mounting manner, and realizes the automatic migration of the data through automatic copying, so that the safety of the user data is ensured, and the working efficiency of IT (information technology) workers is also improved. The method is mainly used for data migration after desktop cloud capacity expansion or user data migration when a traditional PC is converted into the desktop cloud.
Fig. 5 is a flowchart of a desktop cloud-based data migration method according to another embodiment of the present invention. In this embodiment, the desktop cloud-based data migration method may include the following steps:
step 501, initializing each network path and a weight value thereof;
step 502, reading user information of a current user logging in the virtual machine, and extracting a user identifier according to the user information;
step 503, determining whether the weights of the user sets corresponding to the user identifiers in each network path are all zero; if yes, go to step 505; if not, go to step 504;
step 504, sorting the priorities of the network paths according to the sequence that the weights of the user sets corresponding to the user identifications on the network paths are from large to small;
505, sorting the priority of each network path by adopting a random algorithm of a hash function;
step 506, scanning the file systems under each network path in sequence based on the priority of each network path;
step 507, whether user data matched with the user identification exists in each file system or not; if yes, go to step 508; if not, ending;
step 508, mount source folder and goal folder of the user's data on the virtual machine that the user logs in separately through the way of network mapping, and name source folder and goal folder separately with the designated drive letter;
Step 509, automatically copying the user data in the source folder into the destination folder through an Xcopy copy command;
step 510, disconnecting the mounting of the source folder and the target folder on the virtual machine;
and step 511, restarting the virtual machine.
It should be noted that if there is user data matching the user identifier in the file system under the network path, the weights of the network paths are recalculated, and these weights are used as experience values when the next user searches for the user data.
Therefore, the data migration method provided by the embodiment of the present invention combines the random algorithm and the empirical value of the hash function, that is, the network paths are sorted by the random algorithm in the initial state, and as the number of search times increases, the weight calculation is performed on each network path in the existing production environment according to the probability of the user data successfully hit in the past, and the network paths are sorted according to the weight, so that the network paths with higher weights are automatically searched, thereby improving the hit rate of the user files, quickly locating data, and reducing the waiting time of the search algorithm.
According to the above description, it can be seen that the embodiment of the present invention is a convenient migration method for solving heterogeneous storage involved in desktop cloud data migration, and the data migration can be completed by the operation of a user, which has the following beneficial effects:
1) Based on a random algorithm and an empirical value of a hash function, accurately positioning the user data in a plurality of file systems;
2) mounting a source folder and a target folder of user data to a virtual machine in a network mapping mode;
3) a simple copying method is provided to realize data copying of a source position and a destination position;
4) and the execution of the script can be automatically realized by clicking, and manual intervention is not needed.
In one embodiment, as shown in fig. 6, a desktop cloud-based data migration apparatus is provided, where the desktop cloud-based data migration apparatus 60 includes a search module 61, a mount module 62, and a copy module 63, where the search module 61 is configured to search for data to be migrated in a file system under each network path according to user information; the mounting module 62 is configured to mount a source folder and a target folder of data to be migrated onto the virtual machine respectively; the copying module 63 is configured to copy the data to be migrated in the source folder into the destination folder.
In some embodiments of the invention, the lookup module 61 is configured to:
determining a user identifier according to user information of a current user logging in the virtual machine;
And searching files matched with the user identification in the file systems under all network paths according to the user identification.
In some embodiments of the invention, the lookup module 61 is further configured to:
acquiring the weight of a user set corresponding to the user identification in each network path;
determining the priority of each network path according to the sequence of the weight values of the user set corresponding to the user identification in each network path from large to small;
and sequentially scanning the file systems under the network paths in sequence based on the priority of each network path so as to search the files matched with the user identification.
In some embodiments of the invention, the lookup module 61 is further configured to:
for the weight value which is not zero, determining the priority of each network path according to the sequence that the weight value of the user set corresponding to the user identification in each network path is from large to small;
and for the weight value of zero, determining the priority of each network path by adopting a random algorithm of a hash function.
In some embodiments of the present invention, the weight of the user set corresponding to the user identifier in each network path is calculated by the following method:
For each network path, the weight of the user set corresponding to the user identifier in the network path is equal to the number of users found in the file system under the network path and belonging to the user set divided by the total number of users stored in the file system under the network path.
In some embodiments of the invention, the mounting module 62 is configured to:
and respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged by the user in a network mapping mode, and naming the source folder and the target folder by using a specified disk character.
In some embodiments of the invention, the copy module 63 is configured to:
automatically copying the data to be migrated in the source folder into a target folder through an automatic copying command carried by an operating system installed on the virtual machine;
disconnecting the mounting of the source folder and the target folder on the virtual machine;
and restarting the virtual machine.
Therefore, the data migration device provided by the embodiment of the invention combines the random algorithm and the empirical value of the hash function, namely, the network paths are sequenced through the random algorithm in the initial state, as the number of searching times increases, the weight calculation is carried out on each network path in the existing production environment according to the probability of the user data successfully hit in the past, the network paths are sequenced according to the weight, and the network paths with higher weights are automatically searched, so that the hit rate of user files is improved, the data is quickly located, and the waiting time of the searching algorithm is reduced. Moreover, the device mounts the source folder and the target folder of the user data to the virtual machine in a network mounting mode, and realizes automatic migration of the data through automatic copying, so that the safety of the user data is ensured, and the working efficiency of IT (information technology) workers is improved.
It may be understood by those skilled in the art that the division of the modules and units in the desktop cloud based data migration apparatus is only used for illustration, and in other embodiments, the desktop cloud based data migration apparatus may be divided into different modules and units as needed to complete all or part of the functions of the desktop cloud based data migration apparatus.
There is also provided, in accordance with an embodiment of the present invention, an electronic device, as shown in fig. 7, comprising a processor 71 and a memory 72, the memory 72 being configured to store computer program instructions, the computer program instructions being adapted to be loaded by the processor and to perform the method of: searching data to be migrated in a file system under each network path according to the user information; respectively mounting the source folder and the target folder of the data to be migrated to a virtual machine logged by the user; and copying the data to be migrated in the source folder into a target folder.
The processor may be any suitable processor, for example, implemented in the form of a central processing unit, a microprocessor, an embedded processor, etc., and may adopt an architecture such as X76, ARM, etc.; the memory 72 may be any suitable memory device including, but not limited to, magnetic memory devices, semiconductor memory devices, optical memory devices, and the like, and is not limited by the embodiments of the invention.
Any reference to memory, storage, database or other media used by the invention may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
Furthermore, according to an embodiment of the present invention, the processor may further load and execute: determining a user identifier according to user information of a current user logging in the virtual machine; and searching files matched with the user identification in the file system under each network path according to the user identification, and determining the files as the data to be migrated.
Furthermore, according to an embodiment of the present invention, the processor may further load and execute: acquiring the weight of a user set corresponding to the user identification in each network path; determining the priority of each network path according to the sequence of the weight values of the user set corresponding to the user identification in each network path from large to small; and sequentially scanning the file systems under the network paths in sequence based on the priority of each network path so as to search the files matched with the user identification.
Furthermore, according to an embodiment of the present invention, the processor may further load and execute: for the weight value which is not zero, determining the priority of each network path according to the sequence that the weight value of the user set corresponding to the user identification in each network path is from large to small; and for the weight value of zero, determining the priority of each network path by adopting a random algorithm of a hash function.
Furthermore, according to an embodiment of the present invention, the processor may further load and execute: for each network path, the weight of the user set corresponding to the user identifier in the network path is equal to the number of users found in the file system under the network path and belonging to the user set divided by the total number of users stored in the file system under the network path.
Furthermore, according to an embodiment of the present invention, the processor may further load and execute: and respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged by the user in a network mapping mode, and naming the source folder and the target folder by using a specified disk character.
Furthermore, according to an embodiment of the present invention, the processor may further load and execute: compiling a script through an automatic copying command of an operating system installed on the virtual machine, and automatically copying the data to be migrated in the source folder into a target folder; disconnecting the mounting of the source folder and the target folder on the virtual machine; and restarting the virtual machine.
Therefore, the embodiment of the invention combines the random algorithm and the empirical value of the hash function, namely, the network paths are sequenced through the random algorithm in the initial state, as the number of searching times increases, the weight calculation is carried out on each network path in the existing production environment according to the probability of the user data successfully hit in the past, the network paths are sequenced according to the weight, and the network paths with higher weight are automatically searched, so that the hit rate of user files is improved, the data is quickly located, and the waiting time of the searching algorithm is reduced. In addition, the source folder and the target folder of the user data are mounted to the virtual machine in a network mounting mode, and automatic migration of the data is achieved through automatic copying, so that the safety of the user data is guaranteed, and the working efficiency of IT (information technology) workers is improved.
It should be noted that, for the sake of simplicity, the above-mentioned embodiments of the system, method and electronic device are all described as a series of acts or a combination of modules, but it should be understood by those skilled in the art that the present invention is not limited by the described sequence of acts or the connection of modules, because some steps may be performed in other sequences or simultaneously and some modules may be performed in other connection manners according to the present invention.
Those skilled in the art should also appreciate that the embodiments described in this specification are among other things described as such, and that the above-described embodiment numbers are merely for purposes of illustration, and that the acts and modules involved are not necessarily essential to the invention.
In the above embodiments of the present invention, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described in detail in a certain embodiment.
In the embodiments provided by the present invention, it should be understood that the disclosed technical contents can be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be implemented in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a volatile storage medium or a non-volatile storage medium, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and amendments can be made without departing from the principle of the present invention, and these modifications and amendments should also be considered as the protection scope of the present invention.

Claims (12)

1. A desktop cloud-based data migration method is characterized by comprising the following steps:
determining a user identifier according to user information of a current user logging in the virtual machine;
searching files matched with the user identification in the file systems under all network paths according to the user identification, and determining the files as the data to be migrated, wherein the method comprises the following steps:
acquiring the weight of a user set corresponding to the user identification in each network path;
determining the priority of each network path according to the sequence of the weight values of the user set corresponding to the user identification in each network path from large to small, wherein the determining comprises the following steps: the user set corresponding to the user identification comprises an identification segment or a department to which the user identification belongs, and the priority of each network path is determined through the known weight of the identification segment and the department to which the user identification belongs in each network path; when the file system which does not completely cover the network path is searched, the weight is calculated according to the hit rate of the searched user data along with the increase of the number of the searched users in the user set, and the weight of each network path is dynamically changed;
Based on the priority of each network path, sequentially scanning the file systems under each network path in order to search files matched with the user identification;
respectively mounting the source folder and the target folder of the data to be migrated to a virtual machine logged by the user;
and copying the data to be migrated in the source folder into a target folder.
2. The desktop cloud-based data migration method of claim 1, wherein determining the priority of each network path according to a descending order of the weight of the user set corresponding to the user identifier in each network path comprises:
for the weight value which is not zero, determining the priority of each network path according to the sequence that the weight value of the user set corresponding to the user identification in each network path is from large to small;
and for the weight value of zero, determining the priority of each network path by adopting a random algorithm of a hash function.
3. The desktop cloud-based data migration method of claim 1, wherein the weight of the user set corresponding to the user identifier in each network path is calculated by adopting the following method:
for each network path, the weight of the user set corresponding to the user identifier in the network path is equal to the number of users found in the file system under the network path and belonging to the user set divided by the total number of users stored in the file system under the network path.
4. The desktop cloud-based data migration method according to claim 1, wherein the step of mounting the source folder and the target folder of the data to be migrated to the virtual machine logged in by the user respectively comprises:
and respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged by the user in a network mapping mode, and naming the source folder and the target folder by using a specified disk character.
5. The desktop cloud-based data migration method according to claim 1, wherein copying the data to be migrated in the source folder into a destination folder comprises:
compiling a script through an automatic copying command of an operating system installed on the virtual machine, and automatically copying the data to be migrated in the source folder into a target folder;
disconnecting the mounting of the source folder and the target folder on the virtual machine;
and restarting the virtual machine.
6. A desktop cloud based data migration apparatus, comprising:
the searching module is configured to determine a user identifier according to user information of a current user logging in the virtual machine; searching files matched with the user identification in the file systems under all network paths according to the user identification, and determining the files as the data to be migrated, wherein the method comprises the following steps:
Acquiring the weight of a user set corresponding to the user identification in each network path;
determining the priority of each network path according to the sequence of the weight values of the user set corresponding to the user identification in each network path from large to small, wherein the determining comprises the following steps: the user set corresponding to the user identification comprises an identification segment or a department to which the user identification belongs, and the priority of each network path is determined through the known weight of the identification segment and the department to which the user identification belongs in each network path; when the file system which does not completely cover the network path is searched, the weight is calculated according to the hit rate of the searched user data along with the increase of the number of the searched users in the user set, and the weight of each network path is dynamically changed;
based on the priority of each network path, sequentially scanning the file systems under each network path in order to search files matched with the user identification;
the mounting module is configured to mount a source folder and a target folder of data to be migrated to the virtual machine logged in by the user respectively;
and the copying module is configured to copy the data to be migrated in the source folder into the target folder.
7. The desktop cloud based data migration apparatus of claim 6, wherein the lookup module is further configured to:
for the weight value which is not zero, determining the priority of each network path according to the sequence that the weight value of the user set corresponding to the user identification in each network path is from large to small;
and for the weight value of zero, determining the priority of each network path by adopting a random algorithm of a hash function.
8. The desktop cloud-based data migration device of claim 6, wherein the weight of the user set corresponding to the user identifier in each network path is calculated by adopting the following method:
for each network path, the weight of the network path of the user set corresponding to the user identifier is equal to the number of users found in the file system under the network path and belonging to the user set divided by the total number of users stored in the file system under the network path.
9. The desktop cloud based data migration apparatus of claim 6, wherein the mounting module is configured to:
and respectively mounting the source folder and the target folder of the data to be migrated to the virtual machine logged by the user in a network mapping mode, and naming the source folder and the target folder by using a specified disk character.
10. The desktop cloud based data migration apparatus of claim 6, wherein the copy module is configured to:
compiling a script through an automatic copying command of an operating system installed on the virtual machine, and automatically copying the data to be migrated in the source folder into a target folder;
disconnecting the mounting of the source folder and the target folder on the virtual machine;
and restarting the virtual machine.
11. An electronic device comprising a processor and a memory, the memory storing computer instructions, wherein the computer instructions, when executed by the processor, perform the desktop cloud based data migration method of any one of claims 1-5.
12. A storage medium storing computer instructions adapted to be executed by a processor, the computer instructions when executed by the processor performing the desktop cloud based data migration method of any of claims 1-5.
CN201810732780.7A 2018-07-05 2018-07-05 Desktop cloud based data migration method and device, electronic equipment and storage medium Active CN108959573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810732780.7A CN108959573B (en) 2018-07-05 2018-07-05 Desktop cloud based data migration method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810732780.7A CN108959573B (en) 2018-07-05 2018-07-05 Desktop cloud based data migration method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108959573A CN108959573A (en) 2018-12-07
CN108959573B true CN108959573B (en) 2022-07-15

Family

ID=64485942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810732780.7A Active CN108959573B (en) 2018-07-05 2018-07-05 Desktop cloud based data migration method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108959573B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597145B (en) * 2020-05-20 2024-01-23 上海英方软件股份有限公司 Method, device and system for migration of Windows operating system
CN112486628A (en) * 2020-11-20 2021-03-12 湖南麒麟信安科技股份有限公司 Virtual machine migration method between virtual private clouds
CN112579256B (en) * 2020-12-14 2022-04-19 上海英方软件股份有限公司 Linux migration method and device
CN113505099A (en) * 2021-05-11 2021-10-15 深圳软牛科技有限公司 File hiding method, device, equipment and storage medium of Windows system
US11635903B2 (en) * 2021-06-15 2023-04-25 International Business Machines Corporation Cloud data migration
CN114817969B (en) * 2022-06-30 2022-11-11 天津联想协同科技有限公司 Method, device, terminal and storage medium for previewing network disk drive letter file

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034621A (en) * 1999-07-19 2001-02-09 Hitachi Ltd Document classification management system
CN1517914A (en) * 2003-01-06 2004-08-04 Searching of structural file
CN101110074A (en) * 2007-01-30 2008-01-23 浪潮乐金信息系统有限公司 Data speedup query method based on file system caching

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7693906B1 (en) * 2006-08-22 2010-04-06 Qurio Holdings, Inc. Methods, systems, and products for tagging files
CN104750542B (en) * 2015-04-22 2018-01-16 成都睿峰科技有限公司 A kind of data migration method based on cloud platform
CN106874255A (en) * 2015-12-11 2017-06-20 北京国双科技有限公司 Method and device for rule matching
US9936019B2 (en) * 2016-03-16 2018-04-03 Google Llc Efficient live-migration of remotely accessed data
CN106021535A (en) * 2016-05-25 2016-10-12 宁波萨瑞通讯有限公司 File ordering method and mobile device
CN106293533A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of based on the load-balancing method between storage multipath and system
CN106844511A (en) * 2016-12-28 2017-06-13 广州联客信息科技有限公司 Syndication search method and system
CN107920024B (en) * 2017-10-11 2020-08-14 中国电子科技集团公司第三十研究所 SDN controller dynamic flow table management method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034621A (en) * 1999-07-19 2001-02-09 Hitachi Ltd Document classification management system
CN1517914A (en) * 2003-01-06 2004-08-04 Searching of structural file
CN101110074A (en) * 2007-01-30 2008-01-23 浪潮乐金信息系统有限公司 Data speedup query method based on file system caching

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Efficient focused crawling based on best first search;Sunita Rawat etc.;《2013 3rd IEEE International Advance Computing Conference (IACC)》;20130513;第908-911页 *
基于最佳路径搜索的二进制协议格式关键词边界确定方法;闫小勇 等;《计算机应用》;20180630;第1726-1731页 *

Also Published As

Publication number Publication date
CN108959573A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN108959573B (en) Desktop cloud based data migration method and device, electronic equipment and storage medium
US11727288B2 (en) Database-management system with artificially intelligent virtual database administration
US8458232B1 (en) Systems and methods for identifying data files based on community data
JP5437238B2 (en) Ways to access resources
US11055265B2 (en) Scale out chunk store to multiple nodes to allow concurrent deduplication
US11308066B1 (en) Optimized database partitioning
US11100047B2 (en) Method, device and computer program product for deleting snapshots
US11048738B2 (en) Records search and management in compliance platforms
US11487727B2 (en) Resolving versions in an append-only large-scale data store in distributed data management systems
WO2022079529A1 (en) Learning-based workload resource optimization for database management systems
US9971789B2 (en) Selective disk volume cloning for virtual disk creation
CN110058923A (en) It is a kind of based on dynamically prefetch strategy Docker container COW mechanism optimization method and system
US20210303406A1 (en) Highly efficient native application data protection for office 365
US20230139297A1 (en) File lifetime tracking for cloud-based object stores
Eugster et al. Big data analytics beyond the single datacenter
US20210132812A1 (en) Parallel upgrade of nodes in a storage system
US11461180B2 (en) Optimized document backup to cloud-based object store
US11301417B1 (en) Stub file selection and migration
US10908888B2 (en) Enhanceable cross-domain rules engine for unmatched registry entries filtering
US20150363483A1 (en) Populating text indexes
US20150293763A1 (en) Dynamic and intelligent multi-triggered item revalidation based on projected return on investment
US8015207B2 (en) Method and apparatus for unstructured data mining and distributed processing
US20220092049A1 (en) Workload-driven database reorganization
US20140059538A1 (en) Virtual machine state tracking using object based storage
US11940880B2 (en) Folder scan system and method for incremental backup

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
GR01 Patent grant
GR01 Patent grant