Method and apparatus for allocating migration service, storage medium and electronic device

By screening the target migration devices in the data migration system and specifically executing migration tasks with high resource requirements, the problem of resource fragmentation is solved and the efficiency and stability of data migration are improved.

CN120547147BActive Publication Date: 2025-10-14JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511001936.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-10-14
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

Resource fragmentation in the existing data migration system prevents large businesses from being executed, affecting data migration efficiency and stability.

Method used

By screening target migration devices according to their resource occupancy information in the data migration system, the target migration devices are specifically used to execute migration services of target service levels with high resource requirements, thus avoiding resource fragmentation.

Benefits of technology

The data migration system has improved its efficiency in executing migration business, ensuring the smooth operation of large businesses, reducing resource waste, and improving system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120547147B_ABST
    Figure CN120547147B_ABST
Patent Text Reader

Abstract

The application discloses a migration service distribution method and device, a storage medium and an electronic device, relates to the technical field of computers, and receives a target request, wherein the target request is used for requesting a plurality of migration devices included in a data migration system to execute a target migration service; the service level of the target migration service is detected according to service classification information; in the case that the target migration service is a migration service of a target service level, a target migration device is called to execute the target migration service, wherein the target migration device is selected from the plurality of migration devices according to migration resource occupation information of the plurality of migration devices at the beginning of a current time period, and the target migration device is used to execute the migration service of the target service level in the current time period, thereby solving the technical problem of low execution efficiency of the data migration system on the migration service in the prior art, and achieving the technical effect of improving the execution efficiency of the data migration system on the migration service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for allocating migration services, a storage medium, and an electronic device. Background Art

[0002] As digitalization rapidly advances, data volumes are growing at an unprecedented rate. The storage and management of massive amounts of data are becoming a significant challenge for many businesses and organizations. Data migration, a key tool for optimizing storage resource allocation and improving data management efficiency, is becoming increasingly important. Currently, data migration technology is widely used in various fields, from enterprise data center upgrades and the widespread adoption of cloud storage to data integration within big data analytics platforms. Efficient and reliable data migration is essential.

[0003] Data migration systems typically include several agents (migration devices) for executing migration tasks. Currently, migration tasks are often allocated based on resource availability. Specifically, to ensure efficient execution of migration tasks, upon receiving a migration task, the device with the largest remaining resources is selected from among multiple migration devices to execute the task. This allocation method leads to resource fragmentation. In practice, multiple small migration tasks may be assigned to the migration device with the most available resources, resulting in the resources on that migration device being scattered and occupied by numerous small tasks. When a large task arrives, although each node has scattered idle resources, these resources cannot be aggregated to meet the needs of the large task. This fragmented resource state is known as the resource fragmentation trap, which prevents the data migration system from executing some large tasks with large volumes. This impacts the normal progress of data migration and reduces the efficiency and stability of the system. Summary of the Invention

[0004] The present application provides a method and apparatus for allocating migration services, a storage medium, and an electronic device, in order to at least solve the technical problem in the related art that the data migration system has low execution efficiency for migration services.

[0005] This application provides a method for allocating migration services, including:

[0006] receiving a target request, wherein the target request is used to request execution of a target migration service by a plurality of migration devices included in the data migration system;

[0007] detecting a service level of the target migration service according to service level information, wherein the service level information is used to indicate a requirement condition for migration device resources of a migration service of the target service level undertaken by the data migration system in a current time period, and a requirement for migration device resources of the migration service of the target service level is greater than a requirement for migration device resources of migration services of other service levels undertaken by the data migration system in the current time period;

[0008] In the case where the target migration service is a migration service of a target service level, a target migration device is called to execute the target migration service, wherein the target migration device is selected from a plurality of the migration devices based on the migration resource occupancy information of the plurality of the migration devices at the beginning of the current time period, and the target migration device is dedicated to executing the migration service of the target service level during the current time period.

[0009] The present application also provides a device for allocating migration services, including:

[0010] A receiving module, configured to receive a target request, wherein the target request is used to request execution of a target migration service by a plurality of migration devices included in the data migration system;

[0011] a detection module configured to detect a service level of the target migration service based on service level information, wherein the service level information is used to indicate a requirement condition for migration device resources of a migration service of the target service level undertaken by the data migration system in a current time period, and the requirement for migration device resources of the migration service of the target service level is greater than the requirement for migration device resources of migration services of other service levels undertaken by the data migration system in the current time period;

[0012] An execution module is used to call a target migration device to execute the target migration service when the target migration service is a migration service of a target service level, wherein the target migration device is selected from a plurality of migration devices based on the migration resource occupancy information of the plurality of migration devices at the beginning of the current time period, and the target migration device is dedicated to executing the migration service of the target service level during the current time period.

[0013] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned migration service allocation methods when executing the computer program.

[0014] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for allocating migration services are implemented.

[0015] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the above-mentioned methods for allocating migration services.

[0016] According to the application, because the target migration service is reserved for the target service level in the plurality of migration devices according to the migration resource occupation information of the migration device at the beginning of the current time period, the target migration service is dedicated to performing the migration service of the target service level required by the data migration system in the target time period, and then when a target request requesting to perform the target migration service is received, the service level of the target migration service is detected by using the service classification information, and the target migration device can be called to perform the migration service after it is determined that the target migration service is the migration service of the target service level, so that the migration service of the target service level cannot be run due to resource occupation problems is avoided, and the execution efficiency of the data migration system for the migration service is improved, thereby the technical problem of low execution efficiency of the data migration system for the migration service in the related art is solved, and the technical effect of improving the execution efficiency of the data migration system for the migration service is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0018] Figure 1 is a hardware structure block diagram of the migration service allocation method of the embodiments of the application;

[0019] Figure 2 is a flowchart of the migration service allocation method according to the embodiments of the application;

[0020] Figure 3 is an optional migration service allocation diagram according to the embodiments of the application;

[0021] Figure 4 is a structure block diagram of a migration service allocation device according to the embodiments of the application. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.

[0023] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0024] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0025] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the migration service allocation method depends, the specific application environment architecture or specific hardware architecture is described herein.

[0026] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 FIG. 1 is a hardware structure diagram of the method for allocating migration services according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. The server device may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the startup method of the operating system in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a 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 a memory remotely located relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0028] Transmission device 106 is used to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] An embodiment of the present application provides a method for allocating migration services. The method is described in detail in conjunction with the execution flow of the method for allocating migration services.

[0030] The following is an explanation of the professional terms that appear in this application:

[0031] 1.Agent: A program or module responsible for executing data migration tasks, capable of reading data from the source storage and writing it to the destination storage.

[0032] 2. Central management node: In a distributed architecture, it is the core component responsible for collecting status information of each agent, coordinating task allocation, and playing a role in global scheduling and management.

[0033] 3. Quantile: A statistical concept used to divide a set of data into proportions. Simply put, it represents the value of a specific proportional position in the data.

[0034] 4. Large / Small Tasks: Migration tasks that consume less resources are small tasks, while those that consume less resources are large tasks.

[0035] 5. Resource reservation: Assign small tasks to agents with less remaining resources, utilize fragmented resources, and reserve resources for agents with more remaining resources to prepare for executing large tasks.

[0036] 6. Resource consolidation: Move all tasks on a certain agent to other agents for execution, releasing all resources on the agent.

