Server cluster task migration method, electronic device, storage medium and product
By building a multi-layer feedforward neural network model for load prediction and optimizing task migration strategies, the problems of uneven load, unreasonable migration, high cost, resource waste and high energy consumption in server clusters are solved, and efficient resource allocation and system stability are achieved.
Patent Information
- Application Number
- CN202510854752.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-24
AI Technical Summary
The existing technology has problems such as uneven load scheduling, unreasonable migration timing, high migration cost, waste of computing resources and excessive energy consumption in server clusters.
By building a multi-layer feedforward neural network model for load prediction, combining multi-dimensional operation data collection and intelligent load prediction, the task migration triggering conditions are determined, and strategies such as overall migration, task volume compression migration, and slice migration are adopted to optimize task migration decisions.
It achieves efficient allocation and operation optimization of server cluster resources, improves the system's prediction accuracy and stability, reduces migration costs and energy consumption, optimizes task scheduling decisions, and enhances the system's automated operation and maintenance capabilities.
Smart Images

Figure CN120371533B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server cluster management, and in particular to a server cluster task migration method, electronic equipment, storage medium and product. Background Art
[0002] With the rapid growth of cloud computing and big data processing needs, server clusters have become the core infrastructure supporting various network services, carrying a large number of concurrent computing tasks. To ensure service continuity and resource utilization efficiency, the task scheduling and migration efficiency of server clusters are very important.
[0003] Most related technologies use a threshold-driven approach to perform task migration. That is, the system triggers task migration only when the resource usage of a server exceeds a set threshold (such as CPU (Central Processing Unit) utilization greater than 85%). However, this passive migration approach can lead to uneven load scheduling in server clusters, unreasonable migration timing, high migration costs, waste of computing resources, and excessive energy consumption, all of which urgently need to be addressed. Summary of the Invention
[0004] The present invention provides a server cluster task migration method, electronic equipment, storage medium and product to at least solve the problems of uneven load scheduling, unreasonable migration timing, high migration cost, waste of computing resources and excessive energy consumption in server clusters in related technologies.
[0005] The present invention provides a server cluster task migration method, comprising:
[0006] Obtaining a task migration prediction result, wherein the task migration prediction result is obtained by predicting a pre-trained load prediction model;
[0007] Based on the task migration prediction result, determining whether the currently running task of the preset service device meets the task migration triggering condition;
[0008] If the currently running task meets the task migration triggering condition, a 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.
[0009] The present invention also provides a server cluster task migration device, comprising:
[0010] An acquisition module is used to obtain a task migration prediction result, wherein the task migration prediction result is obtained by predicting a pre-trained load prediction model;
[0011] A judgment module, configured to judge whether a currently running task of a preset service device satisfies a task migration triggering condition based on the task migration prediction result;
[0012] A migration module is used to determine a migration strategy for the currently running task according to the currently running task if the currently running task meets the task migration triggering condition, and migrate the currently running task to a target service device according to the migration strategy.
[0013] The present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the server cluster task migration method as described in the above embodiment.
[0014] The present invention 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 server cluster task migration methods are implemented.
[0015] The present invention also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned server cluster task migration methods when executed by a processor.
[0016] The present invention, based on task migration prediction results, determines a migration strategy for the currently running task when it meets the task migration triggering conditions, and migrates the currently running task to the target service device according to the migration strategy. This solves the technical problems of uneven load scheduling, unreasonable migration timing, high migration costs, wasted computing resources, and excessive energy consumption in server clusters in related technologies. By integrating multi-dimensional operational data collection, intelligent load prediction, and task migration strategies, the invention achieves efficient allocation of server cluster resources and operational optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 A flow chart of a server cluster task migration method provided by an embodiment of the present invention;
[0019] Figure 2 A flowchart of the overall implementation of server cluster task migration according to an embodiment of the present invention;
[0020] Figure 3A flowchart of determining server cluster task migration according to an embodiment of the present invention;
[0021] Figure 4 A logic flow chart for determining a migration mode for a server cluster task according to an embodiment of the present invention;
[0022] Figure 5 A block diagram of a server cluster task migration device according to an embodiment of the present invention;
[0023] Figure 6 FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0025] It should be noted that, in the description of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. The terms "first," "second," etc., in the present invention are used to distinguish similar objects, and are not used to describe a particular order or precedence.
[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0027] An embodiment of the present invention provides a server cluster task migration method, and the method is described in detail in conjunction with the execution flow of the server cluster task migration method.
[0028] Before introducing the embodiments of the present invention, we first introduce the server cluster task migration method used in the related art. The related art mainly performs task migration based on a threshold-driven method, that is, when the resource usage of a server exceeds a set threshold (such as CPU usage greater than 85%), the system will trigger task migration. However, this passive task migration has the following defects: (1) delayed response, task migration often starts after the server is overloaded, which may lead to performance degradation and service interruption; (2) high migration cost, the overall task migration involves the synchronization of a large amount of data and status, and the bandwidth and energy consumption are very high; (3) lack of multi-dimensional consideration, the server cold start time, power load, data access path and other factors are not considered during task migration, which will lead to a decrease in task execution efficiency after migration. Therefore, based on the above problems, the embodiments of the present invention achieve accurate migration of cluster tasks and 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.
[0029] Specifically, Figure 1 A schematic flow chart of a server cluster task migration method provided by an embodiment of the present invention.
[0030] like Figure 1 As shown, the server cluster task migration method includes the following steps:
[0031] In step S101 , a task migration prediction result is obtained, wherein the task migration prediction result is predicted by a pre-trained load prediction model.
[0032] According to one embodiment of the present invention, before obtaining the task migration prediction result, it also includes: constructing a multi-layer feedforward neural network model, wherein 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 the training when the multi-layer feedforward neural network model meets the termination training conditions to obtain a load prediction model.
[0033] Among them, the preset model training strategy can be set by technical personnel in this field according to actual testing requirements and is not specifically limited here.
[0034] Specifically, since the server cluster task migration method of the related technology usually takes measures only when the server is overloaded or about to be overloaded, this often leads to service interruption or performance degradation, and when performing task migration, it is often necessary to consider multiple factors, including the current load of the area where the preset service equipment is located, historical load trends and future load forecasts. Without accurate load forecasts, it is difficult to make the optimal task scheduling decision. Therefore, the embodiment of the present invention needs to construct a load prediction model to achieve accurate prediction of future loads, thereby helping the system to make more reasonable task migration decisions, and at the same time, it can also identify potential resource bottlenecks in advance. For example, if it is predicted that the CPU usage will exceed 85% at a certain point in the future, preventive measures (such as task migration) can be taken before it actually occurs, thereby avoiding sudden resource bottlenecks.
[0035] Specifically, if Figure 2 As shown, the embodiment of the present invention first constructs a multi-layer feedforward neural network model, which mainly includes an input layer, at least one hidden layer and an output layer. 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, which reflects the occupancy of processing power; memory usage, which reflects the usage of RAM (Random Access Memory); network inbound and outbound traffic, which reflects the communication load; disk read and write rates, which reflect the I / O (Input / Output) performance pressure; server operation status, including normal / cold start / abnormal; historical migration times, which reflect whether frequent migrations lead to cold state; current number of tasks, which reflects the number of concurrent tasks, etc.; the hidden layer is used to extract nonlinear feature relationships in the input data. The number of nodes is determined based on experience and cross-validation, and Sigmoid or ReLU (Rectified Linear Unit) functions can be used; the output layer is used to output prediction results, which can be continuous values (such as CPU usage in the next 10 minutes) or interval classification forms (for example, they can be 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.
[0036] Secondly, based on the preset model training strategy, the multi-layer feedforward neural network model constructed above is trained through input features, and when the multi-layer feedforward neural network model meets the termination training conditions, the training is stopped to obtain the final load prediction model.
[0037] Therefore, by building a load prediction model, we can achieve more refined management of server clusters and task migration optimization, 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 data centers.
[0038] According to one embodiment of the present invention, a multi-layer feedforward neural network model is trained based on a preset model training strategy, and when the multi-layer feedforward neural network model meets the termination training condition, the training is stopped to obtain a load prediction model, including: obtaining the operating data of the preset service equipment, the operating status of the preset service equipment and the power supply load status of the area where the preset service equipment is located based on a preset sampling period; performing data preprocessing on the operating data, the operating status and the power supply load status, and constructing a training sample set based on the operating data, the operating status and the power supply load status after data preprocessing; iteratively training the multi-layer feedforward neural network model based on the training sample set, and when the verification set error in the training sample set is in a preset change state for a consecutive preset number of times, it is determined that the multi-layer feedforward neural network model meets the termination training condition, and the load prediction model is obtained.
[0039] According to one embodiment of the present invention, a multi-layer feedforward neural network model is iteratively trained based on a training sample set, including: performing weighted summation on the training sample set using the weight coefficient corresponding to each hidden layer node in the multi-layer feedforward neural network model to obtain a calculation result of the training sample set; converting the calculation result into a nonlinear output result using a preset activation function 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 a preset difference range, updating the weight coefficient corresponding to each hidden layer node using a preset gradient descent algorithm until the difference meets the preset difference range and then stopping the updating; performing weighted summation on the training sample set using the new weight coefficient corresponding to each hidden layer node after the update to obtain a new calculation result of the training sample set, and continuing to perform the step of calculating the difference between the prediction result and the actual target result until the verification set error in the training sample set is in a preset change state for a preset number of consecutive times.
[0040] Among them, the preset service equipment, preset sampling period, preset number of times, preset change state, preset activation function, preset difference range, and preset gradient descent algorithm can all be set by technical personnel in this field according to actual testing requirements and are not specifically limited here.
[0041] Specifically, such as Figure 2As shown, in the process of training the load prediction model, first, multi-dimensional operating data of the preset service device, the operating status of the preset service device, and the power supply load status of the area where the preset service device is located are obtained based on a preset sampling period, and the above data are used as input features. For example, the multi-dimensional operating data, operating status of the preset service device, and the power supply load status of the area where the preset service device is located are collected from each preset service device node with a sampling period of 30 seconds to comprehensively evaluate the feasibility of migration. The multi-dimensional operating data of the preset service device includes indicators such as the CPU usage, memory usage, 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 operating status of the preset service device includes normal operation, cold start, and offline. The above data can be regularly collected through a local agent program, a cluster management platform, or a third-party monitoring tool, and can be pulled using a local agent or a remote monitoring API (Application Programming Interface) and stored in a database to form time series samples. Therefore, the collection of the above data can provide necessary input data for subsequent load prediction.
[0042] Secondly, based on the above-collected operating data, operating status and power supply load status of the preset service equipment and the area where the preset service equipment is located, in order to ensure the accuracy of the data, it is necessary to further preprocess the operating data, operating status and power supply load status, which mainly includes data cleaning and formatting of the above-collected data, such as removing missing values, and standardizing the input features (such as normalizing the values to the range of 0~1), as well as feature engineering processing, such as (1) time feature periodization: converting the timestamp into the form of hours of the day or days 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 data set and reducing the impact of noise on the model. Then, a training sample set is constructed based on the operating data, operating status and power supply load status after data preprocessing to predict future loads.
[0043] Thirdly, 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, back propagation and iterative update. The specific training process is (1) forward propagation calculation, inputting the above training sample set into the input layer, and then using each hidden layer node in the multi-layer feedforward neural network model, weighted summing the training sample set according to its corresponding weight coefficient to obtain the calculation result of the training sample set, and using the preset activation function (such as ReLU or Sigmoid) to convert the calculation result into a nonlinear output result, that is, converting it into a nonlinear output, and finally outputting the prediction result of the multi-layer feedforward neural network model (such as the CPU usage rate in a certain time period in the future) from the output layer; (2) calculating the difference between the prediction result and the actual target result, for example, it can be calculated by MSE (Mean Squared Error). The error (mean square error) is used as the loss function to measure the gap between the predicted result and the actual target result. The smaller the MSE, the closer the model's prediction is to the actual value. (3) Back propagation calculation, using the preset gradient descent algorithm to adjust the network parameters to reduce the error, that is, starting from the output layer, forward calculate the impact of each weight coefficient on the total error (i.e., gradient) layer by layer, 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 process of forward propagation, error calculation and back propagation until the difference meets the preset difference range and stops updating, that is, the multi-layer feedforward neural network model converges or reaches the predicted value. Set the maximum number of iterations. For example, the entire training sample set is divided into multiple batches, and only one batch of data is used each time for a complete forward propagation, error calculation, and backpropagation, which is called an "epoch". Continue with the next batch of data 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 stopping 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 is in an increasing state for three consecutive rounds, it is determined that the multi-layer feedforward neural network model meets the termination training condition. At this time, the training is terminated to prevent overfitting, and finally a load forecasting model is obtained.
[0044] Finally, cross-validation (such as K-fold) can be used to further enhance the stability of the load prediction model. For example, the training data can be divided into K subsets, each subset is used as the validation set in turn, and the remaining K-1 subsets are combined as the training set. The model is trained and validated K times, and the average of the K validation results is finally taken as the performance indicator of the load prediction model. This 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, which can receive real-time input based on the load prediction model constructed above and output load prediction trends, that is, output task migration prediction results.
[0045] Optionally, embodiments of the present invention may also use more advanced machine learning algorithms (such as deep reinforcement learning, graph neural networks, etc.) to improve the accuracy and generalization ability of the load forecasting model, improve the accuracy of predicting future load trends, and thus make more accurate task scheduling decisions. For example, the topological relationship between modeling servers can be modeled using graph neural networks (GNNs) to better capture global load change trends.
[0046] 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. According to the characteristics of the edge nodes, a special load prediction model and migration strategy are designed to ensure that the task can be efficiently executed on the nearest edge node, thereby optimizing the task scheduling and resource allocation between edge nodes, improving the response speed and resource utilization of the edge computing system, and meeting the application requirements of low latency and high bandwidth.
[0047] Specifically, first, analyze the characteristics of edge nodes, collect information such as the hardware configuration (such as CPU, memory, storage and other hardware parameters), network connection quality (such as bandwidth, latency), geographic location, etc. of edge nodes, understand and analyze their characteristics and limitations; second, use historical monitoring data (such as the frame rate, resolution, encoding method of the video stream), train the load prediction model, and the load prediction model needs to take into account network latency and bandwidth limitations to predict the load situation in a certain time period in the future; third, based on the results of the load prediction model, give priority to migrating the nearest edge nodes to ensure that each node can operate in the best state, and before migration, pre-synchronize high-frequency access data (such as commonly used video encoding libraries, configuration files, etc.) to the target edge node to reduce access delay after migration; finally, conduct actual testing and optimization, test in a real environment, record key indicators such as time, latency, resource utilization before and after task migration, and continuously optimize the load prediction model and migration strategy based on feedback results to better adapt to various complex computing environments and business needs.
[0048] Therefore, by building and training load prediction models, more refined management and resource scheduling optimization of server clusters can be achieved. Specifically, it can not only improve the system's prediction accuracy, optimize task scheduling decisions, and enhance the system's stability and reliability, but also support automated operation and maintenance, reduce energy consumption and operating costs, and through continuous improvement and adaptive optimization, enable the system to better cope with dynamically changing workloads, thereby significantly improving the operating efficiency and service quality of the entire server cluster.
[0049] In step S102, based on the task migration prediction result, it is determined whether the currently running task of the preset service device meets the task migration triggering condition.
[0050] According to one embodiment of the present invention, based on the task migration prediction result, whether the current running task of the preset service device meets the task migration trigger condition is judged, including: based on the task migration prediction result, whether the preset service device can carry the current running task; if the preset service device cannot carry the current running task, then it is determined that the current running task meets the task migration trigger condition, otherwise, 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.
[0051] Specifically, in order to improve the response speed and stability of the system and prevent service interruption due to resource overload, the embodiment of the present invention needs to further determine whether the current running task of the preset service device meets the task migration trigger condition based on the task migration prediction result output by the load prediction model, so as to decide whether to migrate the task based on the judgment result.
[0052] Specifically, if Figure 2 and Figure 3 As shown, based on the task migration prediction result, it is determined whether the preset service device can carry the current running task. That is, the task migration prediction result is compared with the preset result to determine whether the preset service device has other risks such as impending overload, resource bottleneck, and decreased responsiveness. If the preset service device cannot carry the current running task, it is determined that the current running task meets the task migration trigger condition. At this time, a task migration operation is taken to ensure that preventive measures are taken before the problem occurs. For example, if the predicted CPU or memory load will exceed the set threshold within T seconds in the future, or the preset service device is in the cold start stage and preheating has not been 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 for continuing to carry the current task, that is, the current running task meets the task migration trigger condition and task migration is required.
[0053] For example, if the CPU usage rate will exceed 85% for 5 consecutive minutes in the future and the current preset service device is in a high task density state, the currently running task meets the task migration trigger condition; if the future memory usage rate is higher than 90% and the preset service device already has too many tasks, it will be marked as a "resource bottleneck". At this time, the currently running task meets the task migration trigger condition; if the predicted network exit load is close to the maximum value and the task data throughput is large, the currently running task meets the task migration trigger condition; if the server is in a "cold start" state or there is a power supply warning, its scheduling priority will be reduced and the task issuance will be suspended. At this time, the currently running task meets the task migration trigger condition.
[0054] Furthermore, if the preset service device can carry the currently running task, it is determined that the currently running task does not meet the task migration trigger condition. At this time, the step of judging whether the currently running task of the preset service device meets the task migration trigger condition based on the task migration prediction result is continued until the currently running task meets the task migration trigger condition.
[0055] Therefore, by using the load prediction model to determine whether the migration trigger conditions have been met, resource bottlenecks can be prevented, task scheduling can be optimized, service interruptions and service quality degradation can be reduced, migration costs can be lowered, and automated operation and maintenance can be supported. This not only improves the system's prediction accuracy and optimizes task scheduling decisions, but also reduces energy consumption and operating costs. Through continuous improvement and adaptive optimization, the system can better cope with dynamically changing workloads.
[0056] In step S103 , if the currently running task meets the task migration triggering condition, a 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.
[0057] Specifically, if based on the task migration prediction results, it can be determined that the current running task of the preset service device meets the task migration trigger condition, then 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 based on 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.
[0058] According to one embodiment of the present invention, determining the migration strategy of the currently running task based on the currently running task includes: obtaining at least one task attribute of the currently running task; and generating the migration strategy of the currently running task based on each task attribute of the currently running task, wherein the migration strategy includes overall migration, task volume compression migration, and slice migration.
[0059] According to one embodiment of the present invention, a migration strategy for a running task is generated according to each task attribute of the running task, including: obtaining the task type, task status and task volume of the running task; judging whether the task type of the running task is the first task type, and / or whether the task status is the first task status, and / or whether 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 the migration strategy for the running task is generated as the overall migration strategy, otherwise, judging whether the task status of the running task is the second task status, and / or whether 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 the migration strategy for the running task is generated as the task volume compression migration strategy, otherwise, judging 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 the migration strategy for the running task is generated as the slice migration strategy.
[0060] Specifically, the migration strategy of the currently running task may include an overall migration strategy, a task volume compression migration strategy, and a slice migration strategy. The above migration strategies are mainly determined by each task attribute of the currently running task, namely, the task type, task status, and task volume.
[0061] Specifically, if Figure 2 and Figure 4 As shown, first, the task type, task status and task volume of the running task are obtained, and it is determined whether the task type of the running task is the first task type (for example, a short-time task), and / or whether the task status is the first task status (for example, a lightweight task status), and / or whether the task volume is the first task volume (for example, 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 the migration strategy generated for the running task is the overall migration strategy, that is, when the task type of the running task is a short-time task, and / or the task status is a lightweight task status, and / or the task volume is a small volume, the migration strategy for the running task adopts the overall migration strategy.
[0062] Optionally, when the task type of the running task is not a short-time task, and the task status is not a lighter status, and the task volume is not a small volume, it is further determined whether the task status of the running task is the second task status (for example, a complex status, data-intensive task), and / or whether the task volume is the second task volume (for example, a large 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 the migration strategy generated for the running task is a task volume compression migration strategy. That is, when the task status of the running task is a complex status or a data-intensive task, and / or the task volume is large, the migration strategy for the running task adopts a task volume compression migration strategy, wherein only necessary computing status, logs, and core data are migrated, thereby reducing the size of the migration data packet, and reducing bandwidth and migration consumption.
[0063] Optionally, when the task state of the running task is not a complex state and the task volume is not large, it is further determined whether the task type of the running task is a third task type (for example, a long-period task, a task that can be executed in blocks, or a parallel task). If the task type of the running task is the third task type, the migration strategy generated for the running task is a slice migration strategy. That is, when the task type of the running task is a long-period task, a task that can be executed in blocks, or a parallel task, the migration strategy for the running task adopts a slice 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.
[0064] Therefore, by analyzing the types of currently running tasks, we can understand the specific requirements of each task (such as CPU intensiveness, memory intensiveness, I / O intensiveness, etc.), and thus formulate a more reasonable migration strategy to reduce migration costs and improve migration efficiency.
[0065] According to one embodiment of the present invention, before migrating the currently running task to the target service device according to the migration strategy, it also includes: detecting the resource status of other service devices in the global service device; based on the resource status, judging whether there is a service device in the other service devices that meets the requirements for running the currently running task; if there is a service device that meets the requirements for running the currently running task, determining the target service device from the service devices that meet the requirements for running the currently running task.
[0066] Specifically, if Figure 2 As shown, after determining the migration strategy of the currently running task based on the currently running task, the currently running task can be migrated to the target service device according to the migration strategy. However, before migration, it is necessary to first find a suitable target service device for the currently running task, so as to migrate the task according to the matched target service device, thereby ensuring that the migrated task can be executed under the optimal conditions and reducing the risk of performance degradation.
[0067] Specifically, first, the resource status of other service devices in the global service device is detected, and servers with low load, completed cold start, short data access path and reasonable power load are preferentially selected as target service devices. Then, based on the resource status, it is determined whether there are service devices in other service devices that meet the requirements for running the current running task. If there are service devices that meet the requirements for running the current running task, it means that the matched other service devices can carry the operation of the current task. At this time, the target service device is determined from the service devices that meet the requirements for running the current running task.
[0068] Therefore, determining the target service device from the service devices that meet the requirements for running the current task can ensure that the task is migrated to the most suitable service device, maximize resource utilization, reduce the number of unnecessary migrations, optimize the migration strategy, reduce the migration cost, avoid resource waste, and at the same time prevent overload and service interruption, thereby improving the system's response speed and user satisfaction.
[0069] According to one embodiment of the present invention, determining a target service device from service devices that meet the requirements for running a currently running task includes: determining whether there are multiple service devices that meet the requirements for running the currently running task; if there are multiple service devices that meet the requirements for running the currently running task, sorting the multiple service devices that meet the requirements for running the currently running task based on a preset sorting strategy, and using the service device in the first position as the target service device.
[0070] According to one embodiment of the present invention, based on a preset sorting strategy, multiple service devices that meet the requirements for running the currently running task are sorted, and the service device in the first position is used as the target service device, including: calculating the comprehensive score of each service device in the multiple service devices that meet the requirements for running the currently running task based on a preset calculation rule; based on the comprehensive score of each service device, sorting the multiple service devices that meet the requirements for running the currently running task in order from high to low, and using the service device in the first position as the target service device.
[0071] The preset calculation rules can be set by those skilled in the art according to actual test requirements and are not specifically limited here.
[0072] Specifically, since the number of target service devices may not be unique, the number of existing target service devices is first determined, that is, whether there are multiple service devices that meet the requirements for running the currently running task is determined 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 currently running task, the comprehensive score of each service device in the multiple service devices that meet the requirements for running the currently running task is further calculated based on the preset calculation rules. Then, the multiple service devices that meet the requirements for running the currently running task are sorted in descending order, and the service device in the first position is used as the target service device.
[0073] Specifically, if there are multiple service devices that meet the requirements of running the currently running task, the embodiment of the present invention can select them through a preset sorting strategy, for example, sorting by minimum load first, minimum power consumption first, and minimum delay first. To ensure a better selection result, the embodiment of the present invention can also select by calculating the comprehensive score of each service device. For example, the embodiment of the present invention can calculate by weighted scheduling score, and the calculation formula is: comprehensive score = 0.4*resource margin + 0.3*inverse of topology delay + 0.3*power load margin, and the resource margin can be the ratio 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 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 clients or data center core nodes). Lower delay means higher communication efficiency. Therefore, after taking the reciprocal, the higher the value, the lower the delay and the better the connectivity; the power load margin can be the remaining capacity of the target service device under the current power load. The higher the value, the greater the redundancy of the server in terms of power, and it can safely accept more tasks without overload. Then, the comprehensive score is calculated and sorted from high to low, and the service device with the highest score is designated as the target service device.
[0074] For example, assume there are three target service devices that meet the requirements for running the current task, such as service device A, service device B, and service device C. Server A has a resource margin of 80%, a topological delay of 5ms (reciprocal of 200), and a power load margin of 70%; Server B has a resource margin of 60%, a topological delay of 3ms (reciprocal of 333), and a power load margin of 60%; Server C has a resource margin of 90%, a topological delay of 4ms (reciprocal of 250), and a power load margin of 50%. A comprehensive score calculation based on the above parameters yields the following:
[0075] Comprehensive score A=0.4×80+0.3×200+0.3×70=32+60+21=113;
[0076] Comprehensive score B = 0.4 × 60 + 0.3 × 333 + 0.3 × 60 = 24 + 99.9 + 18 = 141.9;
[0077] Comprehensive score C = 0.4 × 90 + 0.3 × 250 + 0.3 × 50 = 36 + 75 + 15 = 126;
[0078] It can be seen that the comprehensive score of service device B is the highest, so service device B can be used as the target service device.
[0079] Therefore, by determining the service equipment that meets the requirements for running the current task and selecting the most suitable target service equipment, we can ensure that the task is migrated to the most suitable server, maximize resource utilization, avoid resource waste, reduce unnecessary migration times, optimize migration strategies, and reduce migration costs, thereby improving the operating efficiency and service quality of the entire server cluster and ensuring the efficient and stable operation of the system.
[0080] According to an embodiment of the present invention, after determining whether there are multiple service devices that meet the requirements for running the current task, the method further includes: if there is only one service device that meets the requirements for running the current task, taking the service device that meets the requirements for running the current task as the target service device.
[0081] Specifically, if there is only one service device that meets the requirements for running the currently running task, it means that there is only one service device that meets the requirements for running the currently running task. In this case, the service device can be directly used as the target service device for task migration.
[0082] Therefore, by determining the service equipment that meets the requirements for running the current task, the operating efficiency and service quality of the entire server cluster can be improved, ensuring the efficient and stable operation of the system.
[0083] According to one embodiment of the present invention, before migrating the currently running task to the target service device according to the migration strategy, it also includes: obtaining the hotspot data of the currently running task; extracting the operating information of the hotspot data, and using the preset cache strategy to pre-store the operating information of the hotspot data to the target service device.
[0084] The preset cache strategy can be set by those skilled in the art according to actual test requirements and is not specifically limited here.
[0085] Specifically, after determining the target service device, the currently running task can be migrated to the target service device according to the migration strategy. However, in order to reduce the access delay after migration and improve access efficiency, the embodiment of the present invention also needs to pre-copy or synchronize the high-frequency access data (i.e., the hot data of the currently running task) to the target server based on historical I / O access records and the current task type before migrating the currently running task to the target service device according to the migration strategy. Then, the operation information of the hot data is extracted, such as pre-fetching the relevant database blocks, file caches, logs, etc., and finally, the operation information of the hot data is pre-stored in the target service device using the preset cache strategy. For example, a distributed cache or edge data synchronization mechanism can be used to concurrently load data during the migration to ensure that after the migration is completed, the target service device can realize delay-free data calls, avoid the decline in task performance after migration due to changes in data access paths, and improve migration efficiency.
[0086] Furthermore, after determining the migration strategy of the currently running task, the target service device, and the storage of hot data, the currently running task can be migrated to the target service device. For example, the computing status and data required for the task can be migrated to the target server, and the task can be redeployed on the target service device. 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 usage; if the migration method is slice migration, some subtasks are rebound to the target server in parallel, and logs and performance indicators 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.
[0087] Furthermore, to ensure the secure transmission and storage of data, encryption and privacy protection mechanisms can be introduced when migrating the currently 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 can be used to encrypt data during the task migration process to ensure that only the authorized target server can decrypt and access the data.
[0088] Therefore, by synchronizing hot data in advance, we can ensure that the migrated tasks can quickly access the required data, reduce the access delay caused by the data not being local, and at the same time improve the overall performance and stability of the system, avoiding service interruptions or performance degradation caused by data access bottlenecks.
[0089] 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 operation data collection, intelligent load prediction, migration strategy decision-making, and data preloading, it realizes the precise migration of cluster tasks and the dynamic and balanced allocation of server resources, thereby achieving the following beneficial effects:
[0090] (1) Compared with the existing passive response scheduling mechanism, the present invention predicts short-term load trends based on multi-factor modeling (CPU, memory, I / O, power, etc.). It can predict and take migration measures before load overload occurs, thereby preventing sudden resource bottlenecks and ensuring server stability.
[0091] (2) The present invention introduces multiple migration strategies such as task volume compression and task slicing migration, which can effectively reduce the overall data migration volume and improve the migration speed and efficiency. It is particularly suitable for complex tasks with large data volumes and long running times, such as AI (Artificial Intelligence) training;
[0092] (3) By pre-migrating and pre-caching hotspot data, the present invention can ensure the continuous and efficient operation of the migration task on the target server, avoid the bottleneck caused by remote data access, and improve the service response speed.
[0093] The server cluster task migration method proposed in an embodiment of the present invention obtains a task migration prediction result, wherein 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, 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. This solves the technical problems of uneven load scheduling, unreasonable migration timing, high migration cost, waste of computing resources, and excessive energy consumption in server clusters in related technologies. It realizes efficient allocation of server cluster resources and operation optimization through multi-dimensional operation data collection, intelligent load prediction, task migration strategy, etc.
[0094] 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.
[0095] An embodiment of the present invention also provides a server cluster task migration device.
[0096] Figure 5 It is a block diagram of a server cluster task migration device according to an embodiment of the present invention.
[0097] like Figure 5 As shown, the server cluster task migration device 10 includes: an acquisition module 100 , a judgment module 200 and a migration module 300 .
[0098] The acquisition module 100 is used to obtain a task migration prediction result, wherein the task migration prediction result is obtained by predicting a pre-trained load prediction model;
[0099] The judgment module 200 is used to judge whether the currently running task of the preset service device meets the task migration triggering condition based on the task migration prediction result;
[0100] The migration module 300 is configured to determine a migration strategy for the currently running task based on the currently running task if the currently running task meets a task migration triggering condition, and migrate the currently running task to a target service device based on the migration strategy.
[0101] According to one embodiment of the present invention, before obtaining the task migration prediction result, the obtaining module 100 further includes:
[0102] A construction unit, configured to construct a multi-layer feedforward neural network model, wherein the multi-layer feedforward neural network model includes an input layer, at least one hidden layer, and an output layer;
[0103] The training unit is used 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 to obtain a load prediction model.
[0104] According to one embodiment of the present invention, the training unit includes:
[0105] A first acquisition subunit is configured to acquire, based on a preset sampling period, operating data of a preset service device, an operating status of the preset service device, and a power supply load status of an area where the preset service device is located;
[0106] A data processing subunit is used to perform data preprocessing on the operating data, operating status and power supply load status, and to construct a training sample set based on the preprocessed operating data, operating status and power supply load status;
[0107] The training subunit is used to iteratively train the multi-layer feedforward neural network model based on the training sample set, and if the verification set error in the training sample set is in a preset change state for a preset number of consecutive times, it is determined that the multi-layer feedforward neural network model meets the termination training conditions and the load prediction model is obtained.
[0108] According to one embodiment of the present invention, the training subunit includes:
[0109] A first computing component is configured to perform weighted summation on the training sample set using a weight coefficient corresponding to each hidden layer node in the multi-layer feedforward neural network model to obtain a calculation result of the training sample set;
[0110] A converter, configured to convert the calculation result into a nonlinear output result using a preset activation function, thereby obtaining a prediction result of the multi-layer feedforward neural network model;
[0111] An updating component is used to calculate the difference between the predicted result and the actual target result, and when the difference does not meet the preset difference range, use the preset gradient descent algorithm to update the weight coefficient corresponding to each hidden layer node until the difference meets the preset difference range and stop updating, and use the new weight coefficient corresponding to each hidden layer node after the update to perform weighted summation on the training sample set to obtain a new calculation result of the training sample set, and continue to execute the step of calculating the difference between the predicted result and the actual target result until the verification set error in the training sample set is in a preset change state for a preset number of consecutive times.
[0112] According to one embodiment of the present invention, the determination module 200 includes:
[0113] A first judgment unit is used to judge whether the preset service device can carry the current running task based on the task migration prediction result;
[0114] The determination unit is used to determine whether the currently running task meets the task migration trigger condition if the preset service device cannot carry the currently running task; otherwise, continue to execute the steps 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.
[0115] According to one embodiment of the present invention, the migration module 300 includes:
[0116] A first acquiring unit, configured to acquire at least one task attribute of a currently running task;
[0117] The generation unit is used to generate a migration strategy for the currently running task according to each task attribute of the currently running task, wherein the migration strategy includes overall migration, task volume compression migration and slice migration.
[0118] According to one embodiment of the present invention, a generating unit includes:
[0119] The second acquisition subunit is used to obtain the task type, task status and task volume of the running task;
[0120] A first judging subunit is configured to judge whether the task type of the running task is the first task type, and / or whether the task state is the first task state, and / or whether the task volume is the first task volume;
[0121] a first generating subunit, configured to generate a migration strategy for 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 state is the first task state, and / or the task volume is the first task volume; and otherwise, determine whether the task state of the running task is the second task state, and / or whether the task volume is the second task volume;
[0122] a second generating subunit, configured to, if the task state of the running task is the second task state and / or the task volume is the second task volume, generate a migration strategy for the running task as a task volume compression migration strategy; otherwise, determine whether the task type of the running task is a third task type;
[0123] The third generating sub-unit is used to generate a migration strategy for the running task as a slice migration strategy if the task type of the running task is the third task type.
[0124] According to one 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:
[0125] A detection unit, used to detect the resource status of other service devices in the global service device;
[0126] The second judging unit is configured to judge, based on the resource status, whether there is a service device among other service devices that meets the requirements for running the currently running task;
[0127] The determining unit is configured to determine 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.
[0128] According to one embodiment of the present invention, the determining unit includes:
[0129] The second judging subunit is used to judge whether there are multiple service devices that meet the requirements of running the current running task;
[0130] The sorting subunit is used to sort the multiple service devices that meet the requirements of running the current running task based on a preset sorting strategy if there are multiple service devices that meet the requirements of running the current running task, and use the service device in the first position as the target service device.
[0131] According to one embodiment of the present invention, the sorting subunit includes:
[0132] The second calculation component is used to calculate the comprehensive score of each service device among the multiple service devices that meet the requirements of running the current running task based on a preset calculation rule;
[0133] The sorting component is used to sort multiple service devices that meet the requirements of running the current task in descending order based on the comprehensive score of each service device, and use the service device in the first position as the target service device.
[0134] According to one embodiment of the present invention, after determining whether there are multiple service devices that meet the requirements for running the currently running task, the second determining subunit further includes:
[0135] The judgment component is used to use the service device that meets the requirements for running the current running task as the target service device if there is only one service device that meets the requirements for running the current running task.
[0136] According to one 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:
[0137] The second acquisition unit is used to obtain the hotspot data of the currently running task;
[0138] The storage unit is used to extract the operation information of the hotspot data and pre-store the operation information of the hotspot data to the target service device using a preset cache strategy.
[0139] In summary, the description of the features in the embodiment corresponding to the server cluster task migration device can refer to the relevant description of the embodiment corresponding to the server cluster task migration method, and will not be repeated here.
[0140] An embodiment of the present invention further provides an electronic device, which may include:
[0141] A memory 601 , a processor 602 , and a computer program stored in the memory 601 and executable on the processor 602 .
[0142] When the processor 602 executes the program, the server cluster task migration method provided in the above embodiment is implemented.
[0143] Furthermore, the electronic device further includes:
[0144] The communication interface 603 is used for communication between the memory 601 and the processor 602 .
[0145] The memory 601 is used to store computer programs that can be run on the processor 602 .
[0146] The memory 601 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0147] If the memory 601, processor 602, and communication interface 603 are implemented independently, the communication interface 603, memory 601, and processor 602 can be interconnected via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0148] 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 can communicate with each other through an internal interface.
[0149] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0150] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned server cluster task migration method embodiments when running.
[0151] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0152] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned server cluster task migration method embodiments are implemented.
[0153] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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 invention.
[0154] The above is a detailed introduction to a server cluster task migration method provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A server cluster task migration method, characterized in that: The following steps are involved: Obtaining a task migration prediction result, wherein the task migration prediction result is obtained by predicting a pre-trained load prediction model; Based on the task migration prediction result, determining whether the currently running task of the preset service device meets the task migration triggering condition; If the currently running task meets the task migration triggering condition, determining a migration strategy for 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; The migration strategies for the currently running tasks include overall migration strategy, task volume compression migration strategy, and slice migration strategy. The overall migration strategy, task volume compression migration strategy, and slice migration strategy are determined by the type, task status, and task volume of the currently running task. The task migration prediction result is obtained by performing weighted summation on the training sample set according to the corresponding weight coefficient of each hidden layer node in the multi-layer feedforward neural network model, and then the calculation result of the training sample set is converted into a nonlinear output result using a preset activation function. The task migration prediction result of the multi-layer feedforward neural network model is output by the output layer; Based on a preset sampling period, the operating data of a preset service device, the operating status of the preset service device, and the power supply load status of the area where the preset service device is located are obtained; data preprocessing is performed on the operating data, the operating status, and the power supply load status, and a training sample set is constructed based on the operating data, operating status, and power supply load status after data preprocessing; the multi-layer feedforward neural network model is iteratively trained based on the training sample set, and if the verification set error in the training sample set is in a preset change state for a consecutive preset number of times, it is determined that the multi-layer feedforward neural network model meets the training termination condition, and the load prediction model is obtained.
2. The server cluster task migration method according to claim 1, characterized in that: Before obtaining the task migration prediction result, the method further includes: Constructing a multi-layer feedforward neural network model, wherein the multi-layer feedforward neural network model includes an input layer, at least one hidden layer and an output layer; The multi-layer feedforward neural network model is trained based on a preset model training strategy, and when the multi-layer feedforward neural network model meets a termination training condition, the training is stopped to obtain the load prediction model.
3. The server cluster task migration method according to claim 1, characterized in that: The iterative training of the multi-layer feedforward neural network model based on the training sample set includes: Calculate the difference between the predicted result and the actual target result, and when the difference does not meet the preset difference range, use the preset gradient descent algorithm to update the weight coefficient corresponding to each hidden layer node until the difference meets the preset difference range and stop updating, and use the new weight coefficient corresponding to each hidden layer node after the update to perform weighted summation on the training sample set to obtain a new calculation result of the training sample set, and continue to execute the step of calculating the difference between the predicted result and the actual target result until the verification set error in the training sample set is in a preset change state for a preset number of consecutive times.
4. The server cluster task migration method according to claim 1, characterized in that: The determining, based on the task migration prediction result, whether the currently running task of the preset service device meets the task migration triggering 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 judging 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.
5. The server cluster task migration method according to claim 1, characterized in that: The determining of 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; A migration strategy for the currently running task is generated according to each task attribute of the currently running task.
6. The server cluster task migration method according to claim 5, characterized in that: Generating the migration strategy of the running task according to each task attribute of the running task includes: 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 whether the task state is the first task state, and / or whether 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 state is the first task state, and / or the task volume is the first task volume, then generating a migration strategy for the running task as an overall migration strategy; otherwise, determining whether the task state of the running task is the second task state, and / or whether the task volume is the second task volume; If the task state of the running task is the second task state, and / or the task volume is the second task volume, generating a migration strategy for the running task as a task volume compression migration strategy; otherwise, determining whether the task type of the running task is a third task type; If the task type of the running task is the third task type, the migration strategy generated for the running task is a slice migration strategy.
7. The server cluster task migration method according to claim 1, characterized in that: Before migrating the currently running task to the target service device according to the migration strategy, the method further includes: Detect resource status of other service devices in the global service device; Based on the resource status, determining whether there is a service device among the other service devices that meets the requirements for running the currently running task; If there is a service device that meets the requirements for running the currently running task, the target service device is determined from the service devices that meet the requirements for running the currently running task.
8. The server cluster task migration method according to claim 7, characterized in that: The determining the target service device from the service devices that meet the requirements for running the currently running task includes: Determine whether there are multiple service devices that meet the requirements for running the currently running task; If there are multiple service devices that meet the requirements for running the currently running task, the multiple service devices that meet the requirements for running the currently running task are sorted based on a preset sorting strategy, and the service device in the first position is used as the target service device.
9. The server cluster task migration method according to claim 8, characterized in that: The step of sorting a plurality of service devices that meet the requirements for running the currently running task based on a preset sorting strategy and selecting the service device in the first position as the target service device includes: Calculating, based on a preset calculation rule, a comprehensive score of each of the plurality of service devices that meet the requirements for running the currently running task; Based on the comprehensive score of each service device, multiple service devices that meet the requirements for running the currently running task are sorted in descending order, and the service device in the first position is used as the target service device.
10. The server cluster task migration method according to claim 8, characterized in that: After determining whether there are multiple service devices that meet the requirements for running the currently running task, the method further includes: If there is only one service device that meets the requirements for running the currently running task, the service device that meets the requirements for running the currently running task is used as the target service device.
11. The server cluster task migration method according to claim 1, characterized in that: Before migrating the currently running task to the target service device according to the migration strategy, the method further includes: Obtaining hotspot data of the currently running task; The operation information of the hotspot data is extracted, and the operation information of the hotspot data is pre-stored in the target service device using a preset cache strategy.
12. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the server cluster task migration method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the server cluster task migration method according to any one of claims 1 to 11 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the server cluster task migration method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Heterogeneous task allocation method based on prediction equilibrium ratio and resource constraint
CN119166306A