Server cluster task migration method, electronic equipment, storage medium and product
By building a multi-layer feedforward neural network model for load prediction and optimization of migration strategies, the problems of uneven load scheduling and high migration costs in the server cluster are solved, and efficient resource allocation and system stability are achieved.
Patent Information
- Application Number
- CN202510854752.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-24
AI Technical Summary
In the prior art, the uneven load scheduling, unreasonable migration timing, high migration costs, waste of computing resources and excessive energy consumption of server clusters have not been effectively solved.
By building a multi-layer feedforward neural network model for load prediction, combining multi-dimensional operation data acquisition and intelligent load prediction, a task migration strategy is formulated, and task migration is carried out before predicting the resource bottleneck, and the migration strategy is optimized to reduce costs and energy consumption.
It realizes efficient allocation and operation optimization of server cluster resources, improves the overall performance and stability of the system, reduces energy consumption and operation costs, supports automated operation and maintenance, and improves the accuracy and response speed of task scheduling.
Smart Images

Figure CN120371533A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server cluster management, and particularly to a method for task migration in a server cluster, an electronic device, a storage medium, and a product. Background Art
[0002] With the rapid growth of the demand for cloud computing and big data processing, server clusters have become the core infrastructure to support various network services, carrying a large number of concurrent computing tasks. To ensure the continuity of services and the utilization efficiency of resources, the task scheduling and migration efficiency of server clusters are very important.
[0003] In related technologies, most task migrations are based on a threshold-driven method, that is, when the resource occupancy of a certain server exceeds a set threshold (such as the CPU (Central Processing Unit) usage rate is greater than 85%), the system will trigger a task migration. However, the above passive migration method will cause problems such as uneven load scheduling, unreasonable migration timing, high migration cost, waste of computing resources, and excessive energy consumption in the server cluster, which need to be solved urgently. Summary of the Invention
[0004] The present invention provides a method for task migration in a server cluster, an electronic device, a storage medium, and a product, so as to solve at least the problems of uneven load scheduling, unreasonable migration timing, high migration cost, waste of computing resources, and excessive energy consumption in the server cluster in related technologies.
[0005] The present invention provides a method for task migration in a server cluster, including: Obtaining a task migration prediction result, where the task migration prediction result is predicted by a pre-trained load prediction model; Based on the task migration prediction result, determining whether the current running task of a preset service device meets the task migration trigger condition; If the current running task meets the task migration trigger condition, determining a migration strategy for the current running task according to the current running task, and migrating the current running task to a target service device according to the migration strategy.
[0006] The present invention also provides a device for task migration in a server cluster, including: An obtaining module, configured to obtain a task migration prediction result, where the task migration prediction result is predicted by a pre-trained load prediction model; A judging module, configured to determine whether the current running task of a preset service device meets the task migration trigger condition based on the task migration prediction result; A migration module, which, if the currently running task meets the task migration trigger condition, determines the migration strategy of the currently running task according to the currently running task, and migrates the currently running task to a target service device according to the migration strategy.
[0007] The present invention also provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the server cluster task migration method as described in the above embodiment.
[0008] The present invention also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above server cluster task migration methods are implemented.
[0009] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any one of the above server cluster task migration methods are implemented.
[0010] Through the present invention, based on the task migration prediction result, when the currently running task meets the task migration trigger condition, the migration strategy of the currently running task is determined according to the currently running task, and the currently running task is migrated to the target service device according to the migration strategy. The technical problems of uneven load scheduling, unreasonable migration timing, high migration cost, waste of computing resources, and excessive energy consumption in the server cluster of the related technology are solved, and the efficient allocation and operation optimization of the server cluster resources are realized through multi-dimensional operation data collection, intelligent load prediction, task migration strategy, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0012] Figure 1 It is a flowchart of a server cluster task migration method provided by an embodiment of the present invention; Figure 2 It is an overall implementation flowchart of server cluster task migration according to an embodiment of the present invention; Figure 3 It is a judgment flowchart of server cluster task migration according to an embodiment of the present invention; Figure 4 It is a migration mode judgment logic flowchart of server cluster tasks according to an embodiment of the present invention; Figure 5 Schematic block diagram of a server cluster task migration device according to an embodiment of the present invention; Figure 6 Schematic structural diagram of an electronic device according to an embodiment of the present invention. Detailed implementation manners
[0013] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0014] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0015] In order to enable those skilled in the art of the present technology to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0016] Embodiments of the present invention provide a server cluster task migration method. The method will be described in detail in combination with the execution process of the server cluster task migration method.
[0017] Before introducing the embodiments of the present invention, first introduce the server cluster task migration method adopted in the related technology. The related technology mainly performs task migration based on a threshold-driven manner, that is, when the resource occupancy of a certain server exceeds a set threshold (such as the CPU usage rate is greater than 85%), the system will trigger task migration. However, this passive task migration has the following defects: (1) Response lag. Task migration often starts after the server is overloaded, which may lead to performance degradation and service interruption; (2) High migration cost. The overall migration of tasks involves the synchronization of a large amount of data and states, consuming a large amount of bandwidth and energy; (3) Lack of multi-dimensional consideration. When performing task migration, factors such as the cold start time, power load, and data access path of the server are not considered, which may lead to a decrease in the execution efficiency of tasks after migration. Therefore, based on the above existing problems, the embodiments of the present invention realize the accurate migration of cluster tasks and the dynamic balanced allocation of server resources through a series of steps such as multi-dimensional operation data collection, intelligent load prediction, migration strategy decision-making, and data preloading.
[0018] Specifically, Figure 1 is a schematic flowchart of a method for task migration in a server cluster provided by an embodiment of the present invention.
[0019] As Figure 1 shown, the method for task migration in the server cluster includes the following steps: In step S101, obtain a task migration prediction result, where the task migration prediction result is predicted by a pre-trained load prediction model.
[0020] According to an embodiment of the present invention, before obtaining the task migration prediction result, it further includes: constructing a multi-layer feedforward neural network model, where the multi-layer feedforward neural network model includes an input layer, at least one hidden layer, and an output layer; training the multi-layer feedforward neural network model based on a preset model training strategy, and stopping training when the multi-layer feedforward neural network model meets the termination training condition to obtain a load prediction model.
[0021] Among them, the preset model training strategy can be set by those skilled in the art according to actual test requirements, and no specific limitation is made here.
[0022] Specifically, since the server cluster task migration method in the related art usually takes measures when the server is already overloaded or about to be overloaded, this often leads to service interruption or performance degradation. And when performing task migration, multiple factors need to be considered, including the current load, historical load trend, and future load prediction in the area where the preset service device is located. Without accurate load prediction, it is difficult to make an optimal task scheduling decision. Therefore, the embodiment of the present invention needs to construct a load prediction model to achieve accurate prediction of future load, so as to help the system make more reasonable task migration decisions, and at the same time, potential resource bottlenecks can be identified in advance. For example, if it is predicted that the CPU usage rate will exceed 85% at a certain future time point, preventive measures (such as task migration) can be taken before it actually occurs, thus avoiding sudden resource bottlenecks.
[0023] Specifically, as Figure 2As shown in the figure, in the embodiment of the present invention, a multi-layer feedforward neural network model is first constructed, which mainly includes an input layer, at least one hidden layer, and an output layer. Among them, the input layer is used to input features, mainly including the status of preset service devices in the past period of time, such as CPU usage rate, which reflects the occupancy of processing capacity; memory usage rate, which reflects the usage of RAM (Random Access Memory); network in and out traffic, which reflects the communication load; disk read and write rate, which reflects the I / O (Input / Output) performance pressure; server running status, including normal / cold start / abnormal; historical migration times, which reflects whether frequent migrations lead to cold state; current task quantity, which reflects the concurrency situation, etc. The hidden layer is used to extract the non-linear feature relationships in the input data, and the number of nodes is determined according to experience and cross-validation methods. Sigmoid or ReLU (Rectified Linear Unit) functions can be used. The output layer is used to output the prediction result. The prediction result can be a continuous value (such as the CPU usage rate in the next 10 minutes), or in the form of interval classification (such as being divided into three categories: safe, critical, and overloaded). At the same time, a linear function or a Softmax function can be selected according to the task type.
[0024] Secondly, based on the preset model training strategy, the above-constructed multi-layer feedforward neural network model is trained with the input features, and the training is stopped when the multi-layer feedforward neural network model meets the termination training condition, and the final load prediction model is obtained.
[0025] Thus, by constructing a load prediction model, more refined management and task migration optimization of the server cluster can be achieved, which not only improves the overall performance and stability of the system, but also provides strong technical support for the efficient operation and maintenance of the data center.
[0026] According to an embodiment of the present invention, training the multi-layer feedforward neural network model based on the preset model training strategy and stopping the training when the multi-layer feedforward neural network model meets the termination training condition to obtain a load prediction model includes: obtaining the operation data of the preset service device, the operation status of the preset service device, and the power supply load status of the area where the preset service device is located based on the preset sampling period; performing data preprocessing on the operation data, operation status, and power supply load status, and constructing a training sample set based on the operation data, operation status, and power supply load status after data preprocessing; performing iterative training on the multi-layer feedforward neural network model based on the training sample set, and determining that the multi-layer feedforward neural network model meets the termination training condition and obtaining the load prediction model if the error of the validation set in the training sample set is in a preset change state for a continuous preset number of times.
[0027] According to an embodiment of the present invention, iterative training of a multi-layer feedforward neural network model based on a training sample set includes: performing weighted summation on the training sample set by using the weight coefficients corresponding to each hidden layer node in the multi-layer feedforward neural network model to obtain a calculation result of the training sample set; using a preset activation function to convert the calculation result into a non-linear output result to obtain a prediction result of the multi-layer feedforward neural network model; calculating the difference between the prediction result and the actual target result, and when the difference does not meet the preset difference range, using a preset gradient descent algorithm to update the weight coefficients corresponding to each hidden layer node until the difference meets the preset difference range and stops updating, and performing weighted summation on the training sample set by using the new weight coefficients corresponding to each updated hidden layer node to obtain a new calculation result of the training sample set, and continuing to execute the step of calculating the difference between the prediction result and the actual target result until the validation set error in the training sample set is in a preset change state for a preset number of consecutive times.
[0028] Among them, the preset service device, the preset sampling period, the preset number of times, the preset change state, the preset activation function, the preset difference range, and the preset gradient descent algorithm can all be set by those skilled in the art according to actual test requirements, and no specific limitation is made here.
[0029] Specifically, as Figure 2 shown, in the process of training the load prediction model, first, based on the preset sampling period, obtain the operation data of the preset service device in multiple dimensions, the operation state of the preset service device, and the power supply load state of the area where the preset service device is located, and use the obtained above data as input features. For example, collect the operation data of the preset service device in multiple dimensions, the operation state, and the power supply load state of the area where the preset service device is located from each preset service device node with a sampling period of 30s to comprehensively evaluate the migration feasibility. Among them, the operation data of the preset service device in multiple dimensions includes indicators such as the CPU usage rate, memory occupancy, disk I / O, network traffic, current task type, power load, task completion time, cold start flag, and historical task records of the preset service device. The operation state of the preset service device includes normal operation, cold start in progress, and offline. The above data can be regularly collected through a local proxy program, a cluster management platform, or a third-party monitoring tool, and can be pulled and stored in a database using a local proxy or a remote monitoring API (Application Programming Interface) to form a time series sample. Thus, through the collection of the above data, necessary input data can be provided for subsequent load prediction.
[0030] Secondly, based on the above-mentioned operation data, operation status of the preset service device, and the power supply load status of the area where the preset service device is located, to ensure the accuracy of the data, it is necessary to further perform data preprocessing on the operation data, operation status, and power supply load status, mainly including data cleaning and formatting of the above-mentioned collected data, such as removing missing values, and performing standardization processing on the input features (for example, normalizing the values to the range of 0 to 1), as well as feature engineering processing. For example, (1) Time feature periodicity: converting the timestamp into the form of hours of the day or day of the week, (2) Vectorized encoding of task types: converting categorical variables into numerical forms that can be processed by machine learning algorithms, (3) Abnormal data cleaning and outlier removal: ensuring the quality of the dataset and reducing the impact of noise on the model. Then, based on the operation data, operation status, and power supply load status after data preprocessing, a training sample set is constructed to predict future loads.
[0031] Next, the multi-layer feedforward neural network model is iteratively trained based on the training sample set. The main training process includes: forward propagation, error calculation, backpropagation, and iterative update. The specific training process is as follows: (1) Forward propagation calculation: The above-mentioned training sample set is input into the input layer, and then each hidden layer node in the multi-layer feedforward neural network model is used to perform weighted summation on the training sample set according to its corresponding weight coefficient to obtain the calculation result of the training sample set. The calculation result is then converted into a non-linear output result using a preset activation function (such as ReLU or Sigmoid), that is, converted into a non-linear output. Finally, the prediction result of the multi-layer feedforward neural network model (such as the CPU usage rate in a future time period) is output by the output layer; (2) Calculate the difference between the prediction result and the actual target result. For example, the Mean Squared Error (MSE) can be used as a loss function to measure the gap between the prediction result and the actual target result. The smaller the MSE, the closer the prediction of the model is to the actual value; (3) Backpropagation calculation: Use the preset gradient descent algorithm to adjust the network parameters to reduce the error. That is, starting from the output layer, calculate the influence of each weight coefficient on the total error (i.e., the gradient) layer by layer forward, and then update the weight coefficient of each layer according to the calculated gradient to improve the accuracy and stability of the model; (4) Repeat the processes of forward propagation, error calculation, and backpropagation until the difference satisfies the preset difference range and stop updating, that is, the multi-layer feedforward neural network model converges or reaches the preset maximum number of iterations. For example, divide the entire training sample set into multiple batches, and use only the data of one batch for a complete forward propagation, error calculation, and backpropagation each time, which is called an "epoch". Continue with the data of the next batch until the entire training sample set is traversed, until the performance of the multi-layer feedforward neural network model no longer improves significantly or reaches the set stop condition (such as the maximum number of epochs or the minimum error threshold). For example, if the validation set error in the training sample set has been increasing for 3 consecutive rounds, it is determined that the multi-layer feedforward neural network model meets the termination training condition, and at this time, the training is terminated to prevent overfitting, and finally a load prediction model is obtained.
[0032] Finally, cross-validation (such as K-fold) can be used to further enhance the stability of the load prediction model. For example, divide the training data into K subsets, take each subset as the validation set in turn, and combine the remaining K - 1 subsets as the training set. Train and validate the model K times, and finally take the average of the K validation results as the performance index of the load prediction model, which helps to improve the generalization ability of the load prediction model and reduce the risk of overfitting. After the load prediction model is trained, it is deployed as an online prediction service, so that it can receive real-time input based on the above-built load prediction model and output the load prediction trend, that is, output the task migration prediction result.
[0033] Optionally, embodiments of the present invention may also employ more advanced machine learning algorithms (such as deep reinforcement learning, graph neural networks, etc.) to improve the accuracy and generalization ability of the load prediction model, enhance the prediction accuracy of future load trends, and thus make more accurate task scheduling decisions. For example, the topological relationship between servers can be modeled using a graph neural network (GNN) to better capture the global load change trend.
[0034] Furthermore, based on the construction of the load prediction model, the present invention can also extend the task migration strategy to the edge computing environment. Considering the characteristics of edge nodes, a dedicated load prediction model and migration strategy are designed to ensure that tasks can be efficiently executed on the nearest edge nodes, thereby optimizing task scheduling and resource allocation among edge nodes, improving the response speed and resource utilization rate of the edge computing system, and meeting the application requirements of low latency and high bandwidth.
[0035] Specifically, first, analyze the characteristics of edge nodes, collect information such as the hardware configuration of edge nodes (such as hardware parameters of CPU, memory, storage, etc.), network connection quality (such as bandwidth, latency), and geographical location, and understand and analyze their characteristics and limitations. Second, use historical monitoring data (such as frame rate, resolution, encoding method of video streams, etc.) to train the load prediction model, which needs to consider network latency and bandwidth limitations to predict the load situation within a certain period in the future. Third, according to the results of the load prediction model, preferentially select the nearest edge node for migration to ensure that each node can operate in the best state, and before migration, pre-synchronize frequently accessed data (such as common video coding libraries, configuration files, etc.) to the target edge node to reduce the access latency after migration. Finally, conduct actual tests and optimizations, test in a real environment, record key metrics such as time, latency, and resource utilization rate before and after task migration, and continuously optimize the load prediction model and migration strategy according to the feedback results to better adapt to various complex computing environments and business requirements.
[0036] Thus, by constructing and training the load prediction model, more refined management and resource scheduling optimization of the server cluster can be achieved. Specifically, it can not only improve the prediction accuracy of the system, optimize task scheduling decisions, enhance the stability and reliability of the system, but also support automated operation and maintenance, reduce energy consumption and operating costs, and enable the system to better handle dynamically changing workloads through continuous improvement and adaptive optimization, thereby significantly improving the operation efficiency and service quality of the entire server cluster.
[0037] In step S102, based on the task migration prediction result, it is determined whether the current running task of the preset service device meets the task migration trigger condition.
[0038] According to an embodiment of the present invention, based on the task migration prediction result, determining whether the currently running task of the preset service device meets the task migration trigger condition includes: based on the task migration prediction result, determining whether the preset service device can carry the currently running task; if the preset service device cannot carry the currently running task, it is determined that the currently running task meets the task migration trigger condition, otherwise, continue to execute the step of determining whether the currently running task of the preset service device meets the task migration trigger condition based on the task migration prediction result until the currently running task meets the task migration trigger condition.
[0039] Specifically, to improve the response speed and stability of the system and prevent service interruption caused by resource overload, the embodiment of the present invention needs to further determine whether the currently running task of the preset service device meets the task migration trigger condition based on the task migration prediction result output by the above load prediction model, so as to decide whether to migrate the task according to the judgment result.
[0040] Specifically, as Figure 2 and Figure 3 shown, based on the task migration prediction result, determining whether the preset service device can carry the currently running task, that is to say, comparing the task migration prediction result with the pre-set result to determine whether there are other risks such as impending overload, resource bottleneck, and decreased response ability in the preset service device. If the preset service device cannot carry the currently running task, it is determined that the currently running task meets the task migration trigger condition. At this time, a task migration operation is taken to ensure preventive measures are taken before the problem occurs. For example, if the predicted CPU or memory load will exceed the set threshold within the next T seconds, or the preset service device is in the cold start stage and the warm-up is not completed, or the power load is about to reach the warning value, or a bandwidth bottleneck is about to appear, then it is determined that the preset service device is not suitable to continue carrying the current task, that is, the currently running task meets the task migration trigger condition and task migration is required.
[0041] For example, if the future CPU usage rate will exceed 85% continuously for 5 minutes and the current preset service device is in a high task density state, then the currently running task meets the task migration trigger condition; if the future memory usage rate is higher than 90% and there are already too many tasks in the preset service device, it is marked as "resource bottleneck", and at this time the currently running task meets the task migration trigger condition; if the predicted network egress load is close to the maximum value and the task data throughput is large, then the currently running task meets the task migration trigger condition; if the server is in the "cold start" state or there is a power supply warning situation, then reduce its scheduling priority and suspend the task issuance, and at this time the currently running task meets the task migration trigger condition.
[0042] Further, if the preset service device can carry the current running task, it is determined that the current running task does not meet the task migration trigger condition. At this time, continue to execute the step of judging whether the current running task of the preset service device meets the task migration trigger condition based on the task migration prediction result until the current running task meets the task migration trigger condition.
[0043] Thus, judging whether the migration trigger condition is reached through the load prediction model can prevent resource bottlenecks, optimize task scheduling, reduce service interruptions and service quality degradation, reduce migration costs, and support automated operation and maintenance. It not only improves the prediction accuracy of the system and optimizes the task scheduling decision, but also reduces energy consumption and operating costs. Through continuous improvement and adaptive optimization, the system can better cope with dynamically changing workloads.
[0044] In step S103, if the current running task meets the task migration trigger condition, determine the migration strategy of the current running task according to the current running task, and migrate the current running task to the target service device according to the migration strategy.
[0045] Specifically, if it can be determined based on the task migration prediction result that the current running task of the preset service device meets the task migration trigger condition, it means that the current task of the current preset service device needs to be migrated. Therefore, the migration strategy of the current running task can be determined according to the current running task, and the current running task can be migrated to the target service device according to the migration strategy, thereby reducing the migration cost and improving the migration efficiency.
[0046] According to an embodiment of the present invention, determining the migration strategy of the current running task according to the current running task includes: obtaining at least one task attribute of the current running task; generating the migration strategy of the current running task respectively according to each task attribute of the current running task, where the migration strategy includes overall migration, task volume compression migration, and slice migration.
[0047] According to an embodiment of the present invention, migration policies for running tasks are generated respectively according to each task attribute of the running tasks, including: obtaining the task type, task status, and task volume of the running task; determining whether the task type of the running task is the first task type, and / or the task status is the first task status, and / or the task volume is the first task volume; if the task type of the running task is the first task type, and / or the task status is the first task status, and / or the task volume is the first task volume, then generate the migration policy for the running task as an overall migration policy, otherwise, determine whether the task status of the running task is the second task status, and / or the task volume is the second task volume; if the task status of the running task is the second task status, and / or the task volume is the second task volume, then generate the migration policy for the running task as a task volume compression migration policy, otherwise, determine whether the task type of the running task is the third task type; if the task type of the running task is the third task type, then generate the migration policy for the running task as a slicing migration policy.
[0048] Specifically, the migration policies for the currently running tasks may include an overall migration policy, a task volume compression migration policy, and a slicing migration policy. Among them, the above migration policies are mainly determined by each task attribute of the currently running task, that is, the type, task status, and task volume of the task.
[0049] Specifically, as Figure 2 and Figure 4 shown, first, obtain the task type, task status, and task volume of the running task, and determine whether the task type of the running task is the first task type (such as a short-term task), and / or the task status is the first task status (such as a lightweight task status), and / or the task volume is the first task volume (such as a small volume). If the task type of the running task is the first task type, and / or the task status is the first task status, and / or the task volume is the first task volume, then generate the migration policy for the running task as an overall migration policy. That is to say, when the task type of the running task is a short-term task, and / or the task status is a lightweight task status, and / or the task volume is a small volume, the migration policy of the running task at this time adopts the overall migration policy.
[0050] Optionally, when the task type of the running task is not a short-term task, the task status is not a light status, and the task volume is not a small volume, further determine whether the task status of the running task is a second task status (such as a complex status or a data-intensive task), and / or whether the task volume is a second task volume (such as a large volume). If the task status of the running task is a second task status and / or the task volume is a second task volume, generate the migration strategy of the running task as a task volume compression migration strategy. That is to say, when the task status of the running task is a complex status or a data-intensive task, and / or the task volume is a large volume, the migration strategy of the running task at this time adopts the task volume compression migration strategy, where only the necessary computing status, logs, and core data are migrated, thereby reducing the size of the migration data packet and reducing the bandwidth and migration consumption.
[0051] Optionally, when the task status of the running task is not a complex status and the task volume is not a large volume, further determine whether the task type of the running task is a third task type (such as a long-cycle task, a task that can be executed in chunks, or a parallelizable task). If the task type of the running task is a third task type, generate the migration strategy of the running task as a slicing migration strategy. That is to say, when the task type of the running task is a long-cycle task, a task that can be executed in chunks, or a parallelizable task, the migration strategy of the running task at this time adopts the slicing migration strategy, so that the task can be split into multiple subtasks, and only some of the subtasks are migrated to other preset service devices for execution.
[0052] Thus, by analyzing the current running task type, the specific requirements of each task (such as CPU-intensive, memory-intensive, I / O-intensive, etc.) can be understood, so as to formulate a more reasonable migration strategy to reduce the migration cost and improve the migration efficiency.
[0053] According to an embodiment of the present invention, before migrating the current running task to the target service device according to the migration strategy, it further includes: detecting the resource status of other service devices in the global service device; based on the resource status, determining whether there is a service device in other service devices that can satisfy the execution of the current running task; if there is a service device that can satisfy the execution of the current running task, determining the target service device from the service devices that can satisfy the execution of the current running task.
[0054] Specifically, as Figure 2 shown, after determining the migration strategy of the current running task according to the current running task, the current running task can be migrated to the target service device according to the migration strategy. However, before migration, it is also necessary to first find a suitable target service device for the current running task, so as to perform task migration according to the matched target service device, and further ensure that the migrated task can be executed under optimal conditions and reduce the risk of performance degradation.
[0055] Specifically, first, detect the resource status of other service devices in the global service device, and preferentially select a server with a lower load, which has completed cold start, a short data access path, and a reasonable power load as the target service device. Then, based on the resource status, determine whether there is a service device in other service devices that meets the requirements for running the current running task. If there is a service device that meets the requirements for running the current running task, it means that the matched other service device can carry the current task. At this time, determine the target service device from the service devices that meet the requirements for running the current running task.
[0056] Thus, determining the target service device from the service devices that meet the requirements for running the current running task can ensure that the task is migrated to the most suitable service device, maximize resource utilization, reduce unnecessary migration times, optimize the migration strategy, reduce migration costs, avoid resource waste, and at the same time prevent overload and service interruption, improving the system's response speed and user satisfaction.
[0057] According to an embodiment of the present invention, determining the target service device from the service devices that meet the requirements for running the current running task includes: determining whether there are multiple service devices that meet the requirements for running the current running task; if there are multiple service devices that meet the requirements for running the current running task, then based on a preset sorting strategy, sort the multiple service devices that meet the requirements for running the current running task, and use the service device in the first position as the target service device.
[0058] According to an embodiment of the present invention, sorting the multiple service devices that meet the requirements for running the current running task based on a preset sorting strategy and using the service device in the first position as the target service device includes: calculating the comprehensive score of each service device among the multiple service devices that meet the requirements for running the current running task based on a preset calculation rule; based on the comprehensive score of each service device, sort the multiple service devices that meet the requirements for running the current running task in descending order, and use the service device in the first position as the target service device.
[0059] Among them, the preset calculation rule can be set by those skilled in the art according to actual test requirements, and no specific limitation is made here.
[0060] Specifically, since the number of target service devices may not be unique, first, determine the number of existing target service devices, that is, judge whether there are multiple service devices that meet the requirements for running the current running task based on the resource status of other service devices in the global service devices. If there are multiple service devices that meet the requirements for running the current running task, further calculate the comprehensive score of each service device among the multiple service devices that meet the requirements for running the current running task based on a preset calculation rule, and then sort the multiple service devices that meet the requirements for running the current running task in descending order, and use the service device in the first position as the target service device.
[0061] Specifically, to determine whether there are multiple service devices that meet the requirements for running the current running task, the embodiments of the present invention can be selected through a preset sorting strategy. For example, sort by the smallest load first, the lowest power consumption first, and the smallest delay first. To ensure a better selection result, the embodiments of the present invention can also be selected by calculating the comprehensive score of each service device. For example, the embodiments of the present invention can be calculated through weighted scheduling scoring. The calculation formula is: comprehensive score = 0.4 * resource margin + 0.3 * reciprocal of topological delay + 0.3 * power load margin. The resource margin can be the proportion of the remaining available resources in the target service device, such as the remaining CPU, memory, disk space, etc. The higher the value, the more sufficient resources the target service device has to accept new tasks. The reciprocal of the topological delay can be the reciprocal of the network delay between the target service device and other key nodes (such as the client or the core node of the data center). A lower delay means higher communication efficiency. Therefore, after taking its reciprocal, the higher the value, the lower the delay and the better the connectivity. The power load margin can be the remaining capacity under the current power load of the target service device. The higher the value, the greater the redundancy of the server in terms of power, and it can safely accept more tasks without overloading. Then, sort in descending order according to the calculation result of the comprehensive score, and specify the service device with the highest score as the target service device.
[0062] For example, assume that there are currently 3 target service devices that meet the requirements for running the current running task, such as service device A, service device B, and service device C. Among them, for server A: the resource margin is 80%, the topological delay is 5 ms (reciprocal is 200), and the power load margin is 70%; for server B: the resource margin is 60%, the topological delay is 3 ms (reciprocal is 333), and the power load margin is 60%; for server C: the resource margin is 90%, the topological delay is 4 ms (reciprocal is 250), and the power load margin is 50%. Then, calculate the comprehensive score according to the above parameters, and we can get: Comprehensive score of A = 0.4×80 + 0.3×200 + 0.3×70 = 32 + 60 + 21 = 113; Comprehensive score B = 0.4×60 + 0.3×333 + 0.3×60 = 24 + 99.9 + 18 = 141.9; Comprehensive score C = 0.4×90 + 0.3×250 + 0.3×50 = 36 + 75 + 15 = 126; From this, it can be obtained that the comprehensive score of service device B is the highest. Therefore, service device B can be used as the target service device.
[0063] Thus, by determining the service device that meets the current running task and selecting the most suitable target service device from them, it can ensure that the task is migrated to the most suitable server, maximize resource utilization, avoid resource waste, reduce unnecessary migration times, optimize the migration strategy, reduce migration costs, and thereby improve the operation efficiency and service quality of the entire server cluster, ensuring the efficient and stable operation of the system.
[0064] According to an embodiment of the present invention, after determining whether there are multiple service devices that meet the current running task, it further includes: if there is a single service device that meets the current running task, then use the service device that meets the current running task as the target service device.
[0065] Specifically, if there is a single service device that meets the current running task, it means that only one service device meets the current running task at this time. Then, this service device can be directly used as the target service device for task migration.
[0066] Thus, by determining the service device that meets the current running task, the operation efficiency and service quality of the entire server cluster can be improved, ensuring the efficient and stable operation of the system.
[0067] According to an embodiment of the present invention, before migrating the current running task to the target service device according to the migration strategy, it further includes: obtaining the hot data of the current running task; extracting the running information of the hot data, and pre-storing the running information of the hot data to the target service device using a preset caching strategy.
[0068] Among them, the preset caching strategy can be set by those skilled in the art according to actual test requirements, and no specific limitation is made here.
[0069] Specifically, after determining the target service device, the current running task can be migrated to the target service device according to the migration policy at this time. However, in order to reduce the access latency after migration and improve the access efficiency, before migrating the current running task to the target service device according to the migration policy, the embodiments of the present invention also need to pre-copy or synchronize the high-frequency access data (i.e., the hot data of the current running task) to the target server based on the historical I / O access records and the current task type, and then extract the running information of the hot data, such as prefetching relevant database blocks, file caches, logs, etc. in advance. Finally, the running information of the hot data is pre-stored in the target service device using a preset caching policy. For example, a distributed cache or an edge data synchronization mechanism can be used to concurrently load data during migration to ensure that after the migration is completed, the target service device can achieve latency-free data calls, avoid performance degradation of the migrated task due to changes in the data access path, and improve the migration efficiency.
[0070] Further, after determining the migration policy of the current running task, the target service device, and the storage of the hot data, etc., the current running task can be migrated to the target service device. For example, the computing state and data required for the task are migrated to the target server, and the task is redeployed on the target service device. Among them, if the migration method is volume compression migration, the migration data packet is compressed first, and only the necessary content is retained to reduce bandwidth occupancy; if the migration method is slice migration, some subtasks are re-bound to the target server in parallel, and logs and performance metrics are recorded during the migration process to ensure the smooth completion of the migration process, maintain service continuity and efficiency, and provide a basis for future optimization.
[0071] Further, to ensure the secure transmission and storage of data, an encryption and privacy protection mechanism can be introduced during the process of migrating the current running task to the target service device to prevent the leakage of sensitive data and protect user privacy and system security. For example, end-to-end encryption technology is used to encrypt the data during the task migration process to ensure that only the authorized target server can decrypt and access the data.
[0072] Thus, by synchronizing the hot data in advance, it is ensured that the migrated task can quickly access the required data, reducing the access latency caused by the data not being local. At the same time, the overall performance and stability of the system can be improved, and service interruption or performance degradation caused by data access bottlenecks can be avoided.
[0073] In summary, the embodiments of the present invention are mainly used in cloud computing platforms, high-performance computing clusters, and large data centers. Through a series of steps such as multi-dimensional running data collection, intelligent load prediction, migration policy decision-making, and data preloading, the accurate migration of cluster tasks and the dynamic balanced allocation of server resources are achieved, and the following beneficial effects can be realized: (1)Compared with the existing passive response scheduling mechanism, the present invention conducts short-term load trend prediction based on multi-factor modeling (CPU, memory, I / O, power, etc.), and can predict and take migration measures before the occurrence of load overload, thereby preventing sudden resource bottlenecks and ensuring the stability of the server. (2)The present invention introduces various migration strategies such as task volume compression and task slice migration, which can effectively reduce the overall data migration volume, improve the migration speed and efficiency, and are particularly suitable for complex tasks with large amounts of data and long-term operation such as AI (Artificial Intelligence) training. (3)By pre-migrating hot data and preloading caches, the present invention can ensure the continuous and efficient operation of migration tasks on the target server, avoid bottlenecks caused by remote data access, and improve the service response speed.
[0074] According to the server cluster task migration method proposed by the embodiments of the present invention, by obtaining the task migration prediction result, where the task migration prediction result is predicted by a pre-trained load prediction model, based on the task migration prediction result, when the currently running task meets the task migration trigger condition, determining the migration strategy of the currently running task according to the currently running task, and migrating the currently running task to the target service device according to the migration strategy. It solves the technical problems of uneven load scheduling, unreasonable migration timing, high migration cost, waste of computing resources, and excessive energy consumption in the server cluster of the related technology, and realizes the efficient allocation and operation optimization of server cluster resources through multi-dimensional operation data collection, intelligent load prediction, task migration strategies, etc.
[0075] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a 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.
[0076] The embodiments of the present invention also provide a server cluster task migration device.
[0077] Figure 5 It is a block diagram of the server cluster task migration device according to the embodiments of the present invention.
[0078] As Figure 5 shown, the server cluster task migration device 10 includes: an acquisition module 100, a judgment module 200, and a migration module 300.
[0079] Among them, the acquisition module 100 is used to acquire the task migration prediction result, where the task migration prediction result is predicted by a pre-trained load prediction model; A judgment module 200, configured to judge whether the current running task of a preset service device meets the task migration trigger condition based on the task migration prediction result; A migration module 300, configured to, if the current running task meets the task migration trigger condition, determine a migration strategy for the current running task according to the current running task, and migrate the current running task to a target service device according to the migration strategy.
[0080] According to an embodiment of the present invention, before obtaining the task migration prediction result, the obtaining module 100 further includes: A construction unit, configured to construct a multi-layer feedforward neural network model, where the multi-layer feedforward neural network model includes an input layer, at least one hidden layer, and an output layer; A training unit, configured to train the multi-layer feedforward neural network model based on a preset model training strategy, and stop training when the multi-layer feedforward neural network model meets the termination training condition, so as to obtain a load prediction model.
[0081] According to an embodiment of the present invention, the training unit includes: A first obtaining subunit, configured to obtain the operation data of the preset service device, the operation state of the preset service device, and the power supply load state of the area where the preset service device is located based on a preset sampling period; A data processing subunit, configured to perform data preprocessing on the operation data, operation state, and power supply load state, and construct a training sample set based on the operation data, operation state, and power supply load state after data preprocessing; A training subunit, configured to perform iterative training on the multi-layer feedforward neural network model based on the training sample set, and determine that the multi-layer feedforward neural network model meets the termination training condition and obtain a load prediction model if the error of the validation set in the training sample set is in a preset change state for a continuous preset number of times.
[0082] According to an embodiment of the present invention, the training subunit includes: A first calculation component, configured to perform weighted summation on the training sample set by using the weight coefficients corresponding to each hidden layer node in the multi-layer feedforward neural network model to obtain a calculation result of the training sample set; A conversion component, configured to convert the calculation result into a non-linear output result by using a preset activation function to obtain a prediction result of the multi-layer feedforward neural network model; An update component is used to calculate the difference between the predicted result and the actual target result. When the difference does not meet the preset difference range, the weight coefficients corresponding to each hidden layer node are updated using the preset gradient descent algorithm until the difference meets the preset difference range and the update stops. Then, the new weight coefficients corresponding to each hidden layer node after the update are used to perform weighted summation on the training sample set to obtain a new calculation result of the training sample set, and the step of calculating the difference between the predicted result and the actual target result is continued until the validation set error in the training sample set remains in the preset change state for a preset number of consecutive times.
[0083] According to an embodiment of the present invention, the determination module 200 includes: A first determination unit for determining whether a preset service device can carry the current running task based on the task migration prediction result; A decision-making unit for determining that the current running task meets the task migration trigger condition if the preset service device cannot carry the current running task, otherwise, continuing to execute the step of determining whether the current running task of the preset service device meets the task migration trigger condition based on the task migration prediction result until the current running task meets the task migration trigger condition.
[0084] According to an embodiment of the present invention, the migration module 300 includes: A first acquisition unit for acquiring at least one task attribute of the current running task; A generation unit for generating a migration strategy for the current running task according to each task attribute of the current running task, where the migration strategy includes overall migration, task volume compression migration, and slice migration.
[0085] According to an embodiment of the present invention, the generation unit includes; A second acquisition subunit for acquiring the task type, task status, and task volume of the running task; A first judgment subunit for judging whether the task type of the running task is the first task type, and / or the task status is the first task status, and / or the task volume is the first task volume; A first generation subunit for generating the migration strategy of the running task as an overall migration strategy if the task type of the running task is the first task type, and / or the task status is the first task status, and / or the task volume is the first task volume, otherwise, judging whether the task status of the running task is the second task status, and / or the task volume is the second task volume; A second generation subunit for generating the migration strategy of the running task as a task volume compression migration strategy if the task status of the running task is the second task status, and / or the task volume is the second task volume, otherwise, judging whether the task type of the running task is the third task type; The third generation subunit is configured to generate a slice migration policy as the migration policy for the running task if the task type of the running task is the third task type.
[0086] According to an embodiment of the present invention, before migrating the currently running task to the target service device according to the migration policy, the migration module 300 further includes: A detection unit for detecting the resource status of other service devices in the global service device; A second judgment unit for judging whether there is a service device that meets the requirements for running the currently running task among other service devices based on the resource status; A determination unit for determining a target service device from the service devices that meet the requirements for running the currently running task if there is a service device that meets the requirements for running the currently running task.
[0087] According to an embodiment of the present invention, the determination unit includes: A second judgment subunit for judging whether there are multiple service devices that meet the requirements for running the currently running task; A sorting subunit for sorting the multiple service devices that meet the requirements for running the currently running task based on a preset sorting policy if there are multiple service devices that meet the requirements for running the currently running task, and taking the service device in the first position as the target service device.
[0088] According to an embodiment of the present invention, the sorting subunit includes: A second calculation component for calculating the comprehensive score of each service device among the multiple service devices that meet the requirements for running the currently running task based on a preset calculation rule; A sorting component for sorting the multiple service devices that meet the requirements for running the currently running task in descending order based on the comprehensive score of each service device, and taking the service device in the first position as the target service device.
[0089] According to an embodiment of the present invention, after judging whether there are multiple service devices that meet the requirements for running the currently running task, the second judgment subunit further includes: A judgment component for taking the service device that meets the requirements for running the currently running task as the target service device if there is a single service device that meets the requirements for running the currently running task.
[0090] According to an embodiment of the present invention, before migrating the currently running task to the target service device according to the migration policy, the migration module 300 further includes: A second acquisition unit for acquiring the hot data of the currently running task; A storage unit for extracting the running information of the hot data and pre-storing the running information of the hot data to the target service device using a preset caching policy.
[0091] In summary, for the descriptions of the features in the corresponding embodiments of the server cluster task migration device, reference can be made to the relevant descriptions in the corresponding embodiments of the server cluster task migration method, which will not be elaborated herein one by one.
[0092] An embodiment of the present invention further provides an electronic device, which may include: A memory 601, a processor 602, and a computer program stored on the memory 601 and executable on the processor 602.
[0093] When the processor 602 executes the program, it implements the server cluster task migration method provided in the above embodiments.
[0094] Further, the electronic device further includes: A communication interface 603 for communication between the memory 601 and the processor 602.
[0095] The memory 601 is used to store a computer program executable on the processor 602.
[0096] The memory 601 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0097] If the memory 601, the processor 602, and the communication interface 603 are independently implemented, the communication interface 603, the memory 601, and the processor 602 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 6 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0098] Optionally, in a specific implementation, if the memory 601, the processor 602, and the communication interface 603 are integrated on a chip, the memory 601, the processor 602, and the communication interface 603 may communicate with each other through an internal interface.
[0099] The processor 602 may be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0100] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, where the computer program is configured to execute the steps in any of the above embodiments of the server cluster task migration method when running.
[0101] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as USB flash drives, Read-Only Memory (ROM), Random Access Memory (RAM), mobile hard disks, magnetic disks, or optical discs.
[0102] Embodiments of the present invention also provide a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the server cluster task migration method.
[0103] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0104] The above has introduced in detail a server cluster task migration method provided by the present invention. Specific examples are used herein to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for task migration in a server cluster, characterized in that, Including the following steps: Obtain the task migration prediction result, where the task migration prediction result is predicted by a pre-trained load prediction model; Based on the task migration prediction result, determine whether the current running task of the preset service device meets the task migration trigger condition; If the current running task meets the task migration trigger condition, determine the migration strategy of the current running task according to the current running task, and migrate the current running task to the target service device according to the migration strategy.
2. The server cluster task migration method according to claim 1, wherein Before obtaining the task migration prediction result, it further includes: Construct a multi-layer feedforward neural network model, where the multi-layer feedforward neural network model includes an input layer, at least one hidden layer, and an output layer; Train the multi-layer feedforward neural network model based on a preset model training strategy, and stop training when the multi-layer feedforward neural network model meets the termination training condition to obtain the load prediction model.
3. The server cluster task migration method according to claim 2, wherein The training of the multi-layer feedforward neural network model based on a preset model training strategy and stopping training when the multi-layer feedforward neural network model meets the termination training condition to obtain the load prediction model includes: Obtain the operation data of the preset service device, the operation state of the preset service device, and the power supply load state of the area where the preset service device is located based on a preset sampling period; Perform data preprocessing on the operation data, the operation state, and the power supply load state, and construct a training sample set based on the operation data, operation state, and power supply load state after data preprocessing; Perform iterative training on the multi-layer feedforward neural network model based on the training sample set, and if the error of the validation set in the training sample set is in a preset change state for a continuous preset number of times, determine that the multi-layer feedforward neural network model meets the termination training condition to obtain the load prediction model.
4. The server cluster task migration method according to claim 3, wherein The iterative training of the multi-layer feedforward neural network model based on the training sample set includes: Perform weighted summation on the training sample set using the weight coefficients corresponding to each hidden layer node in the multi-layer feedforward neural network model to obtain the calculation result of the training sample set; Convert the calculation result into a non-linear output result using a preset activation function to obtain the prediction result of the multi-layer feedforward neural network model; Calculate the difference between the prediction result and the actual target result, and when the difference does not meet the preset difference range, update the weight coefficients corresponding to each hidden layer node using a preset gradient descent algorithm until the difference meets the preset difference range and stop updating, and perform weighted summation on the training sample set using the new weight coefficients corresponding to each hidden layer node after updating to obtain the new calculation result of the training sample set, and continue to execute the step of calculating the difference between the prediction result and the actual target result until the error of the validation set in the training sample set is in a preset change state for a continuous preset number of times.
5. The method for migrating tasks in a server cluster according to claim 1, wherein The determination of whether the current running task of the preset service device meets the task migration trigger condition based on the task migration prediction result includes: Based on the task migration prediction result, determine whether the preset service device can carry the currently running task; If the preset service device cannot carry the currently running task, it is determined that the currently running task meets the task migration trigger condition; otherwise, continue to execute the step of determining whether the currently running task of the preset service device meets the task migration trigger condition based on the task migration prediction result until the currently running task meets the task migration trigger condition.
6. The method for task migration of a server cluster according to claim 1, wherein The determining the migration strategy of the currently running task according to the currently running task includes: Obtain at least one task attribute of the currently running task; Generate the migration strategy of the currently running task according to each task attribute of the currently running task, where the migration strategy includes overall migration, task volume compression migration, and slicing migration.
7. The method for migrating tasks in a server cluster according to claim 6, wherein The generating the migration strategy of the running task according to each task attribute of the running task includes: Obtain the task type, task status, and task volume of the running task; Judge whether the task type of the running task is the first task type, and / or the task status is the first task status, and / or the task volume is the first task volume; If the task type of the running task is the first task type, and / or the task status is the first task status, and / or the task volume is the first task volume, generate the migration strategy of the running task as the overall migration strategy; otherwise, judge whether the task status of the running task is the second task status, and / or the task volume is the second task volume; If the task status of the running task is the second task status, and / or the task volume is the second task volume, generate the migration strategy of the running task as the task volume compression migration strategy; otherwise, judge whether the task type of the running task is the third task type; If the task type of the running task is the third task type, generate the migration strategy of the running task as the slicing migration strategy.
8. The server cluster task migration method according to claim 1, wherein Before migrating the currently running task to the target service device according to the migration strategy, it further includes: Detect the resource status of other service devices in the global service device; Based on the resource status, judge whether there is a service device in the other service devices that meets the requirement of running the currently running task; If there is a service device that meets the requirement of running the currently running task, determine the target service device from the service devices that meet the requirement of running the currently running task.
9. The server cluster task migration method according to claim 8, wherein The determining the target service device from the service devices that meet the requirement of running the currently running task includes: Judge whether there are multiple service devices that meet the requirement of running the currently running task; If there are multiple service devices that meet the requirement of running the currently running task, sort the multiple service devices that meet the requirement of running the currently running task based on a preset sorting strategy, and use the service device in the first position as the target service device.
10. The method for migrating tasks in a server cluster according to claim 9, wherein Based on a preset sorting strategy, sort multiple service devices that meet the requirement of running the current running task, and use the service device in the first position as the target service device, including: Calculate the comprehensive score of each service device among the multiple service devices that meet the requirement of running the current running task based on a preset calculation rule; Based on the comprehensive scores of each service device, sort the multiple service devices that meet the requirement of running the current running task in descending order, and use the service device in the first position as the target service device.
11. The method for migrating tasks in a server cluster according to claim 9, wherein After determining whether there are multiple service devices that meet the requirement of running the current running task, it further includes: If there is a single service device that meets the requirement of running the current running task, use the service device that meets the requirement of running the current running task as the target service device.
12. The method for migrating tasks in a server cluster according to claim 1, wherein Before migrating the current running task to the target service device according to the migration strategy, it further includes: Obtain the hot data of the current running task; Extract the running information of the hot data, and use a preset caching strategy to pre-store the running information of the hot data to the target service device.
13. An electronic device, characterized in that, It includes: A memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the steps of the server cluster task migration method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program, when executed by the processor, implements the steps of the server cluster task migration method according to any one of claims 1 to 12.
15. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the server cluster task migration method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Equipment scheduling method and device, equipment and storage medium
CN113918341A
Data transmission task migration method and device, equipment and storage medium
CN118677950A
Heterogeneous task allocation method based on prediction equilibrium ratio and resource constraint
CN119166306A
Intelligent cluster fault tolerance method based on distributed component dynamic migration
CN119961039A
Air conditioner energy-saving control method and system based on virtual power plant
CN120062767A
Cited By
Heterogeneous database migration scheduling method, equipment and device based on distributed architecture
CN120723417A
Operator edge computing node optimization method and system
CN121126445A