[0037] In this embodiment, a method for allocating migration services is provided. Figure 2 Flowchart of the method for allocating migration services according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:

[0038] Step S202: receiving a target request, wherein the target request is used to request execution of a target migration service by multiple migration devices included in the data migration system;

[0039] Step S204: Detecting the service level of the target migration service based on service level information, wherein the service level information indicates a requirement for migration device resources for migration services of the target service level undertaken by the data migration system in the current time period, wherein the requirement for migration device resources for the migration services of the target service level is greater than the requirement for migration device resources for migration services of other service levels undertaken by the data migration system in the current time period.

[0040] Step S206, when the target migration service is a migration service of the target service level, calling the target migration device to execute the target migration service, wherein the target migration device is selected from the multiple migration devices based on the migration resource occupancy information of the multiple migration devices at the beginning of the current time period, and the target migration device is dedicated to executing the migration service of the target service level during the current time period.

[0041] Through the above steps, since the data migration system reserves a target migration service for the migration service of the target service level in multiple migration devices based on the migration resource occupancy information of the migration device at the beginning of the current time period, the target migration service is dedicated to executing the migration service of the target service level that the data migration system needs to undertake in the target time period, and then when a target request for executing the target migration service is received, the service level of the target migration service is detected by using the service classification information, and after determining that the target migration service is a migration service of the target service level, the target migration device can be called to execute the migration service, thereby avoiding the inability to run the migration service of the target service level due to resource occupancy problems, and improving the execution efficiency of the data migration system for the migration service. Therefore, it can solve the technical problem of low execution efficiency of the data migration system for the migration service in related technologies, and achieve the technical effect of improving the execution efficiency of the data migration system for the migration service.

[0042] The migration service allocation method provided in this embodiment can be applied to, but is not limited to, a control device configured for multiple migration devices in an application and data migration system. During the task execution process, the multiple migration devices will report their own migration resource occupancy to the control device, and the control device is used to allocate migration services to be executed to the migration devices based on the migration resource occupancy reported by the migration devices.

[0043] In the embodiment provided in step S202 , the migration device is used to perform a migration service, which may be, but is not limited to, a data migration service for migrating data from one device to another device.

[0044] In the embodiment provided in step S204, the data migration system carries multiple migration services over a period of time. Different migration services have different resource requirements for the migration device during execution. Therefore, the migration services are divided into multiple service levels based on the resource requirements of the migration device and the number of migration devices with similar resource requirements. Migration services of different service levels have different resource requirements for the migration device, namely, the target service level and other service levels in this application. Among the migration services undertaken by the data migration system, the migration device resources required for the migration services belonging to the target service level are greater than the migration device resources required for the migration services belonging to other service levels, and the number of migration services belonging to the target service level is greater than the number of migration services belonging to other service levels. That is, the migration services of the target service level are large services with heavy loads, while the migration services of the other service levels are small services with light loads. In the data migration system, the frequency of occurrence of small services is higher than that of large services, and the migration device resources consumed by executing small services are less than the migration device resources required by executing large services.

[0045] Optionally, in the embodiment of the present application, the service classification information indicates the filtering condition of the migration service of the target service level among all the migration services accepted by the data migration system in the current time period. Since the data migration services received by the data migration system are always changing, the service classification information of the data migration system changes with the change of the migration services received by the data migration system. In the embodiment, the data migration system can but is not limited to dynamically determine the reference service information accepted by the data migration system in the reference time period before the current time period and the resource remaining amount of the migration device before the start of the current time period, wherein the reference service information is used to indicate the resource consumption of the migration service accepted by the migration device in the data migration system in the reference time period. The specific operation steps are as follows: obtaining the reference service information reported by the migration device in the reference time period and the timing information of the migration service indicated by the reference service information; constructing a target prediction model of the data migration system according to the reference service information and the timing information, wherein the target prediction model records the timing change relationship of the service information of the migration service accepted by the data migration system; using the target prediction model to convert the service acceptance information of the target migration device in the current time period, wherein the service acceptance information is used to indicate the timing change relationship of the migration service accepted by the data migration system in the current time period; determining the service classification information corresponding to the service acceptance information in the current time period and the resource remaining amount of the migration device in the data migration system before the start of the current time period from the service acceptance information, the resource remaining amount and the service classification information having a corresponding relationship. Through the above content, the future migration service to be accepted by the data migration system is predicted by using the historical reference service information of the migration device, and then the service classification information of the data migration system in the current time period is determined according to the predicted service acceptance information and the resource remaining amount of the current migration device, so as to dynamically set the service classification information according to the service acceptance state of the data migration system, guarantee the reliability of the subsequent reserved migration device, and improve the execution efficiency of the data migration system to the migration service.

[0046] In the embodiment provided in step S206, the target migration device is the migration device reserved for the migration service of the target service level in the data migration system, which is specially used to execute the migration service of the target service level. In the embodiment of the present application, the target migration device can but is not limited to be selected from a plurality of migration devices according to the service classification information of the data migration system in the current time period and the current resource remaining information of the migration device before the start of the current time period, i.e., the target migration device is dynamically selected for the migration service of the target service level before the start of each time period.

[0047] Optionally, in the embodiment of the present application, the service classification information in the data migration system is dynamically changed in different time periods, and thus the target migration device configured for the migration service of the target service level in the data migration system is also dynamically changed in different time periods.

[0048] Optionally, in the embodiment of the present application, in the case where the target migration service is not the migration service of the target service level, the target migration service is executed by using the other migration devices except the target migration device. When the target migration service is executed by using the other migration devices, a fifth migration device with a remaining resource amount satisfying the resource requirement of the target migration service is selected from the other migration devices, and in the case where the fifth migration device does not exist in the other migration devices, the suspension number of the migration service is detected, and in the case where the suspension number of the migration service is less than the target suspension number, the target migration task can be temporarily suspended, and in the case where the suspension number is greater than or equal to the target suspension number, a sixth migration device with the least remaining resource is selected from the target migration device, and the running resource of the sixth migration device is borrowed to execute the target migration service. In this way, by setting the “anti-starvation” mechanism, when the migration device satisfying the resource requirement cannot be found in the execution of the small task (the migration service of the non-target service level), the target migration device is borrowed, and thus the reliability of the system is improved.

[0049] As an optional implementation, before the service level of the target migration service is detected according to the service classification information, the method further includes:

[0050] Obtaining reference service information reported by the plurality of migration devices, wherein the reference service information is used to indicate the acceptance state of the migration service by the corresponding migration device in a reference time period before the current time period;

[0051] Generating the service classification information of the data migration system in the current time period according to the reference service information.

[0052] Optionally, in the embodiment of the present application, by collecting the reference service information of each migration device in the historical time period, the resource requirement of the migration service to be accepted by the data migration system in the future can be predicted, and thus the resource allocation of the migration device is more accurate and reliable. In the embodiment, the time sequence transformation relationship of the load of the migration service accepted by the data migration system can be constructed according to the reference service information, and thus the load variation of the migration service of the data migration system from the reference time period before the current time period to the current time period can be determined according to the time sequence transformation relationship, and thus the reference service classification information of the data migration system in the reference time period before the current time period is adjusted using the load variation, so as to obtain the service classification information in the current time period.

