Data migration method and device
By automatically filtering and migrating file groups between storage devices, the problem of low data migration efficiency in the prior art is solved, the balance of file storage volume between storage devices is achieved, and data migration efficiency is improved.
Patent Information
- Application Number
- CN202111664249.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-12-31
AI Technical Summary
Existing data migration methods require users to manually select migration files, which cannot be automated, resulting in inefficient data migration.
By querying the file storage volume of multiple storage devices, determine devices with more and less storage volumes, and group files evenly based on the unique identification information of the file, automatically filter out the migration file groups, and migrate them to the corresponding storage device , so that the file storage amount of each storage device is approximately the same.
Automatically selecting migrated files is realized, which improves data migration processing efficiency, ensures that the file storage volume of multiple storage devices is balanced, and reduces the need for precise selection of each file size.
Smart Images

Figure CN114489490B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data migration, and in particular to a data migration method and device. Background Art
[0002] In the field of data migration, when the storage space of an existing storage device is insufficient, a new storage device needs to be added for storage. In order to increase the data storage speed, data needs to be migrated from the device with insufficient storage space to the new storage device so that the storage capacity of each storage device is close to achieve data balance. Existing data migration methods require users to manually select migration files, and cannot achieve automatic selection and migration of data. Summary of the invention
[0003] The present application provides a data migration method and device, which can automatically select migration files.
[0004] To achieve the above object, the present application provides a data migration method, which includes:
[0005] Query the file storage capacity of multiple storage devices;
[0006] Determine at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the plurality of storage devices;
[0007] At least one migration file group is selected from all file groups of each first storage device, wherein the file groups in the first storage device are obtained by uniformly grouping files in the first storage device based on unique identification information of the files, and the unique identification information of the files is generated by encoding initial identification information of the files;
[0008] At least one migration file group of each first storage device is migrated to the corresponding second storage device, so that the file storage capacity of each first storage device and its corresponding second storage device is substantially the same.
[0009] The step of selecting at least one migration file group from all file groups of each first storage device includes:
[0010] grouping all files of each first storage device based on the unique identification information;
[0011] Filtering at least one migration file group from all file groups of each first storage device;
[0012] Among them, the number of migration file groups of each first storage device is the integer closest to the preset value of each first storage device, the preset value is equal to the first product divided by twice the total storage capacity of each first storage device, and the first product is equal to the product of the difference between the file storage capacity of each first storage device and its corresponding second storage device and the total number of file groups in each first storage device.
[0013] The unique identification information of the file is generated by binarizing the initial identification information of the file.
[0014] The step of grouping all files of each first storage device based on the unique identification information includes:
[0015] All files of each first storage device are grouped based on the last preset digit of the unique identification information of the file.
[0016] The step of determining at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the multiple storage devices includes:
[0017] Determine a first storage device with the largest storage capacity and a second storage device with the smallest storage capacity among the plurality of storage devices, and determine an average storage capacity of the storage devices;
[0018] When the difference between the storage capacity of the first storage device and the average storage capacity is greater than a first threshold, and / or the difference between the average storage capacity and the storage capacity of the second storage device is greater than the first threshold, a step of filtering out at least one migration file group from all file groups of each first storage device is performed.
[0019] The step of migrating at least one migration file group of each first storage device to the corresponding second storage device includes:
[0020] Return to the step of determining at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among multiple storage devices, until the difference between the storage capacity of the first storage device and the average storage capacity is less than a first threshold, and the difference between the average storage capacity and the storage capacity of the second storage device is less than the first threshold.
[0021] The first file whose file size is smaller than the second threshold and its unique identification information are stored together in the database of the storage device to which it belongs.
[0022] The second file whose file size is greater than the second threshold is stored in the memory of the storage device to which it belongs;
[0023] The step of determining at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the plurality of storage devices comprises:
[0024] Determine at least one first storage device having a larger storage capacity of the first file and at least one second storage device having a smaller storage capacity of the first file among the plurality of storage devices;
[0025] Determine at least one first storage device having a larger storage capacity of the second file and at least one second storage device having a smaller storage capacity of the second file among the plurality of storage devices;
[0026] Execute the steps of filtering out at least one migration file group from all file groups of each first storage device; migrating at least one migration file group of each first storage device to the corresponding second storage device, so as to migrate at least one migration file group in the first storage device of the first file to the second storage device of the first file, and migrate at least one migration file group in the first storage device of the second file to the second storage device of the second file.
[0027] The step of determining at least one first storage device with a larger first file storage capacity and at least one second storage device with a smaller first file storage capacity among multiple storage devices includes: determining at least one first storage device with a larger first file storage capacity and at least one second storage device with a smaller first file storage capacity among multiple storage devices; and / or,
[0028] The step of determining at least one first storage device with a larger second file storage capacity and at least one second storage device with a smaller second file storage capacity among multiple storage devices includes: determining at least one first storage device with a larger second file occupied space and at least one second storage device with a smaller second file occupied space among multiple storage devices.
[0029] The step of determining at least one first storage device storing a larger number of first files and at least one second storage device storing a smaller number of first files among the multiple storage devices includes:
[0030] Determine a first storage device storing the largest number of first files and a second storage device storing the smallest number of first files among the multiple storage devices, and determine an average value of the number of first files stored in the storage devices;
[0031] In the case where the difference between the first file storage quantity of the first storage device of the first file and the average value of the first file storage quantity is greater than the quantity threshold, and / or the difference between the average value of the first file storage quantity and the first file storage quantity of the second storage device of the first file is greater than the quantity threshold, performing the steps of screening out at least one migration file group from all file groups of each first storage device; and migrating at least one migration file group of each first storage device to the corresponding second storage device, so as to migrate at least one migration file group in the first storage device of the first file to the second storage device of the first file;
[0032] The step of determining at least one first storage device in which the second file occupies more space and at least one second storage device in which the second file occupies less space among the plurality of storage devices includes:
[0033] Determine a first storage device with the largest space occupied by the second file and a second storage device with the smallest space occupied by the second file among the plurality of storage devices, and determine an average value of the space occupied by the second files of the storage devices;
[0034] When the difference between the second file occupied space of the first storage device of the second file and the average value of the second file occupied space is greater than the capacity threshold, and / or the difference between the average value of the second file occupied space and the second file occupied space of the second storage device of the second file is greater than the capacity threshold, the steps of screening out at least one migration file group from all file groups of each first storage device; and migrating at least one migration file group of each first storage device to the corresponding second storage device are performed, so as to migrate at least one migration file group in the first storage device of the second file to the second storage device of the second file.
[0035] The method is applied to a server, the server stores the storage addresses of various files, and the step of migrating at least one migration file group of each first storage device to the corresponding second storage device includes:
[0036] Copying each file in at least one migration file group in each first storage device to a corresponding second storage device;
[0037] Update the storage address of each file;
[0038] Each file in the first storage device is deleted.
[0039] The method further comprises: copying each file in at least one migration file group in each first storage device to a corresponding second storage device, and then:
[0040] Determine whether the occupied space of each file in the corresponding first storage device and second storage device is consistent;
[0041] If the occupied space of each file in the corresponding first storage device and second storage device is consistent, the step of updating the storage address of each file is performed.
[0042] To achieve the above object, the present application also provides a migration device, which includes:
[0043] A migration judgment module, the migration judgment module is used to query the file storage capacity of multiple storage devices; determine at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the multiple storage devices;
[0044] A data selection module, the data selection module is used to select at least one migration file group from all file groups of each first storage device, the file groups in the first storage device are obtained by uniformly grouping the files in the first storage device based on the unique identification information of the files, and the unique identification information of the files is generated by encoding the initial identification information of the files;
[0045] The migration module is used to migrate at least one migration file group of each first storage device to the corresponding second storage device, so that the file storage capacity of each first storage device and the corresponding second storage device is substantially the same.
[0046] The migration modules include:
[0047] A data copy module, the data copy module is used to copy each file in at least one migration file group in each first storage device to a corresponding second storage device;
[0048] A device update module, which is used to update the storage address of each file;
[0049] The data deletion module is used to delete each file in the first storage device.
[0050] To achieve the above object, the present application also provides a migration device, which includes a processor; the processor is used to execute instructions to implement the above method.
[0051] To achieve the above objectives, the present application also provides a computer-readable storage medium, which is used to store instructions / program data, and the instructions / program data can be executed to implement the above method.
[0052] In the data migration method of the present application, at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity are first determined, and at least one migration file group can be screened out from all file groups of each first storage device, and then at least one migration file group of each first storage device is migrated to the corresponding second storage device, thereby achieving the purpose of approximately the same file storage capacity of each first storage device and its corresponding second storage device, so that the file storage capacity of multiple storage devices is balanced, and because the file group of the first storage device is grouped based on the unique identification information of the file, and the unique identification information of the file is generated by encoding the initial identification information of the file, the files of the first storage device can be shuffled by grouping the unique identification information of the file, so that the file amounts between different file groups are not much different, so that the files to be migrated can be determined in units of file groups, so that the execution subject does not need to accurately select the migration files based on the size of each file in the first storage device, and can automatically select the migration files, thereby improving the data migration processing efficiency, and thus directly selecting a certain number of file groups for migration can achieve the purpose of approximately the same file storage capacity of the first storage device and the second storage device. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0054] Figure 1 It is a flowchart of an implementation method of the data migration method of the present application;
[0055] Figure 2 It is a flowchart of another implementation method of the data migration method of the present application;
[0056] Figure 3 It is a flowchart of another implementation method of the data migration method of the present application;
[0057] Figure 4 It is a structural schematic diagram of an implementation method of a migration device of the present application;
[0058] Figure 5 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative work are within the scope of protection of the present application. In addition, unless otherwise specified (for example, "or in addition" or "or in an alternative"), the term "or" as used herein refers to a non-exclusive "or" (that is, "and / or"). Moreover, the various embodiments described herein are not necessarily mutually exclusive, because some embodiments can be combined with one or more other embodiments to form new embodiments.
[0060] This application provides a data migration method, specifically Figure 1 As shown, the data migration method of this embodiment includes the following steps. The execution subject of the data migration method can be a server. It should be noted that the following step numbers are only used to simplify the description and are not intended to limit the execution order of the steps. The execution order of each step of this embodiment can be changed arbitrarily without violating the technical idea of this application.
[0061] S101: Query the file storage capacity of multiple storage devices.
[0062] The file storage capacities of multiple storage devices may be queried first, so as to subsequently determine a first storage device for files to be migrated out and a second storage device for files to be migrated in based on the file storage capacities of the multiple storage devices.
[0063] In one implementation, the execution subject (eg, server) of the data migration method of the present application stores the file information stored in each storage device, and can calculate the file storage capacity of each storage device based on the file information stored in each storage device.
[0064] In another implementation, the execution subject of the data migration method of the present application can be communicatively connected to multiple storage devices, so that the execution subject can issue an instruction to obtain the file storage capacity to each storage device, so as to obtain the file storage capacity of each storage device itself from each storage device.
[0065] S102: Determine at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among a plurality of storage devices.
[0066] After the file storage capacities of the multiple storage devices are queried in step S101, at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the multiple storage devices may be determined.
[0067] In one implementation, in step S101, a storage device with the largest storage capacity among multiple storage devices can be directly used as the first storage device, and a storage device with the least storage capacity among the multiple storage devices can be directly used as the second storage device, so that some files in the first storage device can be subsequently migrated to the second storage device, thereby balancing the storage capacity of multiple storage devices.
[0068] In another implementation, a first number of first storage devices with larger storage capacity and a second number of second storage devices with smaller storage capacity may be selected from a plurality of storage devices. The first number and the second number are not limited here and may be set according to actual conditions such as the total number of storage devices. For example, if the total number of storage devices is 20, the first number may be 5 and the second number may be 5. The first number may be the same as or different from the second number.
[0069] In another implementation, the average storage capacity of the storage device can be calculated. In step S102, at least one storage device among the multiple storage devices having a file storage capacity greater than the average storage capacity can be used as a first storage device, and at least one storage device among the multiple storage devices having a file storage capacity less than the average storage capacity can be used as a second storage device.
[0070] S103: Filter out at least one migration file group from all file groups of each first storage device.
[0071] After determining the first storage device with a larger storage capacity and the second storage device with a smaller storage capacity based on the above steps, at least one migration file group can be screened out from all the file groups of each first storage device, so as to subsequently migrate at least one migration file group of each first storage device to the corresponding second storage device, thereby achieving the purpose of each first storage device having approximately the same file storage capacity as its corresponding second storage device, so as to balance the file storage capacities of multiple storage devices. Moreover, since the file groups of the first storage device are grouped based on the unique identification information of the file, and the unique identification information of the file is generated by encoding the initial identification information of the file, the files of the first storage device can be shuffled by grouping the unique identification information of the file, so that the file volumes between different file groups are not much different, so that the files to be migrated can be determined in units of file groups. In this way, the execution subject does not need to accurately select the migration files based on the size of each file in the first storage device, and can automatically select the migration files, thereby improving the data migration processing efficiency. In this way, a certain number of file groups are directly selected for migration, thereby achieving the purpose of approximately the same file storage capacity of the first storage device and the second storage device.
[0072] In one implementation, all files of each storage device have been grouped in advance based on the unique identification information of the files. In this case, in step S103, it is only necessary to filter out at least one migration file group from all file groups of each first storage device.
[0073] In another implementation, after determining in step S102 that the first storage device from which the file needs to be migrated, in step S103, only all the files of each first storage device may be grouped based on the unique identification information of the file, and then at least one migration file group may be screened out from all the file groups of each first storage device.
[0074] In the above two implementations, the number of migration file groups of each first storage device may be an integer closest to a preset value of each first storage device. The preset value is equal to the value obtained by dividing the first product by twice the total storage capacity of each first storage device, and the first product is equal to the product of the difference between the file storage capacity of each first storage device and its corresponding second storage device and the total number of file groups in each first storage device. Of course, in other replaceable embodiments, the number of migration file groups of each first storage device may be an integer rounded up from the preset value of each first storage device.
[0075] After knowing the number n of migration file groups of each first storage device, n file groups can be selected from each first storage device as migration file groups. For example, n file groups can be randomly selected from each first storage device as migration file groups to further shuffle the files so that the total amount of files of at least one migration file group taken from each first storage device is close to half of the difference in file storage capacity between each first storage device and its corresponding second storage device, so that the file storage capacity of the first storage device and its corresponding second storage device can be balanced after data migration. For another example, the first n file groups of each first storage device can be used as migration file groups.
[0076] It is understandable that, in the present application, each first storage device corresponds to at least one second storage device. Specifically, the first storage device and the second storage device can be matched one-to-one, so that each first storage device has a corresponding second storage device. With such a configuration, the total number of migration file groups to be screened out for each first storage device can be determined based on the difference in file storage capacity between each first storage device and its corresponding second storage device. For example, step S102 determines two first storage devices and two second storage devices, and the first storage device with the largest storage capacity can be matched to the second storage device with the smallest storage capacity, and the first storage device with the second largest storage capacity can be matched to the second storage device with the second smallest storage capacity.
[0077] Optionally, the present application may encode the initial identification information of the file by a-binaryization or hash algorithm to obtain unique identification information of the file.
[0078] In addition, when the unique identification information is a binary string, all files of each first storage device may be divided into multiple file groups (for example, a b In other embodiments, all files of each first storage device may be divided into a group based on the character string of the c+1th to c+bth bits of the unique identification information of the file. b group, where c is an integer greater than or equal to 0, and c+b is less than or equal to the total number of characters of the unique identification information.
[0079] Furthermore, the unique identification information of the file can be generated by binarizing the initial identification information of the file, so that the number of file groups in each first storage device can be changed by two times, so that the number of file groups in each first storage device can be more accurately controlled, so that the number of groups is not too much or too little, resulting in an unbalanced amount of files between different groups. Of course, in other embodiments, the unique identification information of the file can also be generated by hexadecimalizing or quinaryizing the initial identification information of the file.
[0080] Among them, "filtering out at least one migration file group" referred to in step S103 can be understood as filtering out identification information of at least one migration file group or all files in at least one migration file group (which can refer to the initial identification information, unique identification information or file name of the file), and does not mean filtering out at least one migration file group by copying at least one migration file group of the first storage device to the execution entity to avoid the execution entity of the data migration method receiving too many unnecessary files during the migration process, resulting in a decrease in processing speed.
[0081] In addition, when the file storage capacity of the first storage device and its corresponding second storage device is relatively balanced, the files in the first storage device may not be migrated to the second storage device corresponding to the first storage device. Specifically, before step S103, the average storage capacity of files in the storage device may be calculated, and then it is determined whether the difference between the file storage capacity of the first storage device and the average storage capacity is greater than a first threshold, and it is determined whether the difference between the average storage capacity and the file storage capacity of the second storage device corresponding to the first storage device is greater than the first threshold; when the difference between the file storage capacity of the first storage device and the average storage capacity is greater than the first threshold, and / or the difference between the average storage capacity and the file storage capacity of the second storage device corresponding to the first storage device is greater than the first threshold, step S103 and step S104 are executed to migrate the files of the first storage device to the second storage device corresponding to the first storage device, so that the file storage capacity of the first storage device and the second storage device corresponding to the first storage device are substantially the same; when the difference between the file storage capacity of the first storage device and the average storage capacity is less than the first threshold, and the difference between the average storage capacity and the storage capacity of the second storage device corresponding to the first storage device is less than the first threshold, it indicates that the file storage capacity of the first storage device and the second storage device is relatively balanced, and step S103 and step S104 may not be executed.
[0082] S104: Migrate at least one migration file group of each first storage device to the corresponding second storage device.
[0083] After determining at least one migration file group to be migrated out of each first storage device based on the above steps, the at least one migration file group of each first storage device may be migrated to the corresponding second storage device.
[0084] Specifically, step S104 may include: the execution subject may copy each file in all migration file groups in the first storage device to the second storage device corresponding to the first storage device; after the copying is completed, the storage address of each file in half of the file groups is updated; and then each file in all migration file groups in the first storage device is deleted. In this way, by updating the storage address and then deleting, it is ensured that the execution subject can still obtain the migration file from the first storage device before the address is updated, and the execution subject can obtain the migration file from the second storage device after the address is updated, so that the user can obtain the migration file at any time, and it can be ensured that the user can normally access the migration file during the migration process.
[0085] The execution subject of the data migration method may store the storage address of each file, and specifically may store on which storage device each file is stored. The storage address, unique identification information and / or file size of each file may be stored in a first set in the database of the execution subject. The name of the first set is file_info set or other names. Therefore, the above-mentioned "updating the storage address of each file in half of the file group" may mean that the execution subject of the data migration method may change the storage address information of each file stored in itself from the first storage device to the second storage device.
[0086] Furthermore, to further ensure that the migration file can be accessed normally during the migration process, the storage address of the migration file can be updated when it is determined that the migration file is copied successfully, that is, when the occupied space of the migration file on the first storage device and the second storage device is consistent. Such a setting can avoid the situation where the user cannot access the complete file after the migration due to the migration file not being completely transferred to the second storage device. It can ensure that the storage address of the migration file is updated only when the complete migration file is obtained on the second storage device, so as to ensure that the user can access the complete file after the migration.
[0087] To facilitate the management of the migration process, during the entire migration process, different migration states of the migration file can be marked with flags so that the execution subject can clearly know the current state of each migration file. Specifically, the migration file can include five migration states: data to be migrated, data copied, data synchronized, data updated, and data deleted. The flags of these five migration states can be 0, 1, 2, 3, and -1 respectively.
[0088] Specifically, during the migration process, the initial migration status of the migration file is data to be migrated, and its flag is 0. The execution subject can copy the migration file with a flag of 0 from the first storage device to the second storage device corresponding to the first storage device, and change the flag of the migration file to 1 after copying, that is, the migration status of the migration file is updated to data copied. Then, the migration file with a flag of 1 can be screened out, and the occupied space of the migration file with a flag of 1 in the first storage device and the second storage device can be checked to be consistent; if consistent, it means that the migration file is copied successfully, and the flag of the migration file that is copied successfully will be changed to 2, indicating that the current migration status of the migration file is changed to data synchronized. Then, the migration file with a flag of 2 can be screened out, and the storage address of the migration file with a flag of 2 can be changed from the first storage device to the second storage device, so that the user can accurately find the storage address of the migration file after migration through the storage address of the migration file, and then change the flag of the migration file whose storage address is successfully modified to 3. Then, the migration file with a flag of 3 can be screened out, so that the first storage device can filter out the migration file with a flag of 3, and then the migration mark bit of the migration file that is successfully deleted is changed to -1, indicating that the migration file is successfully migrated.
[0089] To further facilitate the management of the migration process, the execution subject of the data migration method can temporarily store the information of all files of the selected half of the file group into the second set of the database to manage the migration process of each migration file in the second set. The type of database of the present application is not limited, for example, it can be a mongo database. The name of the second set can be the transfer_log set.
[0090] The information of the migration file stored in the set may include unique identification information of the migration file, file size, first storage device, second storage device and flag bit.
[0091] In this embodiment, at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity are first determined, and at least one migration file group can be screened out from all file groups of each first storage device. Then, at least one migration file group of each first storage device is migrated to the corresponding second storage device, thereby achieving the purpose of approximately the same file storage capacity of each first storage device and its corresponding second storage device, so that the file storage capacity of multiple storage devices is balanced. Moreover, since the file groups of the first storage device are grouped based on the unique identification information of the file, and the unique identification information of the file is generated by encoding the initial identification information of the file, the files of the first storage device can be shuffled by grouping the unique identification information of the file, so that the file volumes between different file groups are not much different, so that the files to be migrated can be determined in units of file groups. In this way, the execution subject does not need to accurately select the migration files based on the size of each file in the first storage device, and can automatically select the migration files, thereby improving the data migration processing efficiency. In this way, a certain number of file groups are directly selected for migration, thereby achieving the purpose of approximately the same file storage capacity of the first storage device and the second storage device.
[0092] Among them, the present application can also distinguish the first file and the second file according to the file size (that is, distinguish large files and small files according to the file size). Specifically, a file whose size is less than the second threshold value can be called a first file (small file), and a file whose size is greater than the second threshold value can be called a second file (large file). Taking into account that the first file occupies a small space but is in large quantity, the present application stores the first file and its unique identification information together in the database of the storage device to which it belongs, so that the first file can be found in the database through the unique identification information of the first file, thereby avoiding the low access speed and efficiency of the first file caused by "storing the first file that occupies a small space but has a lot of data in the memory (that is, the hard disk) and needing to traverse the first files in the memory to find the first file to be found", so as to improve the access speed and efficiency of the first file. The first file can also be migrated by the above-mentioned data migration method to balance the amount of the first file stored in each storage device. Specifically, if Figure 2 As shown, the data migration method of the first file of this embodiment may include the following steps. The execution subject of the data migration method may be a server. It should be noted that the following step numbers are only used to simplify the description and are not intended to limit the execution order of the steps. The execution order of each step of this embodiment can be changed arbitrarily without violating the technical idea of this application.
[0093] S201: Query the storage capacity of a first file in multiple storage devices.
[0094] S202: Determine at least one first storage device having a larger first file storage capacity and at least one second storage device having a smaller first file storage capacity among the plurality of storage devices.
[0095] Optionally, because the sizes of the first files are all smaller than the second threshold, the space occupied by different first files is not much different from that of the second files. In this case, in step S201, the storage quantity of first files of each storage device can be directly queried, and in step S202, at least one first storage device with a larger storage quantity of first files and at least one second storage device with a smaller storage quantity of first files among the multiple storage devices can be determined.
[0096] Of course, in other embodiments, in step S201, the occupied space of all first files of each storage device can be queried, and in step S202, at least one first storage device with more occupied space by first files and at least one second storage device with less occupied space by first files among multiple storage devices can be determined.
[0097] S203: Filter out at least one migration file group from all file groups of each first storage device.
[0098] The unique identification information of the file is generated by encoding the initial identification information of the file.
[0099] S204: Migrate all migration file groups of the first storage device of each first file to the second storage device of the corresponding first file.
[0100] In step S204, each first file in all migration file groups stored in the database of the first storage device may be migrated to the database of the second storage device.
[0101] Specifically, during the migration process, the first file to be migrated can be first found from the database of the first storage device based on the unique identification information of the first file to be migrated, and then the found first file to be migrated can be sent to the second storage device. Then, the unique identification information of the first file to be migrated can be used to query whether the occupied space of the first file to be migrated in the respective databases of the first storage device and the second storage device is the same. If the space is the same, it means that the first file to be migrated is copied successfully; then the storage address of the successfully copied first file is changed from the first storage device to the second storage device; then the relevant information of the first file with the changed address in the database of the first storage device is deleted.
[0102] Among them, in order to facilitate verification whether the occupied space of the first file to be migrated in the respective databases of the first storage device and the second storage device is the same, the occupied space information of the first file may also be stored in the database of the storage device, so that the occupied space information of the first file can be directly read from the database of the storage device, thereby confirming whether the occupied space of the first file to be migrated in the respective databases of the first storage device and the second storage device is the same.
[0103] In addition, the relevant information of the first file stored in the database of the storage device may include unique identification information of the first file, file size, and original data of the file (ie, the first file itself).
[0104] In addition, in the case where the storage device with the largest number of first file storages among the multiple storage devices is used as the first storage device for the first file in step S202, and the storage device with the least number of first file storages is used as the second storage device for the first file, before step S203, an average value of the first file storage quantities of the storage devices may be determined, and it may be determined whether a difference between the first file storage quantity of the first storage device for the first file and the average value of the first file storage quantity is greater than a quantity threshold, and it may be determined whether a difference between the average value of the first file storage quantity and the first file storage quantity of the second storage device for the first file is greater than a quantity threshold; when the difference between the first file storage quantity of the first storage device for the first file and the average value of the first file storage quantity is greater than the quantity threshold, and / or the first file storage quantity When the difference between the average value of the amount and the first file storage amount of the second storage device of the first file is greater than the amount threshold, step S203 and step S204 are executed to migrate part of the first files of the first storage device of the first file to the second storage device of the first file, so that the first file storage amount of the first storage device and its corresponding second storage device are substantially the same; when the difference between the first file storage amount of the first storage device of the first file and the average value of the first file storage amount is less than the amount threshold, and the difference between the average value of the first file storage amount and the first file storage amount of the second storage device of the first file is less than the amount threshold, it indicates that the first file storage amounts in the first storage device and the second storage device are relatively balanced, and step S203 and step S204 may not be executed. Optionally, after executing step S204, the process may return to execute step S202 to automatically determine whether migration is required based on the current file storage capacity of each storage device, and execute steps S203 and S204 when migration is required to migrate part of the first file in the first storage device of the current first file to the second storage device of the current first file, until the difference between the storage capacity of the first storage device of the first file and the average storage capacity is less than a first threshold, and the difference between the average storage capacity and the storage capacity of the second storage device of the first file is less than the first threshold.
[0105] It is understandable that in the migration judgment of the first file, the first threshold is a quantity threshold, wherein the quantity threshold can be set according to actual conditions and is not limited here, for example, it can be 50 or 30.
[0106] In addition, the second file can be directly stored in the memory (i.e., hard disk) of the storage device to which it belongs. The second file can also be migrated by the above data migration method to balance the amount of the second file stored in each storage device. Specifically, Figure 3As shown, the data migration method of the second file of this embodiment may include the following steps. The execution subject of the data migration method may be a server. It should be noted that the following step numbers are only used to simplify the description and are not intended to limit the execution order of the steps. The execution order of each step of this embodiment can be changed arbitrarily without violating the technical idea of this application.
[0107] S301: Query the storage capacity of a second file in multiple storage devices.
[0108] S302: Determine at least one first storage device having a larger storage capacity of second files and at least one second storage device having a smaller storage capacity of second files among the plurality of storage devices.
[0109] Optionally, in step S301, the occupied space of all second files of each storage device may be queried, and in step S302, at least one first storage device with more occupied space by second files and at least one second storage device with less occupied space by second files among multiple storage devices may be determined.
[0110] S303: Filter out at least one migration file group from all file groups of each first storage device.
[0111] The unique identification information of the file is generated by encoding the initial identification information of the file.
[0112] S304: Migrate all migration file groups of the first storage device of each second file to the second storage device of the corresponding second file.
[0113] In step S304, each second file in all migration file groups stored in the memory of the first storage device may be migrated to the memory of the second storage device.
[0114] Specifically, during the migration process, the second file to be migrated can be first found from the first storage device based on the unique identification information of the second file to be migrated, and then the found second file to be migrated can be sent to the second storage device. Then, the unique identification information of the second file to be migrated can be used to query whether the occupied space of the second file to be migrated in the first storage device and the second storage device is the same. If the space is the same, it means that the second file to be migrated is copied successfully; then the storage address of the successfully copied second file is changed from the first storage device to the second storage device; then the second file with the changed address in the memory of the first storage device is deleted.
[0115] To facilitate the management of the second file in the storage device, the path generated by processing the unique identification information of the second file can be used as the storage path of the second file. In this way, the storage path of the second file can be known through the unique identification information of the second file, so that the corresponding second file can be found from the storage device.
[0116] To further improve the search efficiency of the second file, each storage device may store the second file in a tree structure. Specifically, each storage device may establish a tree structure for storing the second file based on the storage path of the second file stored therein.
[0117] In addition, in the case where the storage device with the largest second file occupied space among the multiple storage devices is used as the first storage device for the second file in step S302, and the storage device with the smallest second file occupied space is used as the second storage device for the second file, before step S303, the average value of the second file occupied space of the storage devices can be determined, and it can be determined whether the difference between the second file occupied space of the first storage device for the second file and the average value of the second file occupied space is greater than the capacity threshold, and it can be determined whether the difference between the average value of the second file occupied space and the second file occupied space of the second storage device for the second file is greater than the capacity threshold; the difference between the second file occupied space of the first storage device for the second file and the average value of the second file occupied space is greater than the capacity threshold, and / or the second file occupied space When the difference between the average value of the space and the space occupied by the second file of the second file of the second storage device is greater than the capacity threshold, step S303 and step S304 are executed to migrate the second file of the first storage device of the second file to the second storage device of the second file, so that the second file storage capacity of the first storage device and its corresponding second storage device is roughly the same; when the difference between the space occupied by the second file of the first storage device of the second file and the average value of the space occupied by the second file is less than the capacity threshold, and the difference between the average value of the space occupied by the second file and the space occupied by the second file of the second storage device of the second file is less than the capacity threshold, it indicates that the space occupied by the second files in the first storage device and the second storage device is relatively balanced, and step S303 and step S304 may not be executed. Optionally, after executing step S304, the process may return to execute step S302 to automatically determine whether migration is required based on the current file storage capacity of each storage device, and execute steps S303 and S304 when migration is required to migrate part of the second files in the first storage device of the current second file to the second storage device of the current second file, until the difference between the storage capacity of the first storage device of the second file and the average storage capacity is less than a first threshold, and the difference between the average storage capacity and the storage capacity of the second storage device of the second file is less than the first threshold.
[0118] It is understandable that in the migration judgment of the second file, the first threshold is a capacity threshold, wherein the capacity threshold can be set according to actual conditions and is not limited here, for example, it can be 50G or 30G.
[0119] It is understandable that the first threshold value (i.e., quantity threshold value) corresponding to the first file and the first threshold value (i.e., capacity threshold value) corresponding to the second file can be set according to actual conditions, and no limitation is made here. And the first threshold value corresponding to the first file may not be equal to or equal to the first threshold value corresponding to the second file, and no limitation is made here.
[0120] In a specific data migration process, at least one iteration process may be performed based on the above data migration method implementation to balance the file storage capacity of multiple storage devices.
[0121] Specifically, in the kth iteration, a first storage device with the largest current storage capacity and a second storage device with the smallest current storage capacity among multiple storage devices can be determined, and the average storage capacity of the storage devices can be determined; then, when the difference between the storage capacity of the first storage device and the average storage capacity is greater than a first threshold, and / or the difference between the average storage capacity and the storage capacity of the second storage device is greater than the first threshold, at least one migration file group is screened out from all the file groups of each first storage device, the file groups in the first storage device are obtained by uniformly grouping the files in the first storage device based on the unique identification information of the files, and the unique identification information of the files is generated by encoding the initial identification information of the files; at least one migration file group of each first storage device is migrated to the corresponding second storage device, so that the file storage capacity of each first storage device and its corresponding second storage device is approximately the same; when the difference between the storage capacity of the first storage device and the average storage capacity is less than the first threshold, and the difference between the average storage capacity and the storage capacity of the second storage device is less than the first threshold, the iteration is terminated.
[0122] In addition, the average storage capacity of the storage device may be equal to the ratio of the sum of the storage capacities of all storage devices to the total number of storage devices.
[0123] The present application provides a migration device, which includes a migration judgment module, a data selection module and a migration module.
[0124] The migration judgment module is used to query the file storage capacity of multiple storage devices; determine at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the multiple storage devices.
[0125] The data selection module is used to filter out at least one migration file group from all file groups of each first storage device. The file groups in the first storage device are obtained by evenly grouping the files in the first storage device based on the unique identification information of the files. The unique identification information of the files is generated by encoding the initial identification information of the files.
[0126] The migration module is used to migrate at least one migration file group of each first storage device to the corresponding second storage device, so that the file storage capacity of each first storage device and the corresponding second storage device is substantially the same.
[0127] Specifically, the data selection module is used to group all files of each first storage device based on unique identification information; and to filter out at least one migration file group from all file groups of each first storage device; wherein the number of migration file groups of each first storage device is the integer closest to a preset value of each first storage device, and the preset value is equal to the value obtained by dividing the first product by twice the total storage capacity of each first storage device, and the first product is equal to the product of the difference in file storage capacity between each first storage device and its corresponding second storage device and the total number of file groups in each first storage device.
[0128] The data selection module can also be used to group all files of each first storage device based on the last preset number of bits of the unique identification information of the file, wherein the unique identification information of the file is generated by binarizing the initial identification information of the file.
[0129] The migration judgment module is used to determine a first storage device with the largest storage capacity and a second storage device with the smallest storage capacity among multiple storage devices, and determine the average storage capacity of the storage devices; when the difference between the storage capacity of the first storage device and the average storage capacity is greater than a first threshold, and / or the difference between the average storage capacity and the storage capacity of the second storage device is greater than the first threshold, perform the step of filtering out at least one migration file group from all file groups of each first storage device.
[0130] The migration device may also include an iteration module, which is used to execute the step of migrating at least one migration file group of each first storage device to the corresponding second storage device, and then return to execute the step of determining at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among multiple storage devices, until the difference between the storage capacity of the first storage device and the average storage capacity is less than a first threshold and the difference between the average storage capacity and the storage capacity of the second storage device is less than the first threshold.
[0131] In addition, the first file whose file size is smaller than the second threshold and its unique identification information are stored together in the database of the storage device to which it belongs. The second file whose file size is larger than the second threshold is stored in the memory of the storage device to which it belongs.
[0132] The migration judgment module is used to determine at least one first storage device with a larger first file storage capacity and at least one second storage device with a smaller first file storage capacity among multiple storage devices; determine at least one first storage device with a larger second file storage capacity and at least one second storage device with a smaller second file storage capacity among multiple storage devices; and communicate with the data selection module and other modules to perform the steps of screening out at least one migration file group from all file groups of each first storage device; and migrating at least one migration file group of each first storage device to the corresponding second storage device, so as to migrate at least one migration file group in the first storage device of the first file to the second storage device of the first file, and migrate at least one migration file group in the first storage device of the second file to the second storage device of the second file.
[0133] The migration judgment module is used to determine at least one first storage device with a larger number of first file storages and at least one second storage device with a smaller number of first file storages among multiple storage devices; and / or, determine at least one first storage device with a larger amount of space occupied by second files and at least one second storage device with a smaller amount of space occupied by second files among multiple storage devices.
[0134] The judgment migration module is used to determine a first storage device with the largest number of first files stored and a second storage device with the smallest number of first files stored among multiple storage devices, and determine an average number of first files stored in the storage devices; when the difference between the number of first files stored in the first storage device and the average number of first files stored is greater than a quantity threshold, and / or the difference between the average number of first files stored and the number of first files stored in the second storage device is greater than the quantity threshold, perform the steps of screening out at least one migration file group from all file groups of each first storage device; and migrate at least one migration file group of each first storage device to the corresponding second storage device, so as to migrate at least one migration file group in the first storage device of the first file to the second storage device of the first file. storage device; determining a first storage device with the most space occupied by second files and a second storage device with the least space occupied by second files among multiple storage devices, and determining an average value of the space occupied by second files of the storage devices; when the difference between the space occupied by second files of the first storage device and the average value of the space occupied by the second files is greater than a capacity threshold, and / or when the difference between the average value of the space occupied by the second files and the space occupied by the second files of the second storage device is greater than the capacity threshold, performing the step of screening out at least one migration file group from all file groups of each first storage device; migrating at least one migration file group of each first storage device to the corresponding second storage device, so as to migrate at least one migration file group in the first storage device of the second file to the second storage device of the second file.
[0135] The migration module includes a data copy module, a device update module and a data deletion module. The data copy module is used to copy each file in at least one migration file group in each first storage device to the corresponding second storage device; the device update module is used to update the storage address of each file; and the data deletion module is used to delete each file in the first storage device.
[0136] The migration module also includes a data synchronization module, which is used to determine whether the occupied space of each file in the corresponding first storage device and the second storage device is consistent; if the occupied space of each file in the corresponding first storage device and the second storage device is consistent, it is updated with the device update module to execute the step of updating the storage address of each file.
[0137] The migration module also includes a data upload module, which is used to save the data uploaded by the user in a storage device.
[0138] See also Figure 4 , Figure 4 The schematic diagram is a schematic diagram of a structure of an implementation of a migration device 20 of the present application. The migration device 20 of the present application includes a processor 22, and the processor 22 is used to execute instructions to implement the method of any of the above implementations of the present application and the method provided by any non-conflicting combination.
[0139] The migration device 20 may be a camera device or a server, etc., which is not limited here.
[0140] The processor 22 may also be referred to as a CPU (Central Processing Unit). The processor 22 may be an integrated circuit chip having signal processing capabilities. The processor 22 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor, or the processor 22 may also be any conventional processor, etc.
[0141] The migration device 20 may further include a memory 21 for storing instructions and data required for the processor 22 to run.
[0142] See also Figure 5 , Figure 5It is a schematic diagram of the structure of the computer-readable storage medium in the implementation mode of the present application. The computer-readable storage medium 30 of the embodiment of the present application stores instructions / program data 31, and when the instructions / program data 31 are executed, the method provided by any embodiment of the above-mentioned method of the present application and any non-conflicting combination is implemented. Among them, the instructions / program data 31 can form a program file and be stored in the above-mentioned storage medium 30 in the form of a software product, so that a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) executes all or part of the steps of each implementation method of the present application. The aforementioned storage medium 30 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, or a computer, a server, a mobile phone, a tablet and other devices.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0145] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0146] The above are only implementation methods of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data migration method, It is characterized in that The method comprises: Query the file storage capacity of multiple storage devices; Determine at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the multiple storage devices; In a case where the difference between the file storage capacity of the first storage device and the average storage capacity of files in the storage device is greater than a first threshold, and / or the difference between the average storage capacity and the second storage device corresponding to the first storage device is greater than the first threshold, at least one migration file group is screened out from all the file groups of each of the first storage devices, the file groups in the first storage device being obtained by uniformly grouping the files in the first storage device based on unique identification information of the files, the unique identification information of the file being generated by encoding initial identification information of the file; The at least one migration file group of each first storage device is migrated to the corresponding second storage device, so that the file storage capacity of each first storage device and its corresponding second storage device is substantially the same.
2. The data migration method according to claim 1, It is characterized in that The step of selecting at least one migration file group from all the file groups of each of the first storage devices comprises: grouping all files of each of the first storage devices based on the unique identification information; Filtering at least one migration file group from all file groups of each of the first storage devices; Among them, the number of migration file groups of each first storage device is the integer closest to a preset value of each first storage device, and the preset value is equal to the first product divided by twice the total storage capacity of each first storage device, and the first product is equal to the product of the difference between the file storage capacity of each first storage device and its corresponding second storage device and the total number of file groups in each first storage device.
3. The data migration method according to claim 2, It is characterized in that The unique identification information of the file is generated by binarizing the initial identification information of the file. The step of grouping all files of each of the first storage devices based on the unique identification information comprises: All files of each of the first storage devices are grouped based on the last preset number of bits of the unique identification information of the file.
4. The data migration method according to claim 1, It is characterized in that The step of determining at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the plurality of storage devices comprises: Determine a first storage device with the largest storage capacity and a second storage device with the smallest storage capacity among the plurality of storage devices, and determine an average storage capacity of the storage devices; When the difference between the storage capacity of the first storage device and the average storage capacity is greater than a first threshold, and / or the difference between the average storage capacity and the storage capacity of the second storage device is greater than a first threshold, the step of filtering out at least one migration file group from all file groups of each of the first storage devices is performed.
5. The data migration method according to claim 4, It is characterized in that The step of migrating the at least one migration file group of each first storage device to the corresponding second storage device includes: Return to the step of determining at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the multiple storage devices, until the difference between the storage capacity of the first storage device and the average storage capacity is less than a first threshold, and the difference between the average storage capacity and the storage capacity of the second storage device is less than the first threshold.
6. The data migration method according to claim 1, It is characterized in that The first file whose file size is smaller than the second threshold value and its unique identification information are stored together in the database of the storage device to which it belongs.
7. The data migration method according to claim 6, It is characterized in that The second file whose file size is greater than the second threshold is stored in the memory of the storage device to which it belongs; The step of determining at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the plurality of storage devices comprises: Determine at least one first storage device having a larger storage capacity of the first file and at least one second storage device having a smaller storage capacity of the first file among the plurality of storage devices; Determine at least one first storage device having a larger storage capacity of second files and at least one second storage device having a smaller storage capacity of second files among the plurality of storage devices; Execute the step of filtering out at least one migration file group from all file groups of each of the first storage devices; and migrating the at least one migration file group of each of the first storage devices to the corresponding second storage device, so as to migrate the at least one migration file group in the first storage device of the first file to the second storage device of the first file, and migrate the at least one migration file group in the first storage device of the second file to the second storage device of the second file.
8. The data migration method according to claim 7, It is characterized in that The step of determining at least one first storage device with a larger first file storage capacity and at least one second storage device with a smaller first file storage capacity among the multiple storage devices comprises: determining at least one first storage device with a larger first file storage capacity and at least one second storage device with a smaller first file storage capacity among the multiple storage devices; and / or, The step of determining at least one first storage device with a larger second file storage capacity and at least one second storage device with a smaller second file storage capacity among the multiple storage devices includes: determining at least one first storage device with a larger second file occupied space and at least one second storage device with a smaller second file occupied space among the multiple storage devices.
9. The data migration method according to claim 8, It is characterized in that The step of determining at least one first storage device storing a larger number of first files and at least one second storage device storing a smaller number of first files among the plurality of storage devices comprises: Determine a first storage device storing the largest number of first files and a second storage device storing the smallest number of first files among the multiple storage devices, and determine an average value of the number of first files stored in the storage devices; In the case where the difference between the number of first files stored in the first storage device of the first file and the average number of the first files stored is greater than the number threshold, and / or the difference between the average number of the first files stored and the number of first files stored in the second storage device of the first file is greater than the number threshold, performing the steps of screening out at least one migration file group from all the file groups of each of the first storage devices; and migrating the at least one migration file group of each of the first storage devices to the corresponding second storage device, so as to migrate the at least one migration file group in the first storage device of the first file to the second storage device of the first file; The step of determining at least one first storage device in which the second file occupies more space and at least one second storage device in which the second file occupies less space among the plurality of storage devices comprises: Determine a first storage device with the largest space occupied by the second file and a second storage device with the smallest space occupied by the second file among the plurality of storage devices, and determine an average value of the space occupied by the second files of the storage devices; In the case where the difference between the second file space occupied by the first storage device of the second file and the average value of the second file space occupied is greater than the capacity threshold, and / or the difference between the average value of the second file space occupied and the second file space occupied by the second storage device of the second file is greater than the capacity threshold, the steps of screening out at least one migration file group from all the file groups of each of the first storage devices and migrating the at least one migration file group of each of the first storage devices to the corresponding second storage device are performed to migrate the at least one migration file group in the first storage device of the second file to the second storage device of the second file.
10. The data migration method according to claim 1, It is characterized in that Applied to a server, the server stores storage addresses of various files, and the step of migrating the at least one migration file group of each first storage device to the corresponding second storage device includes: Copying each file in the at least one migration file group in each of the first storage devices to the corresponding second storage device; Updating the storage address of each file; Deleting each of the files in the first storage device.
11. The data migration method according to claim 10, It is characterized in that The step of copying each file in the at least one migration file group in each of the first storage devices to the corresponding second storage device comprises: Determine whether the occupied space of each file in the corresponding first storage device and the second storage device is consistent; If the occupied space of each file in the corresponding first storage device and second storage device is consistent, the step of updating the storage address of each file is performed.
12. A migration device, It is characterized in that The migration device comprises: A migration judgment module, the migration judgment module is used to query the file storage capacity of multiple storage devices; determine at least one first storage device with a larger storage capacity and at least one second storage device with a smaller storage capacity among the multiple storage devices; a data selection module, the data selection module being used to select at least one migration file group from all file groups of each first storage device when the difference between the file storage capacity of the first storage device and the average storage capacity of files in the storage device is greater than a first threshold value, and / or the difference between the average storage capacity and the second storage device corresponding to the first storage device is greater than the first threshold value, wherein the file groups in the first storage device are obtained by uniformly grouping the files in the first storage device based on unique identification information of the files, wherein the unique identification information of the files is generated by encoding initial identification information of the files; A migration module is used to migrate the at least one migration file group of each first storage device to a corresponding second storage device, so that the file storage capacity of each first storage device and its corresponding second storage device is substantially the same.
13. The migration device according to claim 12, It is characterized in that The migration module includes: a data copy module, the data copy module being used to copy each file in the at least one migration file group in each of the first storage devices to the corresponding second storage device; A device update module, the device update module is used to update the storage address of each file; A data deletion module is used to delete each file in the first storage device.
14. A migration device, It is characterized in that The migration device comprises a processor, and the processor is used to execute instructions to implement the steps of the method according to any one of claims 1-11.
15. A computer-readable storage medium having a program and / or instructions stored thereon, It is characterized in that When the program and / or instruction is executed, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Storage space processing method and device
CN106294188A
Data processing system, method and device
CN113297166A
