Data migration method and apparatus, storage medium, and electronic device
By monitoring and comparing the capacity utilization differences of OSS in a distributed storage system, the system automatically selects a target OSS for data migration, solving the problem of low data migration efficiency in existing technologies and achieving capacity balancing and system stability of the storage pool.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-23
Smart Images

Figure CN120045126B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data storage technology, and more specifically, to a data migration method and apparatus, a storage medium, and an electronic device. Background Technology
[0002] The common approach to solving the capacity balancing problem between OSS systems is to trigger a capacity alarm when the OSS system in the storage pool is about to be full, so that maintenance personnel can manually trigger data migration between OSS systems to balance the data between the OSS systems or expand the storage pool.
[0003] However, current capacity balancing solutions only use OSS write capacity as a reference for capacity balancing, and maintenance personnel need to manually trigger migration commands based on the data write activity of the storage pool. Manually triggering migration commands cannot achieve timely and effective capacity balancing, and migrating data based solely on OSS write capacity can also impact business performance under heavy business pressure. In other words, the relevant technologies suffer from low data migration efficiency.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides a data migration method and apparatus, storage medium and electronic device to at least solve the problem of low data migration efficiency in related technologies.
[0006] According to one embodiment of this application, a data migration method is provided, comprising: identifying OSSes in a distributed storage service set whose capacity utilization rate is greater than a first threshold as first OSSes, wherein the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSSes are used to provide data read and write services to at least one client; obtaining a first capacity utilization rate of the first OSS and a capacity utilization rate difference between it and a second capacity utilization rate of at least one second OSS in the distributed storage service set, wherein the second OSSes are other OSSes in the distributed storage service set besides the first OSS; if at least one capacity utilization rate difference includes at least one target capacity utilization rate difference greater than or equal to the second threshold, identifying the second OSS corresponding to each of the at least one target capacity utilization rate difference as a target OSS; and migrating object data stored in the first OSS to the storage space corresponding to the at least one target OSS according to a migration coefficient matched with the target OSS.
[0007] According to another aspect of the embodiments of this application, a data migration apparatus is also provided, comprising: a first determining unit, which determines OSSes in a distributed storage service set whose capacity utilization rate is greater than a first threshold as first OSSes, wherein the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSSes are used to provide data read and write services to at least one client; an obtaining unit, which obtains the capacity utilization rate difference between the first capacity utilization rate of the first OSS and the second capacity utilization rate of at least one second OSS in the distributed storage service set, wherein the second OSSes are other OSSes in the distributed storage service set besides the first OSS; a second determining unit, which determines the second OSSes corresponding to the at least one target capacity utilization rate difference as target OSSes when the at least one capacity utilization rate difference includes at least one target capacity utilization rate difference greater than or equal to the second threshold; and a migration unit, which migrates object data stored in the first OSSes to the storage space corresponding to the at least one target OSS according to a migration coefficient matched with the target OSSes.
[0008] Optionally, the aforementioned migration unit includes: a third determining module, configured to sum all target capacity utilization differences to obtain the sum of capacity utilization differences; determine the ratio of the target capacity utilization difference matched with the target OSS to the sum of capacity utilization differences as the migration factor matched with the target OSS; and use the product of the migration factor matched with the target OSS and the influence factor matched with the target OSS as the migration coefficient matched with the target OSS, wherein the influence factor is used to indicate the frequency of migration operations performed by the target OSS.
[0009] Optionally, the third determining module mentioned above includes: a second obtaining module, used to obtain the total migration data volume matched with the first OSS; determine the reference migration data volume matched with each target OSS based on the product of the total migration data volume and the migration coefficient matched with each target OSS; and migrate the data matched with the reference migration volume to the storage space corresponding to at least one target OSS.
[0010] Optionally, the third determining module mentioned above includes: a fourth determining module, used to determine the migration strategy level corresponding to each natural time node based on the historical migration results, wherein the historical migration results are used to indicate the processing pressure of performing data migration tasks at each historical time node, and the migration strategy level is used to indicate the operational performance level of performing data migration tasks; obtain the migration strategy level corresponding to the current time node, and migrate data to the storage space corresponding to the target OSS according to the migration strategy level corresponding to the current time node.
[0011] Optionally, the fourth determining module mentioned above includes: a fifth determining module, used to obtain the amount of migration data from the first OSS to each target OSS at each historical time node, and the influence factor matching each target OSS at each historical time node; based on the influence factor matching each target OSS at each historical time node, to perform weighted averaging on the amount of migration data matching at least one target OSS at multiple historical time nodes corresponding to the same natural time node, to obtain the average migration quantity matching each natural time node; and to determine the migration strategy level matching each natural time node based on the magnitude of the average migration quantity corresponding to each natural time node.
[0012] Optionally, the migration unit is further configured to: interrupt the data migration operation performed by the first OSS to the storage space corresponding to the target OSS that meets the migration termination condition if the capacity utilization difference between the target OSS and the first OSS is less than a third threshold during the first time interval; and interrupt the data migration operation performed by the first OSS to the storage space corresponding to all target OSSes if the migration pressure value of the data migration operation is greater than a fourth threshold during the first time interval, wherein the migration pressure value is used to indicate the operational pressure of performing the data migration operation.
[0013] Optionally, the migration unit is further configured to: obtain a migration pressure value matching the data migration operation after the second time interval; determine the second OSS that meets the migration recovery conditions as the updated OSS if the migration pressure value is less than the fifth threshold and there is a second OSS in the distributed storage service set whose capacity utilization difference with the first capacity utilization rate is greater than the second threshold; determine a migration coefficient matching each updated OSS, wherein the migration coefficient is the product of a migration factor and an influence factor, the migration factor indicating the extent to which the updated OSS can receive migrated data and the influence factor indicating the frequency with which the updated OSS performs migration operations; determine a reference migration data volume matching each updated OSS based on the product of the migration coefficient matching each updated OSS and the total amount of data already stored in the first OSS; and migrate data to the updated OSS matching the reference migration data volume.
[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described data migration method at runtime.
[0015] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data migration method described above.
[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to execute the data migration method described above through the computer program.
[0017] This application first identifies OSSes in the distributed storage service set whose capacity utilization rate exceeds a first threshold as first OSSes. Then, it obtains the capacity utilization rate difference between the first OSS's first capacity utilization rate and the second capacity utilization rate of at least one second OSS in the distributed storage service set, where the second OSSes are all OSSes in the distributed storage service set other than the first OSS. If at least one capacity utilization rate difference includes at least one target capacity utilization rate difference greater than or equal to the second threshold, the second OSS corresponding to each of the at least one target capacity utilization rate difference is identified as a target OSS. Based on a migration coefficient matched with the target OSS, object data stored in the first OSS is migrated to the storage space corresponding to at least one target OSS, thus realizing the determination of data migration capacity thresholds based on the capacity utilization rate differences of each OSS. This disperses and migrates data from OSSes with high capacity utilization rates to different OSSes, solving the technical problem of low data migration efficiency caused by the inability to effectively and timely balance capacity due to manually triggered migration commands in related technologies. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 This is a hardware structure block diagram of a server device for a data migration method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart of a data migration method according to an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of a data migration method according to an embodiment of this application;
[0022] Figure 4This is a flowchart of another data migration method according to an embodiment of this application;
[0023] Figure 5 This is a schematic diagram of the structure of a data migration device according to an embodiment of this application;
[0024] Figure 6 This is a schematic diagram of the structure of a data migration electronic device according to an embodiment of this application. Detailed Implementation
[0025] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0027] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a data migration method according to an embodiment of this application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0028] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data migration method in this embodiment. The processor 102 executes various functional applications and data migration operations by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0030] As an optional implementation method, such as Figure 2 As shown, the above data migration method includes:
[0031] S202, the OSS with a capacity utilization rate greater than the first threshold in the distributed storage service collection is identified as the first OSS, wherein the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSS is used to provide data read and write services for at least one client.
[0032] S204, obtain the first capacity utilization rate of the first OSS and the capacity utilization rate difference between the first capacity utilization rate and the second capacity utilization rate of at least one second OSS in the distributed storage service set, wherein the second OSS is any other OSS in the distributed storage service set other than the first OSS;
[0033] S206, if at least one target capacity utilization difference is included in at least one capacity utilization difference that is greater than or equal to the second threshold, the second OSS corresponding to each of the at least one target capacity utilization difference shall be determined as the target OSS.
[0034] S208, based on the migration coefficient matched with the target OSS, migrate the object data stored in the first OSS to the storage space corresponding to at least one target OSS.
[0035] As an optional implementation, in step S202, the OSS with a capacity utilization rate greater than a first threshold in the distributed storage service set is determined as the storage space corresponding to the first OSS, wherein the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSS is used to provide data read and write services for at least one client.
[0036] It should be noted that in a distributed storage system, the storage pool's storage space consists of multiple Object Storage Services (OSSes) across multiple nodes. Optionally, a timed statistics method can be used, with the capacity monitoring module calculating the capacity of each OSS in the storage pool every 10 minutes and checking the used capacity of each OSS. Specifically, the first determining unit in the capacity monitoring module determines the capacity utilization rate of each OSS based on the ratio of used capacity to total capacity. OSSes with a capacity utilization rate greater than a first threshold in the distributed storage service collection are identified as the first OSS. The first threshold can be dynamically determined based on factors such as the current size and growth trend of storage demand, or the importance of the business and its dependence on storage. It should also be noted that the OSS (Object Storage Service) is responsible for storing data and responding to client read and write requests.
[0037] In step S204, the first capacity utilization rate of the first OSS is obtained, and the capacity utilization rate difference between it and the second capacity utilization rate of at least one second OSS in the distributed storage service set is obtained, wherein the second OSS is any other OSS in the distributed storage service set other than the first OSS.
[0038] As an optional implementation, the capacity utilization rates of each OSS can be compared pairwise to obtain a set of capacity utilization rate difference data for each OSS. For example, multiple arrays of capacity utilization rate difference between the second OSS and the first OSS can be obtained as [rate_a_b, rate_a_c, ..., rate_a_n].
[0039] Further in step S206, if at least one target capacity utilization difference is included in at least one capacity utilization difference that is greater than or equal to the second threshold, the second OSS corresponding to each of the at least one target capacity utilization difference is determined as the target OSS.
[0040] As an optional implementation, the capacity utilization difference between OSSes can be compared with a set threshold. For example, the capacity utilization difference threshold between OSSes can be set to 10%. If it is determined whether a subsequent capacity balancing operation is triggered, the second OSS with a capacity utilization difference greater than 10% is identified as the target OSS. The aforementioned capacity utilization difference threshold can be dynamically adjusted or a static fixed value.
[0041] Optionally, in step S208, the object data stored in the first OSS is migrated to at least one target OSS according to the migration coefficient matched with the target OSS.
[0042] In some embodiments, for example, suppose there are three storage units A, B, and C with capacities of 100GB, 200GB, and 300GB, respectively, performance of 100MB / s, 150MB / s, and 200MB / s, and reliability of 90%, 95%, and 98%, respectively. Now, a total of 500GB of data needs to be migrated to these three storage units.
[0043] The migration coefficients mentioned above can be determined by allocating weights based on the capacity and performance of the storage units. For example, the weights can be allocated according to the ratio of capacity to performance, i.e., the weight of storage unit A is 1 (100GB / 100MB / s), the weight of storage unit B is 1.33 (200GB / 150MB / s), and the weight of storage unit C is 1.5 (300GB / 200MB / s). The migration coefficients are determined according to the weight ratio of each unit, that is, 500GB of data is allocated to storage units according to the weight ratio. The reliability of each OSS can also be further considered to ultimately achieve a balanced and efficient data migration.
[0044] As an optional implementation, an OSS with a capacity utilization difference greater than 10% from the first OSS is selected as the second OSS for receiving data. It should be noted that data can be migrated directly to all second OSSes or a certain range of OSSes can be selected. For example, 20% of the second OSSes in the distributed storage service set can be selected as the second OSS for receiving data, or an OSS on a specific node in the distributed storage service set can be selected as the second OSS for receiving data. This is just one example.
[0045] The above-described implementation method described in this application, after detecting that the capacity imbalance of OSS in the storage pool reaches a set threshold, determines the migration range and data volume, and performs data migration according to the established data migration strategy, so that the capacity of each OSS in the storage pool is balanced again, reducing the impact of excessive capacity of individual OSS in the storage pool on data writing, and increasing the robustness of the cluster.
[0046] In one optional implementation, before migrating object data stored in the first OSS to the storage space corresponding to at least one target OSS according to a migration coefficient matched with the target OSS, the process includes:
[0047] S1, sum the differences in capacity utilization rates for all target capacity utilization rates to obtain the sum of capacity utilization rate differences;
[0048] S2, the ratio of the difference in target capacity utilization rate to the sum of the differences in capacity utilization rate to the target OSS is determined as the migration factor for matching the target OSS;
[0049] S3, the product of the migration factor matched with the target OSS and the influence factor matched with the target OSS is used as the migration coefficient matched with the target OSS, where the influence factor is used to indicate the frequency of migration operations performed by the target OSS.
[0050] Optionally, in step S1 above, the sum of all target capacity utilization differences is obtained by summing the capacity utilization differences.
[0051] For example, there are 7 second OSSs that need to receive data. The difference in capacity utilization between them and the first OSS is rate_1, rate_2, ..., rate_7. The sum of all the differences in capacity utilization is calculated, for example, rate_1 + rate_2, ..., rate_7 = B.
[0052] In step S2, the ratio of the difference in target capacity utilization rate to the sum of the differences in capacity utilization rate is determined as the migration factor for matching the target OSS.
[0053] Optionally, for example, the migration factors matched with each second OSS are (rate_1) / B, (rate_2) / B…(rate_7) / B.
[0054] In step S3, the product of the migration factor matched with the target OSS and the influence factor matched with the target OSS is used as the migration coefficient matched with the target OSS, wherein the influence factor is used to indicate the frequency of the target OSS performing migration operations.
[0055] The aforementioned influencing factors can be determined, but are not limited to, by the following methods: for example, the data in storage unit A and storage unit B have different frequencies of access. The data in storage unit A has a high frequency of access and is frequently accessed and updated, while the data in storage unit B has a low frequency of access and is rarely accessed and updated.
[0056] In this scenario, an impact factor can be determined based on the frequency of data migration, affecting the amount of data migrated in each unit. For example, the impact factor for storage unit A can be set to 1.5, indicating that its data migration volume is 1.5 times that of normal; while the impact factor for storage unit B can be set to 0.5, indicating that its data migration volume is only half that of normal.
[0057] Then, the product of the aforementioned influence factor and the aforementioned migration factor is calculated to obtain the migration coefficient matching the target OSS. For example, if the migration factor of storage unit A is (rate_1) / B and the influence factor is 1.5, then the migration coefficient matching storage unit A is 1.5. (rate_1) / B is just one example.
[0058] Through the above implementation method, the ratio of the difference in target capacity utilization rate to the sum of the differences in capacity utilization rate is determined as the migration factor for matching the target OSS. Then, the product of the migration factor for matching the target OSS and the influence factor for matching the target OSS is used as the migration coefficient for matching the target OSS. The amount of data migration can be adjusted according to the data frequency of different storage units to achieve a more reasonable data migration scheme and improve the efficiency and accuracy of data migration.
[0059] In one optional implementation, based on a migration coefficient matched with the target OSS, object data stored in the first OSS is migrated to the storage space corresponding to at least one target OSS, including:
[0060] S1, obtain the total migration data volume matched with the first OSS;
[0061] S2, determine the reference migration data volume matching each target OSS based on the product of the total migration data volume and the migration coefficient matching each target OSS;
[0062] S3, migrate the data of the reference migration quantity that matches the target OSS to the storage space corresponding to at least one target OSS.
[0063] Optionally, in steps S1-S3 above, the total migration data volume matched with the first OSS is obtained; the reference migration data volume matched with each target OSS is determined based on the product of the total migration data volume and the migration coefficient matched with each target OSS; and the data of the reference migration volume matched with at least one target OSS is migrated to at least one target OSS.
[0064] As an optional implementation, assuming the total amount of data to be migrated is A, the amount of source data in the storage pool that matches the first OSS is 36, for example, the amount of data to be migrated is 20% of the total number, the number of destination OSSes rounded down is 7, the utilization rate differences of the 7 OSSes from largest to smallest are [rate_1, rate_2...rate_7], the sum of the utilization rate differences of the 7 OSSes is B, and the migration coefficient matching each second OSS is (rate_1) / B, (rate_2) / B...(rate_7) / B; the amount of data migrated to each second OSS is A. (rate_1) / B、A (rate_2) / B…A (rate_7) / B.
[0065] Through the above-described embodiments of this application, a reference migration data volume matching each target OSS is determined based on the product of the total migration data volume and the migration coefficient matching each target OSS; data matching the reference migration volume is migrated to at least one target OSS, thereby making better use of storage resources and avoiding resource waste or shortage.
[0066] In one optional implementation, after multiplying the migration factor matching the target OSS and the influence factor matching the target OSS as the migration coefficient matching the target OSS, the process includes:
[0067] S1. Determine the migration strategy level corresponding to each natural time node based on the historical migration results. The historical migration results are used to indicate the processing pressure of performing data migration tasks at each historical time node, and the migration strategy level is used to indicate the operational performance level of performing data migration tasks.
[0068] S2, obtain the migration strategy level corresponding to the current time node, and migrate the data to the storage space corresponding to the target OSS according to the migration strategy level corresponding to the current time node.
[0069] Optionally, in steps S1-S2 above, the migration strategy level corresponding to each natural time node is determined based on the historical migration results. The historical migration results are used to indicate the processing pressure of performing data migration tasks at each historical time node, and the migration strategy level is used to indicate the operational performance level of performing data migration tasks. The migration strategy level corresponding to the current time node is obtained, and data is migrated to the target OSS according to the migration strategy level corresponding to the current time node.
[0070] As an optional implementation, the data migration strategy employs a configurable migration strategy to determine the time allocation and performance of migration operations, minimizing the impact of migration operations on front-end system services. Configurable migration strategies include: Prioritizing Front-End Applications: Using a set minimum migration rate, which can be selected when system service pressure is high; Fixed Bandwidth Threshold Migration: Setting the maximum bandwidth during migration ensures the migration operation speed remains within a controllable range, minimizing the impact on front-end services; Fixed IOPS Threshold Migration: Setting the maximum IOPS during migration ensures the migration operation speed remains within a controllable range, minimizing the impact on front-end services; Fixed Time Period Migration: Setting the migration time period, selecting a time period with lower system service pressure based on the system service model for migration operations.
[0071] It should be noted that when using a fixed-time migration strategy, multiple different migration periods can be set, and each migration period can have a separate migration performance strategy (setting a fixed migration rate, setting a fixed bandwidth threshold, or setting a fixed IOPS threshold).
[0072] Optionally, for example, if the server has fewer tasks and less pressure on data migration tasks between 10 pm and 12 am, a migration strategy with high migration bandwidth, migration rate, and IOPS threshold levels can be used to perform data migration operations on each target OSS. If the server has more tasks and more pressure on data migration tasks between 11 am and 12 pm, a migration strategy with low migration bandwidth, migration rate, and IOPS threshold levels can be used to perform data migration operations on each target OSS.
[0073] Through the above-described embodiments of this application, migration strategies with different cluster service pressure quotas can be used to determine the time allocation and migration performance of migration operations, reduce the impact of migration operations on the front-end services of the system, and minimize the impact of data migration actions on ongoing business data read and write operations when capacity is unbalanced through flexible migration strategies.
[0074] In one optional implementation, before determining the migration strategy level corresponding to each natural time point based on historical migration results, the following steps are included:
[0075] S1, obtain the amount of migrated data from the first OSS to each target OSS at each historical time point, and the influence factor matched with each target OSS at each historical time point;
[0076] S2, based on the influence factors that match each target OSS at each historical time node, perform a weighted average on the migration data that matches at least one target OSS at multiple historical time nodes corresponding to the same natural time node to obtain the average migration number that matches each natural time node.
[0077] S3, determine the migration strategy level that matches each natural time node based on the average number of migrations corresponding to each natural time node.
[0078] In steps S1-S2 above, the amount of migration data from the first OSS to each target OSS at each historical time node is obtained, as well as the influence factor matching each target OSS at each historical time node; based on the influence factor matching each target OSS at each historical time node, the amount of migration data matching at least one target OSS at multiple historical time nodes corresponding to the same natural time node is weighted and averaged to obtain the average migration number matching each natural time node.
[0079] As an optional implementation, for example, the amount of migration data received by each target OSS during the time periods of 10:00 AM to 12:00 PM and 2:00 PM to 4:00 PM for each day of a historical week can be obtained. Based on the size and growth trend of storage demand in historical statistics, or the importance of business and the degree of dependence on storage, the weights corresponding to Monday to Sunday can be determined as 0.1, 0.15, 0.2, 0.25, 0.2, 0.15, and 0.1, respectively. Then, the migration data volume during the time periods of 10:00 AM to 12:00 PM and 2:00 PM to 4:00 PM for each day can be weighted and summed to obtain the average migration volume corresponding to the time periods of 10:00 AM to 12:00 PM and 2:00 PM to 4:00 PM, respectively. This is only one example.
[0080] Then, in step S3 above, the migration strategy level matching each natural time node is determined based on the magnitude of the average number of migrations corresponding to each natural time node.
[0081] Optionally, if the average number of migrations during the period from 10:00 AM to 12:00 PM is greater than the average number of migrations during the period from 2:00 PM to 4:00 PM, then the migration strategy during the period from 10:00 AM to 12:00 PM can be determined as a high-level migration strategy, and the migration strategy during the period from 2:00 PM to 4:00 PM can be determined as a low-level migration strategy. No specific restrictions are imposed here.
[0082] Through the above-described embodiments of this application, the amount of migration data from the first OSS to each target OSS at each historical time node is obtained, as well as the influence factor matching each target OSS at each historical time node. Then, based on the influence factor matching each target OSS at each historical time node, a weighted average is performed on the amount of migration data matching at least one target OSS at multiple historical time nodes corresponding to the same natural time node to obtain the average migration quantity matching each natural time node. This realizes the determination of the migration strategy level matching each natural time node based on the size of the average migration quantity corresponding to each natural time node. During peak periods or critical business operations, adopting a more efficient migration method can reduce system downtime and data loss risk, and improve system stability and reliability. During off-peak periods or non-critical business operations, a more economical migration method can be adopted to save resources and costs.
[0083] In one alternative implementation, migrating object data stored in a first OSS to at least one target OSS based on a migration coefficient matched with the target OSS includes:
[0084] S1, if it is detected that the capacity utilization difference between the target OSS and the first OSS is less than the third threshold during the first time interval, the data migration operation of the first OSS to the storage space corresponding to the target OSS that meets the migration termination condition is interrupted. The migration termination condition is that the capacity utilization difference is less than the third threshold.
[0085] S2, if the migration pressure value of the data migration operation is detected to be greater than the fourth threshold within the first time interval, the data migration operation of the first OSS to the storage space corresponding to all target OSS is interrupted. The migration pressure value is used to indicate the operation pressure of performing the data migration operation.
[0086] In step S1 above, if it is detected that the capacity utilization difference between the target OSS and the first OSS is less than the third threshold within the first time interval, the data migration operation from the first OSS to the target OSS that meets the migration termination condition is interrupted. The migration termination condition is that the capacity utilization difference is less than the third threshold.
[0087] It should be noted that the aforementioned third threshold can be dynamically determined based on factors such as network bandwidth, network stability, system performance, and load conditions.
[0088] Optionally, since system services are running simultaneously during data migration between OSS servers, a data migration interruption mechanism is implemented to prevent the data write ratio difference between OSS servers from widening during the migration process. OSS capacity monitoring is continuously performed during data migration, and the capacity utilization difference between each OSS server is compared. A data migration interruption threshold is set to 1%. When the capacity utilization difference between the two OSS servers undergoing data migration is less than 1%, a capacity balancing migration interruption operation is triggered, halting the data migration between these two OSS servers.
[0089] In step S2 above, if the migration pressure value of the data migration operation is detected to be greater than the fourth threshold within the first time interval, the data migration operation from the first OSS to all target OSS is interrupted. The migration pressure value is used to indicate the operational pressure of performing the data migration operation.
[0090] It should be noted that during the data migration process, the system's read and write data are collected in real time. When the system's business read and write performance data (IOPS, bandwidth) exceeds 70% of the system's performance limit, it is determined that the current business pressure on the system is too high and it is not suitable to carry out data migration operations. All data migration operations in the storage pool are interrupted, and the data migration operation is carried out again when the system business pressure is lower.
[0091] The migration interruption mechanism described in this application determines whether the data migration operation is interrupted if the difference in capacity utilization of each OSS and the system read / write IOPS and bandwidth values are exceeded. This ensures that the migration operation is carried out within a safe range and reduces the impact of the migration operation on the system's front-end services.
[0092] In one alternative implementation, after interrupting the data migration operation from the first OSS to all target OSSes, the process includes:
[0093] S1, after the second time interval, obtain the migration pressure value that matches the data migration operation;
[0094] S2, if the migration pressure value is less than the fifth threshold and there is a second OSS in the distributed storage service set whose capacity utilization difference with the first capacity utilization rate is greater than the second threshold, the second OSS that meets the migration recovery conditions is determined to be the updated OSS, wherein the migration recovery conditions are that the migration pressure value is less than the fifth threshold and the difference in capacity utilization rate between OSSes is greater than the second threshold.
[0095] S3, determine the migration coefficient that matches each updated OSS, where the migration coefficient is the product of the migration factor and the influence factor. The migration factor is used to indicate the extent to which the updated OSS can receive migrated data, and the influence factor is used to indicate how frequently the updated OSS performs migration operations.
[0096] S4. Determine the reference migration data volume that matches each updated OSS based on the product of the migration coefficient that matches each updated OSS and the total amount of data already stored in the first OSS.
[0097] S5, migrate data to the matching updated OSS based on the reference migration data volume. Optionally, the second time interval can be a dynamic or static time period determined based on the migration performance of the current system, and the fifth threshold can be a value equal to or different from the third threshold.
[0098] As an optional implementation, the system performance judgment threshold is set to 50%. When the system business read and write performance data (IOPS, bandwidth) is less than 50% of the system performance limit, the migration operation is triggered again when the capacity used between OSS is detected to have reached the migration judgment threshold.
[0099] The above process is described below using a specific implementation method:
[0100] After 10 seconds, the system pressure value of the current data migration module is retrieved again. If the system has a small workload for other tasks besides the migration operation, and thus has sufficient performance to handle the data migration task, the migration pressure value is less than the fifth threshold.
[0101] Furthermore, if there is a first OSS in the distributed storage service collection with a capacity utilization rate greater than the first threshold, and a second OSS with a capacity utilization rate difference between it and the first OSS greater than the second threshold, that is, if the migration recovery conditions are met, then the second OSS that meets the migration recovery conditions is determined to be the update OSS.
[0102] Further determine the migration coefficients that match the updated OSS. The migration coefficients are the product of a migration factor that indicates the extent to which a storage unit can receive migrated data and an influence factor that indicates the frequency with which a storage unit performs migration operations.
[0103] Therefore, based on the product of the migration coefficient matched with each updated OSS receiving the migration data and the total amount of data already stored in the first OSS, the reference migration data amount matched with each updated OSS is determined; thus, data is migrated to the OSS according to the dynamically determined migration data amount matched with each received data OSS.
[0104] Through the above-described embodiments of this application, the data migration operation is re-executed through the migration recovery mechanism described in the above steps. When the system load pressure is detected to be too high, the system load pressure is reduced, and the system performance is prevented from degrading or even crashing due to excessive load. In the event of migration interruption, the system can also use the migration recovery mechanism to automatically resume the migration operation, avoiding manual intervention, reducing system downtime, and improving system stability and reliability.
[0105] Data migration architecture diagram as follows Figure 3 As shown, it includes a user management module, a migration strategy module, and a data migration module. The data migration module includes OSS capacity monitoring, determination of the migration destination OSS, and data migration within the pool;
[0106] The user management module sets the migration strategy used when migrating data.
[0107] The migration strategy module stores the migration strategies and related parameters set by the user.
[0108] The data migration module monitors OSS capacity and determines the destination OSS and performs subsequent data migration within the pool when there are significant differences in capacity usage between OSSes.
[0109] The following combination Figure 4 This section describes a complete data migration method.
[0110] S402, Monitor OSS Capacity; Specifically, after the storage pool is successfully created, start periodically monitoring the OSS usage capacity within the storage pool.
[0111] S404, compare the capacity utilization rates of each OSS; as an optional implementation, calculate the capacity utilization rate of each OSS after each capacity usage. When there is a single OSS with a capacity utilization rate rate-a>60, compare the difference in capacity utilization rates among the OSSes.
[0112] S406, Has the capacity balance condition been met? For example, it could be to determine if there is a capacity utilization difference between OSS locations > 10%. If there is no capacity utilization difference between OSS locations > 10%, continue capacity monitoring and execute S402.
[0113] If the balance condition is met, proceed to step S408 to determine the migration range; for example, it could be 20% of the number of OSSes in the storage pool; otherwise, return to step S402.
[0114] S410, Determine the amount of data that needs to be migrated for each OSS;
[0115] S412, obtain migration strategy; call the data migration strategy stored in the migration strategy module.
[0116] S414, Migrate Data; Migrate data according to the migration strategy.
[0117] S416, whether the migration interruption conditions are met; for example, monitor the capacity data and system performance data between OSS to determine whether the migration needs to be interrupted.
[0118] If the migration interruption conditions are not met during the migration process, the data will be migrated to the end according to the preset data migration amount, that is, S418 will be executed to migrate to the end of the set data migration amount.
[0119] If the interrupt conditions are met, execute S420 to migrate the interrupt.
[0120] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0121] According to another aspect of the embodiments of this application, a data migration apparatus for implementing the above-described data migration method is also provided. For example... Figure 5 As shown, the device includes:
[0122] The first determining unit 502 determines the OSS in the distributed storage service set whose capacity utilization rate is greater than a first threshold as the first OSS, wherein the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSS is used to provide data read and write services for at least one client.
[0123] The acquisition unit 504 acquires the first capacity utilization rate of the first OSS and the capacity utilization rate difference between the first capacity utilization rate of the first OSS and the second capacity utilization rate of at least one second OSS in the distributed storage service set, wherein the second OSS is any other OSS in the distributed storage service set other than the first OSS.
[0124] The second determining unit 506 determines the second OSS corresponding to each of the at least one target capacity utilization difference as the target OSS when at least one capacity utilization difference includes at least one target capacity utilization difference that is greater than or equal to the second threshold.
[0125] Migration unit 508 migrates object data stored in the first OSS to the storage space corresponding to at least one target OSS according to the migration coefficient matched with the target OSS.
[0126] Optionally, the aforementioned migration unit includes: a third determining module, configured to sum all target capacity utilization differences to obtain the sum of capacity utilization differences; determine the ratio of the target capacity utilization difference matched with the target OSS to the sum of capacity utilization differences as the migration factor matched with the target OSS; and use the product of the migration factor matched with the target OSS and the influence factor matched with the target OSS as the migration coefficient matched with the target OSS, wherein the influence factor is used to indicate the frequency of migration operations performed by the target OSS.
[0127] Optionally, the third determining module mentioned above includes: a second obtaining module, used to obtain the total migration data volume matched with the first OSS; determine the reference migration data volume matched with each target OSS based on the product of the total migration data volume and the migration coefficient matched with each target OSS; and migrate the data matched with the reference migration volume to the storage space corresponding to at least one target OSS.
[0128] Optionally, the third determining module mentioned above includes: a fourth determining module, used to determine the migration strategy level corresponding to each natural time node based on the historical migration results, wherein the historical migration results are used to indicate the processing pressure of performing data migration tasks at each historical time node, and the migration strategy level is used to indicate the operational performance level of performing data migration tasks; obtain the migration strategy level corresponding to the current time node, and migrate data to the storage space corresponding to the target OSS according to the migration strategy level corresponding to the current time node.
[0129] Optionally, the fourth determining module mentioned above includes: a fifth determining module, used to obtain the amount of migration data from the first OSS to each target OSS at each historical time node, and the influence factor matching each target OSS at each historical time node; based on the influence factor matching each target OSS at each historical time node, to perform weighted averaging on the amount of migration data matching at least one target OSS at multiple historical time nodes corresponding to the same natural time node, to obtain the average migration quantity matching each natural time node; and to determine the migration strategy level matching each natural time node based on the magnitude of the average migration quantity corresponding to each natural time node.
[0130] Optionally, the migration unit is further configured to: interrupt the data migration operation performed by the first OSS to the storage space corresponding to the target OSS that meets the migration termination condition if the capacity utilization difference between the target OSS and the first OSS is less than a third threshold during the first time interval; and interrupt the data migration operation performed by the first OSS to the storage space corresponding to all target OSSes if the migration pressure value of the data migration operation is greater than a fourth threshold during the first time interval, wherein the migration pressure value is used to indicate the operational pressure of performing the data migration operation.
[0131] Optionally, the migration unit is further configured to: obtain a migration pressure value matching the data migration operation after the second time interval; determine the second OSS that meets the migration recovery conditions as the updated OSS if the migration pressure value is less than the fifth threshold and there is a second OSS in the distributed storage service set whose capacity utilization difference with the first capacity utilization rate is greater than the second threshold; determine a migration coefficient matching each updated OSS, wherein the migration coefficient is the product of a migration factor and an influence factor, the migration factor indicating the extent to which the updated OSS can receive migrated data and the influence factor indicating the frequency with which the updated OSS performs migration operations; determine a reference migration data volume matching each updated OSS based on the product of the migration coefficient matching each updated OSS and the total amount of data already stored in the first OSS; and migrate data to the updated OSS matching the reference migration data volume.
[0132] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described data migration method in a memory is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses a mobile phone or computer as an example for illustration. Figure 6As shown, the electronic device includes a memory 602 and a processor 604. The memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments via the computer program.
[0133] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0134] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0135] S1, the OSS with a capacity utilization rate greater than the first threshold in the distributed storage service set is identified as the first OSS, where the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSS is used to provide data read and write services for at least one client.
[0136] S2, obtain the first capacity utilization rate of the first OSS and the capacity utilization rate difference between the first capacity utilization rate and the second capacity utilization rate of at least one second OSS in the distributed storage service set, wherein the second OSS is any other OSS in the distributed storage service set other than the first OSS;
[0137] S3, if at least one target capacity utilization difference is included in at least one capacity utilization difference that is greater than or equal to the second threshold, the second OSS corresponding to each of the at least one target capacity utilization difference is determined as the target OSS.
[0138] S4. Based on the migration coefficient matching the target OSS, migrate the object data stored in the first OSS to the storage space corresponding to at least one target OSS.
[0139] Alternatively, as those skilled in the art will understand, Figure 6 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 6 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 6 The different configurations shown.
[0140] The memory 602 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data migration method and apparatus in this embodiment. The processor 604 executes various functional applications and data migration by running the software programs and modules stored in the memory 602, thereby realizing the aforementioned data migration method. The memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 602 may further include memory remotely located relative to the processor 604, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 602 may be used, but is not limited to, to store information such as page elements and page styles. As an example, such as... Figure 6 As shown, the memory 602 may include, but is not limited to, the first determining unit 502, the obtaining unit 504, the second determining unit 506, and the migration unit 508 in the data migration device. Furthermore, it may include, but is not limited to, other module units in the data migration device, which will not be elaborated upon in this example.
[0141] Optionally, the transmission device 606 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 606 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 606 is a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0142] In addition, the above-mentioned electronic device also includes: a display 608; and a connection bus 610 for connecting the various module components in the above-mentioned electronic device.
[0143] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a point-to-point network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this point-to-point network.
[0144] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above;
[0145] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0146] S1, the OSS with a capacity utilization rate greater than the first threshold in the distributed storage service set is identified as the first OSS, where the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSS is used to provide data read and write services for at least one client.
[0147] S2, obtain the first capacity utilization rate of the first OSS and the capacity utilization rate difference between the first capacity utilization rate and the second capacity utilization rate of at least one second OSS in the distributed storage service set, wherein the second OSS is any other OSS in the distributed storage service set other than the first OSS;
[0148] S3, if at least one target capacity utilization difference is included in at least one capacity utilization difference that is greater than or equal to the second threshold, the second OSS corresponding to each of the at least one target capacity utilization difference is determined as the target OSS.
[0149] S4. Based on the migration coefficient matching the target OSS, migrate the object data stored in the first OSS to the storage space corresponding to at least one target OSS.
[0150] Optionally, in embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0151] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0152] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.
[0153] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0154] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0155] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0156] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0157] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
[0158] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0159] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0160] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0161] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0162] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0163] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0164] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0165] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0166] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0167] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0168] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A data migration method, characterized in that, include: The OSS with a capacity utilization rate greater than a first threshold in the distributed storage service collection is identified as the first OSS, wherein the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSS is used to provide data read and write services for at least one client. Obtain the first capacity utilization rate of the first OSS and the capacity utilization rate difference between the first capacity utilization rate of the first OSS and the second capacity utilization rate of each of at least one second OSS in the distributed storage service set, wherein the second OSS is any other OSS in the distributed storage service set other than the first OSS; If at least one of the capacity utilization differences includes at least one target capacity utilization difference that is greater than or equal to the second threshold, the second OSS corresponding to each of the at least one target capacity utilization difference shall be determined as the target OSS; The sum of all the target capacity utilization differences is obtained by summing them. The ratio of the difference in target capacity utilization rate that matches the target OSS to the sum of the differences in capacity utilization rate is determined as the migration factor that matches the target OSS; The product of the migration factor that matches the target OSS and the influence factor that matches the target OSS is used as the migration coefficient that matches the target OSS, wherein the influence factor is used to indicate the frequency with which the target OSS performs migration operations; Based on the migration coefficient matched with the target OSS, the object data stored in the first OSS is migrated to at least one storage space corresponding to the target OSS.
2. The method according to claim 1, characterized in that, The step of migrating object data stored in the first OSS to at least one storage space corresponding to the target OSS based on a migration coefficient matched with the target OSS includes: Obtain the total migration data volume that matches the first OSS; The reference migration data volume matching each target OSS is determined by multiplying the total migration data volume by the migration coefficient matching each target OSS. Migrate data of the reference migration amount that matches the target OSS to at least one of the storage spaces corresponding to the target OSS.
3. The method according to claim 1, characterized in that, The step of multiplying the migration factor matching the target OSS and the influence factor matching the target OSS as the migration coefficient matching the target OSS includes: The migration strategy level corresponding to each natural time node is determined based on the historical migration results, wherein the historical migration results are used to indicate the processing pressure of performing the data migration task at each historical time node, and the migration strategy level is used to indicate the operational performance level of performing the data migration task. Obtain the migration strategy level corresponding to the current time node, and migrate the data to the storage space corresponding to the target OSS according to the migration strategy level corresponding to the current time node.
4. The method according to claim 3, characterized in that, Before determining the migration strategy level corresponding to each natural time node based on historical migration results, the following steps are included: Obtain the amount of migrated data from the first OSS to each target OSS at each historical time point, and the influence factor that matches each target OSS at each historical time point; Based on the influence factor that matches each target OSS at each historical time node, the migration data volume that matches at least one target OSS at multiple historical time nodes corresponding to the same natural time node is weighted and averaged to obtain the average migration number that matches each natural time node. The migration strategy level matching each natural time node is determined based on the magnitude of the average number of migrations corresponding to each natural time node.
5. The method according to claim 1, characterized in that, The step of migrating object data stored in the first OSS to at least one of the target OSSes based on a migration coefficient matched with the target OSS includes: If, during a first time interval, it is detected that the capacity utilization difference between the target OSS and the first OSS is less than a third threshold, the data migration operation from the first OSS to the storage space corresponding to the target OSS that meets the migration termination condition is interrupted, wherein the migration termination condition is that the capacity utilization difference is less than the third threshold. If the migration pressure value of the data migration operation is detected to be greater than the fourth threshold within the first time interval, the data migration operation performed by the first OSS to the storage space corresponding to all the target OSS is interrupted, wherein the migration pressure value is used to indicate the operational pressure of performing the data migration operation.
6. The method according to claim 5, characterized in that, After interrupting the data migration operation from the first OSS to the storage space corresponding to all the target OSSes, the following is included: After the second time interval, obtain the migration pressure value that matches the data migration operation; If the migration pressure value is less than the fifth threshold and there is a second OSS in the distributed storage service set whose capacity utilization difference with the first capacity utilization is greater than the second threshold, the second OSS that meets the migration recovery conditions is determined to be an updated OSS, wherein the migration recovery conditions are that the migration pressure value is less than the fifth threshold and the capacity utilization difference between the OSSes is greater than the second threshold. Determine the migration coefficient matching each of the updated OSS, wherein the migration coefficient is the product of a migration factor and an influence factor, the migration factor indicating the extent to which the updated OSS can receive migrated data, and the influence factor indicating the frequency with which the updated OSS performs migration operations; The reference migration data volume matching each updated OSS is determined by multiplying the migration coefficient matched with each updated OSS by the total amount of data already stored in the first OSS. Migrate data to the corresponding updated OSS based on the reference migration data volume.
7. A data migration device, characterized in that, include: The first determining unit determines the OSS in the distributed storage service collection whose capacity utilization rate is greater than a first threshold as the first OSS, wherein the capacity utilization rate is the ratio between the occupied storage capacity of the OSS and the total storage capacity, and the OSS is used to provide data read and write services for at least one client. The acquisition unit acquires the first capacity utilization rate of the first OSS and the capacity utilization rate difference between the first capacity utilization rate of the first OSS and the second capacity utilization rate of each of at least one second OSS in the distributed storage service set, wherein the second OSS is any other OSS in the distributed storage service set other than the first OSS. The second determining unit, in the case that at least one of the capacity utilization rate differences includes at least one target capacity utilization rate difference greater than or equal to a second threshold, determines the second OSS corresponding to each of the at least one target capacity utilization rate difference as a target OSS; sums up all the target capacity utilization rate differences to obtain a sum of capacity utilization rate differences; determines the ratio of the target capacity utilization rate difference matching the target OSS to the sum of the capacity utilization rate differences as a migration factor matching the target OSS; and multiplies the migration factor matching the target OSS and the influence factor matching the target OSS as a migration coefficient matching the target OSS, wherein the influence factor is used to indicate the frequency with which the target OSS performs migration operations. The migration unit migrates object data stored in the first OSS to at least one storage space corresponding to the target OSS, based on a migration coefficient matched with the target OSS.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 6.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 6.