[0053] By the above, the historical service information of the migration device is migrated through the data migration system, so that the service classification information of the data migration system is dynamically generated according to the historical service information of the migration device, thereby ensuring the reliability of the resource allocation of the migration device.

[0054] As an optional implementation, the generating the service classification information of the data migration system in the current time period according to the reference service information comprises:

[0055] The reference resource occupation amounts of all reference migration services accepted by the data migration system in the reference time period are sorted in descending order to obtain a first sequence, wherein the reference service information comprises the reference resource occupation amount, and the reference resource occupation amount is used to indicate the resource consumed by the corresponding reference migration service on the migration device;

[0056] A target difference value between a first resource occupation amount located at the head of the first sequence and a second resource occupation amount located at the tail of the first sequence is calculated;

[0057] In a case where the target difference value is greater than or equal to a preset difference value, a target number of third resource occupation amounts are filtered from the first sequence in descending order of resource occupation amount, wherein the target number is determined according to the total number of reference resource occupation amounts included in the first sequence;

[0058] The service classification information is determined according to the third resource occupation amounts.

[0059] Optionally, in the embodiments of the present application, the service classification information can be but is not limited to a target classification threshold of a target service level. When the resource requirement of the migration service is greater than or equal to the target classification threshold, it can be determined that the current migration service belongs to the migration service of the target service level, and when the resource requirement of the migration service is less than the target classification threshold, it can be determined that the current migration service does not belong to the migration service of the target service level. In this embodiment, the minimum of the third resource occupation amount can be set as the target classification threshold of the target service level.

[0060] Optionally, in the embodiments of the present application, the target difference value can be dynamically set based on the distribution of the resource occupation amount, for example, the difference value between the reference resource occupation amounts of all reference migration services is calculated, so as to determine the uniformity degree of the load distribution of the migration service accepted by the data migration system in the reference time period according to the difference value, and the target difference value corresponding to the uniformity degree is set, that is, when the uniformity degree is greater, the target difference value can be set to be smaller, and vice versa.

[0061] By filtering out the third resource usage, we can determine the resource usage threshold for large tasks, thereby achieving reasonable resource classification. This technical feature solves the problem of how to scientifically classify tasks in resource allocation, and through quantitative analysis, achieves refined and intelligent resource allocation.

[0062] As an optional implementation manner, determining the service classification information according to the third resource occupancy includes one of the following:

[0063] Setting the minimum value of the third resource occupancy amounts as the target classification threshold of the target service level;

[0064] Calculate a first average value of the third resource occupancy; set the first average value as the target classification threshold corresponding to the target service level, wherein the service classification information includes the target classification threshold.

[0065] In the embodiment of the present application, the choice of the method for determining the business classification information directly affects the efficiency and fairness of resource allocation. For example, if the minimum value among the third resource occupancy amounts is selected as the classification threshold for large tasks, then the system will be more inclined to guarantee the resource requirements of large tasks and avoid excessive occupation of resources by small tasks. If the first average value is selected, the resource allocation between large tasks and small tasks can be balanced to ensure the stable operation of the entire system. The implementation of this technical feature solves the problem of how to balance the resource requirements of large tasks and small tasks in resource allocation, and realizes the dynamic balance of resource allocation through the setting of thresholds.

[0066] As an optional implementation manner, generating the service classification information of the data migration system in the current time period according to the reference service information includes:

[0067] Building a target prediction model of the data migration system based on the reference business information, wherein the target prediction model records a temporal change relationship of business information of the migration business carried by the data migration system;

[0068] Using the target prediction model to convert candidate service information of the migration service that the migration system needs to undertake within the current time period, wherein the candidate service information is used to indicate the demand of the migration service for the device resources of the migration device;

[0069] The service classification information is generated according to the candidate service information.

[0070] Optionally, in the embodiments of this application, the construction and use of a prediction model is key to achieving dynamic and optimal resource allocation in this solution. For example, the target prediction model can be based on a machine learning algorithm and, by analyzing the temporal changes in historical business information, predict the types of business and resource requirements likely to arise within the current time period. The implementation of this technical feature solves the problem of predicting future resource requirements in resource allocation. Through the model's predictions, the system can make resource reservations in advance, improving the foresight and accuracy of resource allocation.

[0071] As an optional implementation manner, generating the service classification information according to the candidate service information includes:

[0072] sorting candidate resource occupancy amounts of migration services that the data migration system needs to undertake within the current time period in descending order to obtain a second sequence, wherein the candidate service information includes the candidate resource occupancy amounts;

[0073] calculating a candidate difference between a fourth resource occupancy at the head of the second sequence and a fifth resource occupancy at the tail of the second sequence;

[0074] If the candidate difference is greater than or equal to the preset difference, select a candidate number of sixth resource occupancy amounts from the second sequence in descending order of resource occupancy amounts, where the candidate number is determined based on the total number of candidate resource occupancy amounts included in the second sequence;

[0075] The service classification information is determined according to the sixth resource occupancy.

[0076] Optionally, in an embodiment of the present application, the setting of the candidate difference value can be dynamically set based on the distribution of the candidate resource occupancy. For example, the difference value between the occupancy amounts of all candidate resources is calculated, and then the uniformity of the load distribution of the migration business undertaken by the data migration system in the current time period is determined based on the difference value, and the candidate difference value corresponding to the uniformity is set, that is, when the uniformity is larger, the candidate difference value can be set smaller, and vice versa, the candidate difference value can be set larger.

[0077] By filtering out the sixth resource usage, we can determine the resource requirements of large tasks and thus achieve reasonable resource reservation. This technical feature solves the problem of how to reserve resources based on prediction results in resource allocation. By analyzing the candidate resource usage, we can achieve dynamic adjustment and optimization of resource allocation.

[0078] As an optional implementation manner, determining the service classification information according to the sixth resource occupancy includes one of the following:

[0079] Setting the minimum value of the sixth resource occupancy amount as the target classification threshold of the target service level;

[0080] Calculate a second average value of the six resource occupancy amounts; set the second average value as the target classification threshold corresponding to the target service level, wherein the service classification information includes the target classification threshold.

[0081] As an optional implementation manner, before calling the target migration device to execute the target migration service, the method further includes:

[0082] Converting the target classification threshold into a target classification condition for the migration device, wherein the target classification threshold is used to indicate the minimum amount of migration device resources required for the migration service of the target service level, and the target classification condition is used to indicate the amount of idle resources required for the migration device to execute the migration service of the target service level;

[0083] Filtering a first migration device that meets the target classification condition from a plurality of migration devices according to the migration resource occupation information of the migration device;

[0084] The target migration device for executing the migration service of the target service level is reserved from the first migration devices.

[0085] Optionally, in an embodiment of the present application, reserving resources before executing a large task is a key step in ensuring the smooth execution of the large task. Before the data migration system begins accepting migration services in the current time period, this embodiment prioritizes reserving dedicated target migration devices based on the high-load migration services that the data migration system will need to handle. This ensures that the data migration system has sufficient resources to execute the high-load migration tasks received during operation. For example, the target classification criteria can be set based on the resource requirements of large tasks (migration services of the target service level) that may be accepted in the current time period and the availability of resources in the reserved resource pool, ensuring that sufficient continuous resources are available for the execution of the large task.

[0086] Optionally, in an embodiment of the present application, the target classification condition is used to filter out, from a plurality of migration devices, migration devices that are reserved for exclusive execution of migration services of a target service level within the current time period. The target classification condition may be, but is not limited to, filtering out target migration devices by detecting whether the remaining amount of resources of the migration device is greater than or equal to a target threshold. When the remaining amount of resources of the migration device is greater than or equal to the target threshold, the current device may be determined as the target migration device. Therefore, the method of converting the target grading threshold into the target classification condition is to use the target grading threshold to convert the target threshold of the target classification condition, such as determining the target grading threshold as the target threshold, or the target grading threshold may be increased by a preset multiple to obtain the target threshold.

[0087] Through the above content, the problem of how to ensure the resource requirements of large tasks in resource allocation is solved. By reserving resources, the resource bottleneck during the execution of large tasks is avoided and the overall performance of the system is improved.

[0088] As an optional implementation manner, the step of selecting a first migration device that meets the target classification condition from a plurality of migration devices according to the migration resource occupation information of the migration device includes:

[0089] Matching the remaining resource amount of the migration device with a target resource amount threshold, wherein the migration resource occupancy information includes the remaining resource amount, and the target classification condition includes the target resource amount threshold;

[0090] In a case where the remaining resource amount of the current migration device is greater than or equal to the target resource amount threshold, the migration device is determined to be the first migration device that meets the target classification condition.

[0091] In this embodiment of the present application, the target resource threshold is set to ensure that the migration devices in the reserved resource pool have sufficient resources to execute large tasks. This technical feature solves the problem of how to select migration devices that meet the requirements of large tasks during resource allocation. By matching the remaining resources, accurate resource reservation is achieved, improving the execution efficiency of large tasks.

[0092] As an optional implementation manner, the reserving the target migration device from the first migration device for executing the migration service of the target service level includes:

[0093] detecting the number of times each of the first migration devices has undertaken migration services of the other service levels within a reference time period before a current moment;

[0094] In a case where the number of acceptances is less than a preset number of acceptances, the first migration device is configured as the target migration device specifically used to execute the migration service of the target service level.

[0095] In the embodiments of the present application, the reservation of target migration devices is a refinement of the resource reservation strategy. For example, the setting of a preset number of acceptances can prevent the migration devices in the reserved resource pool from excessively taking on small tasks, ensuring that their main resources are used to execute large tasks. The implementation of this technical feature solves the problem of how to prevent the migration device resources in the reserved resource pool from being excessively occupied by small tasks during resource allocation. By detecting the number of acceptances, efficient resource utilization is achieved, improving the execution speed of large tasks and the overall responsiveness of the system.

[0096] As an optional implementation manner, the invoking the target migration device to execute the target migration service includes:

[0097] Screening out the remaining migration resources from the target migration device and selecting a second migration device that meets the resource requirements of the target migration service;

[0098] Selecting a third migration device for executing the target migration service from the second migration devices;

[0099] Allocate the target migration service to the third migration device.

[0100] Optionally, in an embodiment of the present application, the third migration device may be any migration device in the second migration device, or may be a migration device in which the remaining resources in the second migration device have the highest matching degree with the resource requirements of the target migration service. This solution does not limit this.

[0101] Optionally, in an embodiment of the present application, the method of filtering out the third migration device from the second migration device can also be to sort the second migration devices in descending order according to the amount of remaining resources, and filter out the migration device at the target percentile position from the sequence as the third migration device, and the target percentile position is the middle position except the starting position and the ending position of the sequence, such as taking the migration device at the 30% percentile position from the sequence. Assume that there are 10 second migration devices in the migration device list, and the 30% percentile is the migration device at the third position in the list sorting. Specific calculation formula: index = min(N, max(1, round(0.3*N))), where N is the sequence length. The purpose of taking the 30% percentile agent is to avoid the task always being assigned to the agent with the least remaining resources, which will quickly run out of resources.

[0102] Through the above content, the problem of how to ensure that the resource requirements of large tasks are met in resource allocation is solved. Through precise matching of resources, the execution efficiency of large tasks is improved and resource waste is reduced.

[0103] As an optional implementation manner, the selecting a third migration device for executing the target migration service from the second migration device includes:

[0104] Sorting the second migration devices in descending order of remaining migration resources to obtain a third sequence;

[0105] The second migration device located at a target sequence position in the third sequence is determined as the third migration device, wherein the target sequence position is a sequence position other than the head and the tail of the third sequence.

[0106] The aforementioned third migration device screening rule further optimizes resource allocation for migration devices. The target sequence position is determined based on the priority and resource requirements of large tasks, ensuring that they are assigned to target migration devices with sufficient resources and high operational efficiency. This technical feature addresses the issue of optimizing resource allocation for large tasks. By prioritizing resources and setting target sequence positions, it achieves efficient and fair resource allocation.

[0107] As an optional implementation, the method further includes:

[0108] If there is no migration device that meets the resource requirements of the target migration service among the target migration devices, selecting a fourth migration device from the target migration devices;

[0109] Migrating the migration service undertaken by the fourth migration device to other migration devices among the multiple migration devices, wherein the other migration devices are migration devices other than the target migration device among the multiple migration devices;

[0110] When the migration of the migration service on the fourth migration device is completed, the target migration service is allocated to the fourth migration device.

[0111] Optionally, in an embodiment of the present application, the goal of migrating the multiplied migration business on the fourth migration device to other migration devices is to organize the resource occupancy of the migration device, thereby improving the operating resource guarantee for the migration task of the target business type, solving the problem of how to deal with insufficient resources in resource allocation, and realizing dynamic optimization configuration of resources through resource organization and migration, thereby improving the stability and flexibility of the system.

[0112] As an optional implementation manner, the selecting the fourth migration device from the target migration devices includes:

[0113] Acquire multiple service migration parameters of each target migration device, wherein the multiple service migration parameters are used to characterize, from multiple feature dimensions, how the operating efficiency of the migration device is improved after the migration service undertaken is released;

[0114] A weighted sum calculation is performed on the multiple service migration parameters using a weight parameter corresponding to each characteristic dimension to obtain the service migration benefit of the corresponding target migration device, wherein the weight parameter is used to indicate the impact of the service migration parameter of the corresponding characteristic dimension on the operating efficiency of the migration device;

[0115] The migration device whose service migration benefit is greater than or equal to the target benefit value is determined as the fourth migration device.

[0116] Optionally, in an embodiment of the present application, multiple business migration parameters are used to adjust the impact of releasing the migration business on the operating efficiency of the migration device from multiple feature dimensions. The multiple business migration parameters may include but are not limited to the memory usage in the migration house, CPU operating load, etc. This solution does not limit this.

[0117] Through the above content, the problem of how to quantify the benefits of resource consolidation in resource allocation is solved by calculating the benefits of business migration. Through the analysis and weighted summation calculation of business migration parameters, scientific decision-making of resource consolidation is achieved, and the efficiency and effectiveness of resource allocation are improved.

[0118] As an optional implementation manner, detecting the service level of the target migration service according to the service classification information includes:

[0119] Acquire target service information of the target migration service, wherein the target service information is used to indicate resource requirements of the target migration service on the migration device;

[0120] Matching the target service information with the service classification information;

[0121] If the target service information matches the service classification information, determining the service classification of the target migration service to be the target service classification;

[0122] In a case where the target service information does not match the service classification information, the service classification of the target migration service is determined to be the other service classification.

[0123] Optionally, in embodiments of the present application, detecting the service level of data migration tasks forms the basis for implementing resource reservation and organization strategies. For example, target service information can be acquired based on the task type, scale, and resource requirements. By matching this with service classification information, the task level can be quickly determined, thereby achieving reasonable resource allocation. The implementation of this technical feature solves the problem of how to quickly and accurately determine task levels during resource allocation, and through matching service information, achieves intelligent and automated resource allocation.

[0124] As an optional implementation manner, matching the target service information with the service classification information includes:

[0125] Comparing a numerical relationship between a resource requirement and a target classification threshold, wherein the target service information includes the resource requirement, the service classification information includes the target classification threshold, the target classification threshold is generated based on reference service information of a plurality of the migrating devices, the reference service information is used to indicate a migration service acceptance status of the corresponding migrating device within a reference time period before a current moment, and the target classification threshold is used to indicate a minimum requirement for migration device resources for a migration service of the target service level;

[0126] When the resource demand is greater than or equal to the target classification threshold, determining that the target service information matches the service classification information;

[0127] When the resource demand is less than the target classification threshold, it is determined that the target service information does not match the service classification information.

[0128] Through the above content, the problem of how to quantify task levels in resource allocation is solved. By comparing resource requirements, accurate classification of tasks is achieved, providing a basis for subsequent resource reservation and organization.

[0129] The embodiments of the present invention provide a data migration method and system based on resource reservation and organization. By rationally allocating migration tasks and dynamically scheduling resources, resource fragmentation is avoided, ensuring that both large and small tasks can be smoothly executed in the data migration system, thereby improving the data migration efficiency and stability of the system.

[0130] The core technical solutions for this implementation cover the following key aspects:

[0131] 1) Task Statistics. Because each migration task requires different amounts of data and file sizes, and requires different data processing operations (such as compression, watermarking, and cropping), CPU usage, memory usage, and execution time vary during the migration process. Therefore, task execution statistics are necessary to support task scheduling. During task execution, each agent (i.e., migration device) regularly collects statistics on task resource usage (every 5 seconds) and sends these statistics to the central management node after task completion.

[0132] 2) Agent resource statistics. Agent resources refer to the physical resources of the server, including the total amount and remaining amount of CPU and memory. The agent regularly (every 5 seconds) collects statistics on its own resources and ongoing tasks and sends them to the central management node.

[0133] 3) Task marking: The central management node marks tasks as large or small based on historical task statistics (such as CPU peak, memory usage, and migration data volume) and classification thresholds.

[0134] Small tasks (i.e., migration tasks not at the target service level): Resource requirements ≤ 20% of Agent resources.

[0135] Large tasks (i.e., migration tasks at the target service level): Resource requirements > 20% of Agent resources.

[0136] Note: The classification threshold can be set dynamically.

[0137] 4) Resource Reservation. Small tasks are prioritized for execution by agents with fewer remaining resources, effectively reserving resources for agents with more remaining resources. This introduces the concept of a reserved resource pool, which consists of several agents with reserved resources. These agents are only responsible for receiving large tasks. The central management node dynamically maintains the reserved resource pool, which includes agents that meet the following conditions:

[0138] a) Remaining resources > the large task resource threshold (e.g., 120% of the system's largest historical task);

[0139] b) Resource statistics show that no small tasks are assigned for three consecutive times.

[0140] Note: Agents in the reserved resource pool only receive large tasks or resource arrangement instructions.

[0141] 5) Anti-starvation Mechanism. Under resource reservation rules, the central management node may be unable to find an agent that meets the resource requirements for a small task. If small tasks are still not assigned to agents in the reserved resource pool, the system will have surplus resources but some tasks will remain unexecuted. This is clearly an unreasonable situation. To address this issue, an anti-starvation mechanism is introduced. If a small task cannot be assigned a suitable agent due to insufficient resources, it will wait. During this waiting period, the central management node will continue to attempt to find a suitable agent. If the waiting timeout (threshold of 60 seconds) is exceeded, the central management node assigns an agent from the reserved resource pool to execute the task and marks it as "temporarily occupied." When a large task arrives, the "temporarily occupied" task will be preferentially migrated to another agent (the target agent selection still follows the resource reservation rules), freeing up reserved resources.

[0142] 6) Resource consolidation. When the central management node schedules a large task and cannot find a qualified agent in the reserved resource pool, it triggers the resource consolidation process. Resource consolidation involves selecting a suitable agent and distributing all of its tasks to other agents for execution. This effectively frees up all of the agent's resources and then assigns the pending tasks to it.

[0143] Figure 3 This is an optional migration service allocation diagram according to an embodiment of the present application, such as Figure 3 As shown in the figure, when the central management node in the data migration system schedules a migration task (i.e., migration business), it first determines the task type. If it is a small task, the agent selection process is as follows:

[0144] a) Get a list of all agents.

[0145] b) Remove the Agent in the reserved resource pool from the list.

[0146] c) Remove the agents that do not meet the CPU requirements of the migration task from the list.

[0147] d) Remove the agents that do not meet the memory requirements of the migration task from the list.

[0148] e) If the Agent list is empty, the anti-starvation mechanism is triggered, otherwise go to step f.

[0149] f) Sort the Agent list in ascending order based on (CPU remaining resources, memory remaining resources).

[0150] g) Select the agent at the 30th percentile from the agent list. Assume the agent list has 10 elements, and the 30th percentile is the third element in the list. The specific calculation formula is: index = min(N, max(1, round(0.3*N))), where N is the length of the list. Selecting the agent at the 30th percentile is to avoid always assigning tasks to the agent with the fewest remaining resources, which would quickly exhaust its resources.

[0151] If it is a large task, the agent selection process is:

[0152] a) Get the list of agents in the reserved resource pool.

[0153] b) Remove the agents that do not meet the CPU requirements of the migration task from the list.

[0154] c) Remove the agents that do not meet the memory requirements of the migration task from the list.

[0155] d) The Agent list is sorted in descending order based on (CPU remaining resources, memory remaining resources).

[0156] e) Select the 30% quantile agent: index = min(N,max(1,round(0.3*N))), where N is the list length. This rule avoids always selecting the agent with the most resources, reducing the risk of reservation pool fragmentation.

[0157] By reserving resources, small tasks are assigned to agents with less remaining resources. The fragmented resources of these agents are used as much as possible, and agents with more remaining resources are reserved for possible large tasks.

[0158] 2. Resource consolidation. The overall idea is to select a specific agent, migrate all tasks on that agent, consolidate resources, and then assign large tasks to that agent for execution. The specific process is:

[0159] a) Get a list of all agents.

[0160] b) Remove the agent in the cool-down period from the agent list (the agent will not participate in new resource reorganization within 5 minutes after resource reorganization).

[0161] c) Remove any Agents that are not eligible for resource consolidation from the Agent list. The basis for determining whether an Agent is eligible for resource consolidation is whether other Agents can meet the resource requirements of all tasks on that Agent, thereby enabling the decentralization of all tasks on that Agent to other Agents. If any task cannot find a suitable target Agent, the Agent is considered unsuitable for resource consolidation.

[0162] d) Evaluate the migration benefit of each agent. The migration benefit is the total amount of resources available to the agent, such as 256GB of memory and 128 CPU cores. The more resources are freed up after migrating tasks from the agent to another node, the higher the migration benefit. Migration benefit = Σ(total amount of resources freed up by the source agent) × resource integration weight (e.g., memory weight 0.6, CPU weight 0.4)).

[0163] e) Evaluate the migration cost of each agent. The migration cost is the impact of moving all tasks on an agent to another agent. Analyze all tasks on each agent, including the number of active tasks, task migration speed, task priority, and the remaining migration workload. Because task migration involves pausing and restarting tasks, which can lead to the risk of task failure, agents with fewer tasks and lower priorities should be prioritized. When evaluating task migration costs, follow these principles: the more active tasks, the higher the migration cost; the faster the task migration speed, the higher the migration cost; the higher the task priority, the higher the migration cost; the more remaining migration workload, the higher the migration cost; and select the agent with the highest benefit / cost ratio.

[0164] g) Loop through all tasks on the agent. The migration thread is terminated after the task reaches the next marker. The central management node then selects a new agent for the task based on the agent selection rules in resource reservation. The new agent initiates the migration task and continues the migration from the marker. Markers serve as task execution breakpoints and progress. When migrating data, the agent records each migration of a certain amount of data (for example, 1,000 files) and submits the task's progress (including the marker) to the central management node.

[0165] h) After the Agent completes all tasks, it reports to the central management node that resource cleanup is complete. The Agent then enters a cool-down period (e.g., 5 minutes), during which no new cleanups are triggered, to prevent a node from frequently performing resource cleanups.

[0166] i) The central management node assigns the task to the agent for execution.

[0167] The above embodiment has the following beneficial effects: 1) Avoiding resource fragmentation: Through the resource reservation strategy, small tasks are assigned to agents with less remaining resources to fully utilize fragmented resources; large tasks are assigned to the reserved pool to prevent scattered occupation.

[0168] 2) Ensuring the execution of large tasks: Reserving space in high-resource agents and combining it with resource consolidation processes (releasing entire nodes) ensures the immediate execution of large tasks.

[0169] 3) Improve resource utilization: Rationally assign small tasks to agents with less remaining resources, so that these fragmented resources that might otherwise be wasted can be effectively utilized. At the same time, by organizing resources and integrating and releasing node resources, the overall resource utilization can be further improved.

[0170] 4) Improve system stability: Avoid situations where large tasks cannot be executed due to unreasonable resource allocation, reduce the possibility of system failure due to resource problems, and make the system run more stable.

[0171] 5) Dynamic resource optimization: Anti-starvation mechanisms and threshold adjustments improve system adaptability and avoid resource idleness or conflicts.

[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0173] The embodiment of the present application also provides a device for allocating migration services. Figure 4 is a structural block diagram of a device for allocating migration services according to an embodiment of the present application, such as Figure 4 As shown, the device includes:

[0174] A receiving module, configured to receive a target request, wherein the target request is used to request execution of a target migration service by a plurality of migration devices included in the data migration system;

[0175] a detection module configured to detect a service level of the target migration service based on service level information, wherein the service level information is used to indicate a requirement condition for migration device resources of a migration service of the target service level undertaken by the data migration system in a current time period, and the requirement for migration device resources of the migration service of the target service level is greater than the requirement for migration device resources of migration services of other service levels undertaken by the data migration system in the current time period;

[0176] An execution module is used to call a target migration device to execute the target migration service when the target migration service is a migration service of a target service level, wherein the target migration device is selected from a plurality of migration devices based on the migration resource occupancy information of the plurality of migration devices at the beginning of the current time period, and the target migration device is dedicated to executing the migration service of the target service level during the current time period. Through the above device, since in the data migration system, a target migration service is reserved for the migration service of the target service level in multiple migration devices according to the migration resource occupancy information of the migration device at the beginning of the current time period, the target migration service is dedicated to executing the migration service of the target service level that the data migration system needs to undertake in the target time period, and then when a target request for executing the target migration service is received, the service level of the target migration service is detected by using the service classification information, and after determining that the target migration service is a migration service of the target service level, the target migration device can be called to execute the migration service, thereby avoiding the inability to run the migration service of the target service level due to resource occupancy problems, and improving the execution efficiency of the data migration system for the migration service. Therefore, it can solve the technical problem of low execution efficiency of the data migration system for the migration service in the related technology, and achieve the technical effect of improving the execution efficiency of the data migration system for the migration service.

[0177] Optionally, the device includes:

[0178] an acquisition module configured to acquire, before detecting the service level of the target migration service according to the service classification information, reference service information reported by the plurality of migration devices, wherein the reference service information indicates the acceptance status of the migration service by the corresponding migration device within a reference time period before a current moment;

[0179] A generating module is configured to generate service classification information of the data migration system within the current time period based on the reference service information.

[0180] Optionally, the generating module includes:

[0181] a sorting unit, configured to sort reference resource occupancy amounts of all reference migration services undertaken by the data migration system within the reference time period in descending order to obtain a first sequence, wherein the reference service information includes the reference resource occupancy amount, and the reference resource occupancy amount is used to indicate resources consumed by the corresponding reference migration service on the migration device;

[0182] a calculation unit, configured to calculate a target difference between a first resource occupancy at the head of the first sequence and a second resource occupancy at the tail of the first sequence;

[0183] The first screening unit is configured to screen a target number of third resource occupancies from the first sequence in a descending order of resource occupancy in a case where the target difference is greater than or equal to a preset difference, wherein the target number is determined according to a total number of reference resource occupancies included in the first sequence.

[0184] The first determining unit is configured to determine the service classification information according to the third resource occupancies.

[0185] Optionally, the first determining unit is configured to perform one of the following operations:

[0186] set a minimum value in the third resource occupancies as a target classification threshold of the target service level;

[0187] calculate a first average value of the third resource occupancies; and set the first average value as the target classification threshold corresponding to the target service level, wherein the service classification information comprises the target classification threshold.

[0188] Optionally, the generation module comprises:

[0189] The construction unit is configured to construct a target prediction model of the data migration system according to the reference service information, wherein a time sequence change relationship of service information of a migration service carried by the data migration system is recorded in the target prediction model.

[0190] The conversion unit is configured to convert the candidate service information of the migration service required to be carried by the migration system in the current time period using the target prediction model, wherein the candidate service information is used to indicate a demand situation of the migration service for device resources of a migration device.

[0191] The generation unit is configured to generate the service classification information according to the candidate service information.

[0192] Optionally, the generation unit is configured to:

[0193] sort candidate resource occupancies of migration services required to be carried by the data migration system in the current time period in a descending order to obtain a second sequence, wherein the candidate service information comprises the candidate resource occupancies.

[0194] calculate a candidate difference between a fourth resource occupancy located at a head of the second sequence and a fifth resource occupancy located at a tail of the second sequence;

[0195] in a case where the candidate difference is greater than or equal to a preset difference, selecting a candidate number of sixth resource occupancies from the second sequence in a descending order of resource occupancy;

[0196] determining the service classification information according to the sixth resource occupancies.

[0197] Optionally, the generating unit is configured to perform one of the following operations:

[0198] setting a minimum value in the sixth resource occupancies as a target classification threshold of the target service level;

[0199] calculating a second average value of the sixth resource occupancies; and setting the second average value as the target classification threshold corresponding to the target service level, wherein the service classification information comprises the target classification threshold.

[0200] Optionally, the apparatus further comprises:

[0201] a conversion module configured to convert a target classification threshold into a target classification condition for a migration device before the target migration device executes the target migration service, wherein the target classification threshold is used to indicate a minimum demand of the target migration service for resources of the migration device, and the target classification condition is used to indicate an amount of idle resources required by the migration device to execute the target migration service of the target service level;

[0202] a first screening module configured to screen a first migration device satisfying the target classification condition from a plurality of migration devices according to the migration resource occupancy information of the migration device;

[0203] a reservation module configured to reserve the target migration device from the first migration device for executing the target migration service of the target service level.

[0204] Optionally, the screening module comprises:

[0205] a first matching unit configured to match a remaining resource amount of the migration device with a target resource amount threshold, wherein the migration resource occupancy information comprises the remaining resource amount, and the target classification condition comprises the target resource amount threshold;

[0206] a second determining unit configured to determine the migration device as the first migration device satisfying the target classification condition in a case where the remaining resource amount of the migration device is greater than or equal to the target resource amount threshold.

[0207] Optionally, the reservation module comprises:

[0208] a detection unit, configured to detect the number of times each of the first migration devices has undertaken migration services of the other service levels within a reference time period before a current moment;

[0209] A configuration unit is configured to configure the first migration device as the target migration device specifically used to perform the migration service of the target service level when the number of acceptances is less than a preset number of acceptances.

[0210] Optionally, the execution module includes:

[0211] A second screening unit, configured to screen the target migration device to find a second migration device whose remaining migration resources meet the resource requirements of the target migration service;

[0212] a third screening unit, configured to screen out a third migration device for executing the target migration service from the second migration devices;

[0213] An allocating unit is configured to allocate the target migration service to the third migration device.

[0214] Optionally, the third screening unit is used to:

[0215] Sorting the second migration devices in descending order of remaining migration resources to obtain a third sequence;

[0216] The second migration device located at a target sequence position in the third sequence is determined as the third migration device, wherein the target sequence position is a sequence position other than the head and the tail of the third sequence.

[0217] Optionally, the device further includes:

[0218] a second screening module configured to screen out a fourth migration device from the target migration devices if no migration device that meets the resource requirements of the target migration service exists in the target migration devices;

[0219] a migration module, configured to migrate the migration service undertaken by the fourth migration device to other migration devices among the plurality of migration devices, wherein the other migration devices are migration devices other than the target migration device among the plurality of migration devices;

[0220] The allocation module is configured to allocate the target migration service to the fourth migration device when the migration of the migration service on the fourth migration device is completed.

[0221] Optionally, the second screening module includes:

[0222] A first acquisition unit is configured to acquire a plurality of service migration parameters of each target migration device, wherein the plurality of service migration parameters are used to characterize, from multiple feature dimensions, an improvement in the operating efficiency of the migration device after the release of the undertaken migration service;

[0223] a processing unit, configured to perform a weighted sum calculation on the plurality of service migration parameters using a weight parameter corresponding to each characteristic dimension to obtain a service migration benefit of the corresponding target migration device, wherein the weight parameter indicates an impact of the service migration parameter corresponding to the characteristic dimension on the operating efficiency of the migration device;

[0224] The third determining unit is configured to determine a migration device whose service migration benefit is greater than or equal to a target benefit value as the fourth migration device.

[0225] Optionally, the detection module includes:

[0226] A second acquiring unit is configured to acquire target service information of the target migration service, wherein the target service information is used to indicate resource requirements of the target migration service on the migration device;

[0227] A second matching unit, configured to match the target service information with the service classification information;

[0228] a fourth determining unit, configured to determine, when the target service information matches the service classification information, that the service classification of the target migration service is the target service classification;

[0229] The fifth determining unit is configured to determine, when the target service information does not match the service classification information, that the service classification of the target migration service is the other service classification.

[0230] Optionally, the second matching unit is configured to:

[0231] Comparing a numerical relationship between a resource requirement and a target classification threshold, wherein the target service information includes the resource requirement, the service classification information includes the target classification threshold, the target classification threshold is generated based on reference service information of a plurality of the migrating devices, the reference service information is used to indicate a migration service acceptance status of the corresponding migrating device within a reference time period before a current moment, and the target classification threshold is used to indicate a minimum requirement for migration device resources for a migration service of the target service level;

[0232] When the resource demand is greater than or equal to the target classification threshold, determining that the target service information matches the service classification information;

[0233] In a case where the resource requirement amount is less than the target grading threshold, it is determined that the target service information is inconsistent with the service grading information.

[0234] The description of the features in the embodiments of the allocation apparatus of the migrated service can be referred to the related description of the embodiments of the allocation method of the migrated service, which will not be repeated here.

[0235] Embodiments of the present application also provide an electronic device, comprising a memory and a processor, 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-mentioned embodiments of the allocation method of the migrated service.

[0236] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to perform the steps in any of the above-mentioned embodiments of the allocation method of the migrated service when running.

[0237] In an example embodiment, the above-mentioned computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0238] Embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the allocation method of the migrated service.

[0239] Embodiments of the present application also provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the allocation method of the migrated service.

[0240] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0241] The above is a detailed introduction to the method and device for allocating migration services, storage media, and electronic devices provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for allocating migration services, characterized in that: include: receiving a target request, wherein the target request is used to request execution of a target migration service by a plurality of migration devices included in the data migration system; detecting a service level of the target migration service according to service level information, wherein the service level information is used to indicate a requirement condition for migration device resources of a migration service of the target service level undertaken by the data migration system in a current time period, and a requirement for migration device resources of the migration service of the target service level is greater than a requirement for migration device resources of migration services of other service levels undertaken by the data migration system in the current time period; In a case where the target migration service is a migration service of a target service level, calling a target migration device to execute the target migration service, wherein the target migration device is selected from the plurality of migration devices based on migration resource occupation information of the plurality of migration devices at the beginning of the current time period, and the target migration device is dedicated to executing the migration service of the target service level during the current time period; Before detecting the service level of the target migration service based on the service classification information, the method further includes: obtaining reference service information reported by a plurality of the migration devices, wherein the reference service information is used to indicate the acceptance status of the migration service by the corresponding migration device within a reference time period before the current moment; and generating service classification information of the data migration system within the current time period based on the reference service information; The generating of the business classification information of the data migration system in the current time period based on the reference business information includes: constructing a target prediction model of the data migration system based on the reference business information, wherein the target prediction model records the temporal change relationship of the business information of the migration business carried by the data migration system; using the target prediction model to convert candidate business information of the migration business that the migration system needs to undertake in the current time period, wherein the candidate business information is used to indicate the demand of the migration business for the equipment resources of the migration equipment; generating the business classification information based on the candidate business information; Before calling the target migration device to execute the target migration service, the method also includes: converting the target grading threshold into a target classification condition for the migration device, wherein the target grading threshold is used to indicate the minimum requirement for migration device resources for the migration service of the target service level, and the target classification condition is used to indicate the amount of idle resources required for the migration device to execute the migration service of the target service level; screening out a first migration device that meets the target classification condition from a plurality of the migration devices based on the migration resource occupancy information of the migration device; and reserving the target migration device for executing the migration service of the target service level from the first migration device.

2. The method according to claim 1, characterized in that The generating the service classification information according to the candidate service information includes: sorting candidate resource occupancy amounts of migration services that the data migration system needs to undertake within the current time period in descending order to obtain a second sequence, wherein the candidate service information includes the candidate resource occupancy amounts; calculating a candidate difference between a fourth resource occupancy at the head of the second sequence and a fifth resource occupancy at the tail of the second sequence; If the candidate difference is greater than or equal to the preset difference, select a candidate number of sixth resource occupancy amounts from the second sequence in descending order of resource occupancy amounts, where the candidate number is determined based on the total number of candidate resource occupancy amounts included in the second sequence; The service classification information is determined according to the sixth resource occupancy.

3. The method according to claim 2, characterized in that The determining the service classification information according to the sixth resource occupancy includes one of the following: Setting the minimum value of the sixth resource occupancy amount as the target classification threshold of the target service level; Calculate a second average value of the six resource occupancy amounts; set the second average value as the target classification threshold corresponding to the target service level, wherein the service classification information includes the target classification threshold.

4. The method according to claim 1, wherein The step of selecting a first migration device that meets the target classification condition from a plurality of migration devices according to the migration resource occupation information of the migration devices includes: Matching the remaining resource amount of the migration device with a target resource amount threshold, wherein the migration resource occupancy information includes the remaining resource amount, and the target classification condition includes the target resource amount threshold; In a case where the remaining resource amount of the current migration device is greater than or equal to the target resource amount threshold, the migration device is determined to be the first migration device that meets the target classification condition.

5. The method according to claim 1, wherein The target migration device reserved from the first migration device for executing the migration service of the target service level includes: detecting the number of times each of the first migration devices has undertaken migration services of the other service levels within a reference time period before a current moment; In a case where the number of acceptances is less than a preset number of acceptances, the first migration device is configured as the target migration device specifically used to execute the migration service of the target service level.

6. The method according to claim 1, characterized in that The calling of the target migration device to execute the target migration service includes: Screening out the remaining migration resources from the target migration device and selecting a second migration device that meets the resource requirements of the target migration service; Filtering out a third migration device for executing the target migration service from the second migration devices; Allocate the target migration service to the third migration device.

7. The method according to claim 6, characterized in that The step of selecting a third migration device for executing the target migration service from the second migration device includes: Sorting the second migration devices in descending order of remaining migration resources to obtain a third sequence; The second migration device located at a target sequence position in the third sequence is determined as the third migration device, wherein the target sequence position is a sequence position other than the head and the tail of the third sequence.

8. The method according to claim 6, characterized in that The method further comprises: If there is no migration device that meets the resource requirements of the target migration service among the target migration devices, selecting a fourth migration device from the target migration devices; Migrating the migration service undertaken by the fourth migration device to other migration devices among the multiple migration devices, wherein the other migration devices are migration devices other than the target migration device among the multiple migration devices; When the migration of the migration service on the fourth migration device is completed, the target migration service is allocated to the fourth migration device.

9. The method according to claim 8, characterized in that The step of selecting a fourth migration device from the target migration device includes: Acquire multiple service migration parameters of each target migration device, wherein the multiple service migration parameters are used to characterize, from multiple feature dimensions, how the operating efficiency of the migration device is improved after the migration service undertaken is released; A weighted sum calculation is performed on the multiple service migration parameters using a weight parameter corresponding to each characteristic dimension to obtain the service migration benefit of the corresponding target migration device, wherein the weight parameter is used to indicate the impact of the service migration parameter of the corresponding characteristic dimension on the operating efficiency of the migration device; The migration device whose service migration benefit is greater than or equal to the target benefit value is determined as the fourth migration device.

10. The method according to claim 1, characterized in that The detecting the service level of the target migration service according to the service classification information includes: Acquire target service information of the target migration service, wherein the target service information is used to indicate resource requirements of the target migration service on the migration device; Matching the target service information with the service classification information; If the target service information matches the service classification information, determining the service classification of the target migration service to be the target service classification; In a case where the target service information does not match the service classification information, the service classification of the target migration service is determined to be the other service classification.

11. The method according to claim 10, characterized in that The matching of the target service information with the service classification information includes: Comparing a numerical relationship between a resource requirement and a target classification threshold, wherein the target service information includes the resource requirement, the service classification information includes the target classification threshold, the target classification threshold is generated based on reference service information of a plurality of the migrating devices, the reference service information is used to indicate a migration service acceptance status of the corresponding migrating device within a reference time period before a current moment, and the target classification threshold is used to indicate a minimum requirement for migration device resources for a migration service of the target service level; When the resource demand is greater than or equal to the target classification threshold, determining that the target service information matches the service classification information; When the resource demand is less than the target classification threshold, it is determined that the target service information does not match the service classification information.

12. A device for allocating migration services, characterized in that: include: A receiving module, configured to receive a target request, wherein the target request is used to request execution of a target migration service by a plurality of migration devices included in the data migration system; a detection module configured to detect a service level of the target migration service based on service level information, wherein the service level information is used to indicate a requirement condition for migration device resources of a migration service of the target service level undertaken by the data migration system in a current time period, and the requirement for migration device resources of the migration service of the target service level is greater than the requirement for migration device resources of migration services of other service levels undertaken by the data migration system in the current time period; an execution module, configured to, when the target migration service is a migration service of a target service level, call a target migration device to execute the target migration service, wherein the target migration device is selected from the plurality of migration devices based on migration resource occupation information of the plurality of migration devices at the beginning of the current time period, and the target migration device is dedicated to executing the migration service of the target service level during the current time period; The apparatus includes: an acquisition module configured to acquire reference service information reported by a plurality of migration devices before detecting the service level of the target migration service according to the service level information, wherein the reference service information is used to indicate the acceptance status of the migration service by the corresponding migration device within a reference time period before the current moment; and a generation module configured to generate service level information of the data migration system within the current time period according to the reference service information; The generation module includes: a construction unit for constructing a target prediction model of the data migration system based on the reference business information, wherein the target prediction model records the time-series change relationship of the business information of the migration business carried by the data migration system; a conversion unit for using the target prediction model to convert candidate business information of the migration business that the migration system needs to undertake within the current time period, wherein the candidate business information is used to indicate the demand of the migration business for the equipment resources of the migration equipment; a generation unit for generating the business classification information based on the candidate business information; The device also includes: a conversion module, which is used to convert the target grading threshold into a target classification condition for the migration device before calling the target migration device to execute the target migration service, wherein the target grading threshold is used to indicate the minimum requirement for migration device resources for the migration service of the target service level, and the target classification condition is used to indicate the amount of idle resources required for the migration device to execute the migration service of the target service level; a first screening module, which is used to screen out a first migration device that meets the target classification condition from a plurality of the migration devices based on the migration resource occupancy information of the migration device; and a reservation module, which is used to reserve the target migration device for executing the migration service of the target service level from the first migration device.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for allocating migration services as claimed in any one of claims 1 to 11 when executing the computer program.

14. 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 for allocating migration services according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for allocating migration services according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Data migration method and device, storage medium and computer program product

    CN119556854A

  • Information processing apparatus and information processing system

    US20190138350A1