Task migration method, system, device and storage medium
By determining the target device for a task based on network quality, computing power, and QoS priority in a multi-device collaborative system, and performing migration in conjunction with a task dependency graph, the problem of high task migration latency in existing technologies is solved, achieving low-latency and high-reliability task migration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies for task migration in multi-device collaborative systems suffer from high communication latency, leading to task interruptions, data loss, or system-level failures.
By acquiring the network quality, computing power, QoS priority, and weighted matching value of the devices, the target devices for the task are determined, and migration is performed based on the task dependency graph, thereby reducing migration overhead and improving migration efficiency.
It achieves low-latency and high-reliability task migration, reduces the risk of "uneven workload and resource mismatch", and protects the rights and interests of core tasks.
Smart Images

Figure CN121411987B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of task migration, and in particular to a task migration method, system, device and storage medium. Background Technology
[0002] With the development of distributed communication technology and device collaboration capabilities, the need for migrating tasks between different devices is increasing.
[0003] In multi-device collaborative systems, when a device experiences performance degradation due to network instability, decreased computing power, or resource depletion, failure to migrate the task in a timely manner can lead to task interruption, data loss, or even system-level failure. However, existing task migration methods in multi-device collaborative environments suffer from high communication latency. Summary of the Invention
[0004] This application aims to at least address the technical problems existing in the prior art. To this end, this application proposes a task migration method, system, device, and storage medium capable of achieving low-latency and high-reliability task migration.
[0005] A first aspect of this application provides a task migration method, comprising the following steps:
[0006] Having obtained the signal strength, available network bandwidth, and latency of all initial devices, a network quality value for each initial device is determined based on the signal strength, available network bandwidth, and latency of each initial device.
[0007] Having obtained the CPU utilization and available memory of all initial devices, the computing power value of each initial device is determined based on the CPU utilization and available memory of each initial device.
[0008] Given all tasks to be migrated, obtain the QoS priority of each task to be migrated, wherein the task to be migrated is a task that has not yet been completed in the source device, and the source device is an initial device among all initial devices that has network fluctuations, and the network fluctuations include the initial device having a latency greater than a preset latency threshold;
[0009] Based on a preset functional dimension, each task to be migrated is divided into several subtasks to be migrated; and the dependency tag value between any two subtasks to be migrated for each task to be migrated is determined.
[0010] Construct a task dependency graph for each of the tasks to be migrated, wherein the nodes of the task dependency graph are the subtasks to be migrated, and the edges of the task dependency graph are the dependency label values;
[0011] Based on the available network bandwidth and the available memory, a weighted matching value set is determined, wherein the weighted matching values in the weighted matching value set are used to measure the matching degree between any of the migration tasks and any candidate devices, and the candidate devices are the initial devices other than the source device among all the initial devices;
[0012] Based on the network quality value, the computing power value, the QoS priority, and the weighted matching value set, the target device for each of the migration tasks is determined, wherein the target device belongs to the candidate devices;
[0013] Based on the task dependency graph of each of the tasks to be migrated, the tasks to be migrated are migrated to the target device.
[0014] The task migration method according to the embodiments of this application has at least the following beneficial effects:
[0015] This method determines the target device for each task to be migrated based on network quality values, computing power values, QoS priority, and a weighted matching value set. It can determine the target device for each task to be migrated by combining network quality values and computing power values, thereby reducing the risk of "uneven workload and resource mismatch" and achieving multi-dimensional resource adaptation. Furthermore, it determines the target device for each task to be migrated by combining QoS priority, thus protecting the rights and interests of core tasks. Then, it migrates the task to be migrated to the target device, reducing cross-device migration overhead and improving migration efficiency, thereby achieving low-latency and high-reliability task migration.
[0016] According to some embodiments of this application, determining the target device for each migration task based on the network quality value, the computing power value, the QoS priority, and the weighted matching value set includes:
[0017] Having obtained the remaining battery percentage of all initial devices, the battery value of each initial device is determined based on the remaining battery percentage of each initial device;
[0018] Given the topology hop count between the source device and the candidate device corresponding to any of the migration tasks, determine the distance value between each source device and any candidate device.
[0019] Based on the network quality value, the computing power value, the power consumption value, and the distance value, a candidate device score is determined, wherein the candidate device score is used to characterize the score of task migration between the source device and the corresponding candidate device corresponding to the distance value;
[0020] Based on the QoS priority, all the tasks to be migrated are sorted to obtain a sorted sequence of tasks to be migrated.
[0021] Based on the candidate device score, the weighted matching value set, and the sorted sequence of tasks to be migrated, the target device for each task to be migrated is determined.
[0022] According to some embodiments of this application, determining the target device for each of the migration tasks based on the candidate device score, the weighted matching value set, and the sorted sequence of migration tasks includes:
[0023] Calculate the sum of the weighted matching values of all the subtasks to be migrated for any of the said migration tasks and any of the said candidate devices;
[0024] Based on the sorted sequence of tasks to be migrated, the candidate device with the highest sum of weighted matching values and a candidate device score greater than a preset device score threshold is selected for each task to be migrated, and is taken as the corresponding target device.
[0025] According to some embodiments of this application, migrating the task to be migrated to the target device based on the task dependency graph of each task to be migrated includes:
[0026] Construct a soft bus channel between the source device and the target device of the task to be migrated;
[0027] Based on the task dependency graph, the task to be migrated is pulled from the source device to the target device through the soft bus channel, so as to migrate the task to be migrated to the target device.
[0028] According to some embodiments of this application, the method further includes:
[0029] If the task to be migrated is successfully migrated to the target device, the resources of the source device corresponding to the task to be migrated are released, wherein the resources of the source device include computing resources and storage resources.
[0030] According to some embodiments of this application, determining the weighted matching value set based on the available network bandwidth and the available memory includes:
[0031] Obtain the CPU requirement, GPU requirement, memory requirement, and network bandwidth requirement for each of the subtasks to be migrated;
[0032] Obtain the remaining available CPU cores and the remaining available GPUs for each candidate device;
[0033] Based on the CPU requirement value, the GPU requirement value, the memory requirement value, the network bandwidth requirement value, the remaining available CPU cores, the available GPUs, the available network bandwidth, and the available memory, determine the weighted matching degree value between any of the subtasks to be migrated and any of the candidate devices;
[0034] Combine all the weighted matching degree values to obtain the weighted matching value set.
[0035] According to some embodiments of this application, based on the CPU requirement value, the GPU requirement value, the memory requirement value, the network bandwidth requirement value, the remaining available CPU cores, the available GPUs, the available network bandwidth, and the available memory, the weighted matching degree value between any of the subtasks to be migrated and any of the candidate devices is determined by the following formula:
[0036] ;
[0037] in, For the first The first task to be migrated The subtasks to be migrated and the first The weighted matching degree value among the candidate devices. The first preset weight value, The second preset weight value, The third preset weight value, The fourth preset weight value, For the first The remaining available CPU cores for each candidate device For the first The number of remaining available GPUs for each candidate device. For the first Available memory for each candidate device For the first Available network bandwidth for each candidate device For migration The first task to be migrated CPU requirements for each subtask to be migrated. For migration The first task to be migrated The GPU requirements for each subtask to be migrated. For migration The first task to be migrated The memory requirements of each subtask to be migrated. For migration The first task to be migrated The network bandwidth requirements of each subtask to be migrated.
[0038] A second aspect of this application provides a task migration system, the task migration system comprising:
[0039] A network quality value determination module is used to determine the network quality value of each initial device based on the signal strength, available network bandwidth and latency of each initial device, after obtaining the signal strength, available network bandwidth and latency of all initial devices;
[0040] The computing power value determination module is used to determine the computing power value of each initial device based on the CPU utilization and available memory of each initial device, after obtaining the CPU utilization and available memory of all initial devices;
[0041] The task to be migrated module is used to obtain the QoS priority of each task to be migrated when all tasks to be migrated are determined, wherein the task to be migrated is a task that has not yet been completed in the source device, the source device is an initial device among all initial devices that has network fluctuations, and the network fluctuations include the initial device having a latency greater than a preset latency threshold.
[0042] The task splitting module is used to split each task to be migrated into several subtasks to be migrated based on a preset functional dimension; and to determine the dependency tag value between any two subtasks to be migrated for each task to be migrated.
[0043] A task dependency graph construction module is used to construct a task dependency graph for each of the tasks to be migrated, wherein the nodes of the task dependency graph are the subtasks to be migrated, and the edges of the task dependency graph are the dependency label values;
[0044] The weighted matching value determination module is used to determine a set of weighted matching values based on the available network bandwidth and the available memory, wherein the weighted matching values in the set of weighted matching values are used to measure the matching degree between any of the tasks to be migrated and any candidate device, and the candidate device is the initial device other than the source device among all the initial devices;
[0045] The target device determination module is used to determine the target device for each of the migration tasks based on the network quality value, the computing power value, the QoS priority and the weighted matching value set, wherein the target device belongs to the candidate devices;
[0046] The task migration module is used to migrate the task to be migrated to the target device based on the task dependency graph of each task to be migrated.
[0047] This system determines the target device for each task to be migrated based on network quality values, computing power values, QoS priority, and a weighted matching value set. It can determine the target device for each task to be migrated by combining network quality values and computing power values, thereby reducing the risk of "uneven workload and resource mismatch" and achieving multi-dimensional resource adaptation. By combining QoS priority to determine the target device for each task to be migrated, the rights and interests of core tasks are protected. Then, the task to be migrated is migrated to the target device, reducing cross-device migration overhead and improving migration efficiency, thus achieving low-latency and high-reliability task migration.
[0048] A third aspect of this application provides a task migration electronic device, including at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enables the at least one control processor to perform the task migration method described above.
[0049] A fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the task migration method described above.
[0050] It should be noted that the beneficial effects of the second to fourth aspects of this application with respect to the prior art are the same as the beneficial effects of the aforementioned task migration system with respect to the prior art, and will not be described in detail here.
[0051] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0052] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0053] Figure 1 This is a flowchart illustrating an embodiment of the task migration method provided in this application;
[0054] Figure 2 This is a schematic diagram of the structure of an embodiment of the task migration system provided in this application;
[0055] Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application. Detailed Implementation
[0056] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0057] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.
[0058] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0059] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0060] With the development of distributed communication technology and device collaboration capabilities, the need for migrating tasks between different devices is increasing.
[0061] In multi-device collaborative systems, when a device experiences performance degradation due to network instability, decreased computing power, or resource depletion, failure to migrate the task in a timely manner can lead to task interruption, data loss, or even system-level failure. However, existing task migration methods in multi-device collaborative environments suffer from high communication latency.
[0062] To address the aforementioned technical deficiencies, embodiments of this application provide a task migration method, system, device, and storage medium.
[0063] Please see Figure 1 This is a flowchart illustrating a task migration method provided in an embodiment of this application. The method is applied to an electronic device, which may be a server, etc. Figure 1 As shown, the task migration method includes:
[0064] Step S101: After obtaining the signal strength, available network bandwidth and latency of all initial devices, determine the network quality value of each initial device based on the signal strength, available network bandwidth and latency of each initial device;
[0065] The initial equipment mentioned above can be a drone.
[0066] In step S101, after obtaining the signal strength, available network bandwidth, and latency of all initial devices, the network quality value of each initial device is determined based on the signal strength, available network bandwidth, and latency of each initial device. This can be achieved by collecting the signal strength, available network bandwidth, and latency of all initial devices in real time via a soft bus, determining a first quality value based on the signal strength, a second quality value based on the available network bandwidth, and a third quality value based on the latency, and calculating the sum of the first, second, and third quality values corresponding to each initial device as the network quality value corresponding to each initial device.
[0067] The above-mentioned determination of the first quality value based on signal strength can be as follows: when the signal strength is greater than a preset signal strength threshold set according to actual needs, the first preset quality value set according to actual needs will be used as the first quality value; when the signal strength is less than or equal to the preset signal strength threshold set according to actual needs, the second preset quality value set according to actual needs will be used as the first quality value.
[0068] The above-mentioned determination of the second quality value based on the available network bandwidth can be as follows: if the available network bandwidth is greater than the preset network bandwidth threshold set according to actual needs, the third preset quality value set according to actual needs will be used as the second quality value; if the available network bandwidth is less than or equal to the preset network bandwidth threshold set according to actual needs, the fourth preset quality value set according to actual needs will be used as the second quality value.
[0069] The above-mentioned determination of the third quality value based on latency can be as follows: if the latency is greater than the preset latency threshold set according to actual needs, the fifth preset quality value set according to actual needs will be used as the third quality value; if the available latency is less than or equal to the preset latency threshold set according to actual needs, the sixth preset quality value set according to actual needs will be used as the third quality value.
[0070] Step S102: After obtaining the CPU utilization and available memory of all initial devices, determine the computing power value of each initial device based on the CPU utilization and available memory of each initial device;
[0071] In step S102, after obtaining the CPU utilization and available memory of all initial devices, the computing power value of each initial device is determined based on the CPU utilization and available memory of each initial device. This can be achieved by collecting the CPU utilization and available memory of all initial devices in real time via a soft bus, determining a first capability value based on the CPU utilization, determining a second capability value based on the available memory, and calculating the sum of the first and second capability values for each initial device as the computing power value for each initial device.
[0072] The above-mentioned determination of the first capability value based on CPU utilization can be as follows: when the CPU utilization is greater than a preset CPU utilization threshold set according to actual needs, the first preset computing capability value set according to actual needs will be used as the first capability value; when the CPU utilization is less than or equal to the preset CPU utilization threshold set according to actual needs, the second preset computing capability value set according to actual needs will be used as the first capability value.
[0073] The above-mentioned determination of the second capability value based on available memory can be as follows: if the available memory is greater than a preset memory threshold set according to actual needs, the third preset computing capability value set according to actual needs will be used as the second capability value; if the available memory is less than or equal to the preset memory threshold set according to actual needs, the fourth preset computing capability value set according to actual needs will be used as the second capability value.
[0074] Step S103: If all tasks to be migrated are determined, obtain the QoS priority of each task to be migrated. The task to be migrated is the task that has not yet been completed in the source device. The source device is the initial device among all the initial devices that has network fluctuations. Network fluctuations include the initial device's latency being greater than a preset latency threshold.
[0075] The aforementioned network fluctuations may also include link switching, which may include switching from Wi-Fi to 4G mobile network; the aforementioned network fluctuations may also include packet loss rate exceeding 5% three times.
[0076] The QoS priorities mentioned above can include high QoS priority, medium QoS priority, and low QoS priority.
[0077] In step S103, when all tasks to be migrated are determined, the QoS priority of each task to be migrated can be obtained by filtering out all devices whose latency of the initial device is greater than a preset latency threshold as source devices, and taking the tasks that have not yet been completed in the source devices as tasks to be migrated, and collecting the QoS priority of each task to be migrated through the soft bus.
[0078] Step S104: Based on the preset functional dimensions, each task to be migrated is divided into several subtasks to be migrated; and the dependency tag value between any two subtasks to be migrated for each task to be migrated is determined.
[0079] The aforementioned preset functional dimensions can be data acquisition, data preprocessing, image acquisition, image processing, and task aggregation and uploading. Among them, data acquisition can be the acquisition of temperature, humidity, and air quality sensor data; data preprocessing can be the filtering, formatting, and anomaly detection of the acquired data; image acquisition can be the capture of aerial images and the generation of metadata; image processing can be the target detection and annotation of images; and task aggregation and uploading can be the aggregation of processing results and the uploading to the cloud or ground station.
[0080] In step S104, based on the preset functional dimensions, each task to be migrated is divided into several sub-tasks to be migrated; and the dependency label value between any two sub-tasks to be migrated for each task to be migrated can be determined as follows: RU (task to be migrated) is divided into RU1 (sub-task to be migrated 1, function is data acquisition, dependency label value is empty), RU2 (sub-task to be migrated 2, function is data preprocessing, dependency label value is dependent on RU1), RU3 (sub-task to be migrated 3, function is image acquisition, dependency label value is empty), RU4 (sub-task to be migrated 4, function is image processing, dependency label value is dependent on RU3) and RU5 (sub-task to be migrated 5, function is task aggregation and uploading, dependency label value is dependent on RU2 and dependent on RU4).
[0081] Step S105: Construct a task dependency graph for each task to be migrated, where the nodes of the task dependency graph are the subtasks to be migrated, and the edges of the task dependency graph are the dependency label values.
[0082] The task dependency graph described above is a directed acyclic graph.
[0083] In step S105, the task dependency graph for constructing each task to be migrated can be a task dependency graph for constructing an RU, wherein the task dependency graph of an RU can include RU1. RU2 RU5 or RU3 RU4 RU5.
[0084] Step S106: Based on available network bandwidth and available memory, determine a set of weighted matching values, wherein the weighted matching values in the set of weighted matching values are used to measure the matching degree between any task to be migrated and any candidate device. The candidate device is the initial device other than the source device among all initial devices.
[0085] Step S107: Based on the network quality value, computing power value, QoS priority and weighted matching value set, determine the target device for each migration task, where the target device is a candidate device;
[0086] Step S108: Based on the task dependency graph of each task to be migrated, migrate the task to be migrated to the target device.
[0087] This method determines the target device for each task to be migrated based on network quality values, computing power values, QoS priority, and a weighted matching value set. It can determine the target device for each task to be migrated by combining network quality values and computing power values, thereby reducing the risk of "uneven workload and resource mismatch" and achieving multi-dimensional resource adaptation. Furthermore, it determines the target device for each task to be migrated by combining QoS priority, thus protecting the rights and interests of core tasks. Then, it migrates the task to be migrated to the target device, reducing cross-device migration overhead and improving migration efficiency, thereby achieving low-latency and high-reliability task migration.
[0088] In some embodiments, the target device for each migration task is determined based on a set of network quality values, computing power values, QoS priorities, and weighted matching values, including:
[0089] Step S201: After obtaining the remaining power percentage of all initial devices, determine the power value of each initial device based on the remaining power percentage of each initial device;
[0090] In step S201, after obtaining the remaining power ratio of all initial devices, the power value of each initial device is determined based on the remaining power ratio of each initial device. This can be achieved by collecting the remaining power ratio of all initial devices in real time via a soft bus. If the remaining power ratio is greater than a preset power ratio threshold set according to actual needs, the first preset value set according to actual needs is used as the power value; if the remaining power ratio is less than or equal to the preset power ratio threshold set according to actual needs, the second preset value set according to actual needs is used as the power value.
[0091] Step S202: Given the topology hop count between the source device and any candidate device for any task to be migrated, determine the distance value between each source device and any candidate device.
[0092] In step S202, when the topology hop count between the source device and the candidate device corresponding to any migration task is obtained, the distance value between each source device and the candidate device can be determined by real-time acquisition of the topology hop count between the source device and the candidate device corresponding to any migration task via a soft bus. If the topology hop count is greater than a preset topology hop count threshold set according to actual needs, a third preset value set according to actual needs is used as the distance value between the corresponding source device and the candidate device. If the topology hop count is less than or equal to the preset topology hop count threshold set according to actual needs, a fourth preset value set according to actual needs is used as the distance value between the corresponding source device and the candidate device.
[0093] Step S203: Based on network quality value, computing power value, power consumption value and distance value, determine the score value of the candidate device, wherein the score value of the candidate device is used to characterize the score value of task migration between the source device corresponding to the distance value and the corresponding candidate device;
[0094] In step S203, the expression for determining the score of the candidate device based on network quality value, computing power value, power consumption value, and distance value can be:
[0095] ;
[0096] in, In the first Personal source device and the first The score of the candidate device for task migration between candidate devices. For the first The computing power values of the candidate devices For the first Network quality values for the candidate devices For the first The battery level of each candidate device. For the first Personal source device and the first Distance values for each candidate device.
[0097] Step S204: Sort all tasks to be migrated based on QoS priority to obtain a sorted sequence of tasks to be migrated.
[0098] In step S204, the above-mentioned sorting of all tasks to be migrated based on QoS priority, resulting in a sorted sequence of tasks to be migrated, can be based on the order of high QoS priority, medium QoS priority, and low QoS priority, and the rule of random sorting when QoS priorities are the same.
[0099] Step S205: Based on the candidate device scores, the weighted matching value set, and the sorted sequence of tasks to be migrated, determine the target device for each task to be migrated.
[0100] This application determines the target device for each task to be migrated by combining network quality and computing power values, thereby reducing the risk of uneven workload and resource mismatch. It determines the target device for each task to be migrated by the remaining power ratio, thereby achieving sustainable operation of the target device. It determines the target device for each task to be migrated by the distance value, thereby improving communication stability and achieving multi-dimensional resource adaptation. Furthermore, it determines the target device for each task to be migrated by combining QoS priority, thereby protecting the rights and interests of core tasks.
[0101] In some embodiments, the target device for each migration task is determined based on the candidate device score, the weighted matching value set, and the sorted sequence of migration tasks, including:
[0102] Step S301: Calculate the sum of the weighted matching values of all subtasks to be migrated for any task to be migrated and any candidate device;
[0103] In step S301, the sum of the weighted matching values of all subtasks to be migrated for any task to be migrated, and corresponding to any candidate device, can be calculated when RU (task to be migrated) is split into RU1, RU2, RU3, RU4, and RU5. The weighted matching degree value between the candidate device and RU1, the first The weighted matching degree value between the candidate device and RU2, the first The weighted matching degree value between the candidate device and RU3, the first The weighted matching degree value of the candidate device with RU4 and the first The sum of the weighted matching values of each candidate device and RU5 is used as the value between RU (the task to be migrated) and the first... The sum of the weighted matching values of the candidate devices.
[0104] Step S302: Based on the sorted sequence of tasks to be migrated, select the candidate device with the highest sum of weighted matching values that is greater than the preset device score threshold for each task to be migrated, and use it as the corresponding target device.
[0105] The aforementioned preset device score threshold can be a value that is pre-set according to actual needs.
[0106] In step S302, based on the sorted sequence of tasks to be migrated, the above-mentioned selection of the candidate device with the highest candidate device score value and the largest sum of weighted matching values for each task to be migrated is carried out sequentially. This can be done by first selecting the candidate device with the highest candidate device score value and the largest sum of weighted matching values for the first task to be migrated in the sorted sequence, then selecting the candidate device with the highest candidate device score value and the largest sum of weighted matching values for the second task to be migrated in the sorted sequence, and so on, until the q-th task to be migrated in the sorted sequence is selected as the target device, where q is the total number of tasks to be migrated in the sorted sequence.
[0107] This application achieves multi-dimensional resource adaptation by selecting, in turn, the candidate device with the highest weighted matching value and a score greater than a preset device score threshold for each candidate device in a sorted sequence of tasks to be migrated, based on the sequence of tasks to be migrated. This provides a more accurate data basis for subsequent cross-device migration.
[0108] In some embodiments, migrating a task to be migrated to a target device based on the task dependency graph of each task to be migrated includes:
[0109] Step S401: Construct a soft bus channel between the source device and the target device of the task to be migrated;
[0110] The aforementioned soft bus channels may include control flow channels, status flow channels, and event flow channels. The control flow channel can be used to transmit task execution events, the status flow channel can be used to transmit status references or incremental data, and the event flow channel can be used to transmit exception notifications, including consistency check failures.
[0111] Consistency check failure can include situations where the execution result of RU4 (image processing) in the source device (which can be 4 image processing areas) is inconsistent with the execution result of RU4 in the target device (which can be 6 image processing areas).
[0112] Specifically, if the execution result of RU4 in the source device is inconsistent with the execution result of RU4 in the target device, RU4 will be rerun.
[0113] Step S402: Based on the task dependency graph, the task to be migrated is pulled from the source device to the target device through the soft bus channel to migrate the task to be migrated to the target device.
[0114] The node attributes of the task dependency graph mentioned above may also include cached data of the task to be migrated, data resources required by the task, and external services.
[0115] In step S402, the above-mentioned method of pulling the task to be migrated from the source device to the target device through the soft bus channel based on the task dependency graph can be a method of pulling the task to be migrated from the source device to the target device based on the task dependency graph through incremental execution and delay binding and the soft bus channel. Incremental execution can be that each RU of the target device only pulls the necessary state fragments (such as intermediate calculation results) and does not pull the complete state. Delay binding can be that the RU of the target device only requests data fragments through the state flow channel when the execution logic needs to access the state.
[0116] This application can reduce redundant calculations through incremental execution and reduce the amount of initial data transfer through delayed binding, thereby improving the efficiency of task migration.
[0117] In some embodiments, the method further includes:
[0118] Step S501: If the task to be migrated is successfully migrated to the target device, release the resources of the source device corresponding to the task to be migrated, wherein the resources of the source device include computing resources and storage resources.
[0119] In step S501, the above-mentioned release of the resources of the source device corresponding to the task to be migrated when the task to be migrated is successfully migrated to the target device can be achieved by determining the migration status of each task to be migrated through interaction with the task migration interface during the migration process, and releasing the resources of the source device corresponding to the task to be migrated when the migration status is successful.
[0120] This application improves resource utilization by releasing the resources of the source device corresponding to the task to be migrated when the migration status is successful.
[0121] In some embodiments, determining a weighted set of matching values based on available network bandwidth and available memory includes:
[0122] Step S601: Obtain the CPU requirement, GPU requirement, memory requirement, and network bandwidth requirement for each subtask to be migrated;
[0123] In step S601, the above-mentioned acquisition of the CPU requirement value, GPU requirement value, memory requirement value and network bandwidth requirement value corresponding to each subtask to be migrated can be determined in real time through the soft bus.
[0124] Step S602: Obtain the remaining available CPU cores and the remaining available GPUs for each candidate device;
[0125] In step S601, the above-mentioned acquisition of the remaining available CPU cores and the remaining available GPUs of each candidate device can be achieved by collecting the remaining available CPU cores and the remaining available GPUs of each candidate device in real time via a soft bus.
[0126] Step S603: Based on the CPU requirement, GPU requirement, memory requirement, network bandwidth requirement, remaining available CPU cores, available GPUs, available network bandwidth, and available memory, determine the weighted matching degree between any subtask to be migrated and any candidate device.
[0127] Step S604: Combine all weighted matching degree values to obtain a set of weighted matching values.
[0128] In some embodiments, based on CPU requirement, GPU requirement, memory requirement, network bandwidth requirement, remaining available CPU cores, available GPUs, available network bandwidth, and available memory, the weighted matching degree between any subtask to be migrated and any candidate device is determined using the following formula:
[0129] ;
[0130] in, For the first The first task to be migrated The subtasks to be migrated and the first The weighted matching degree value among the candidate devices. The first preset weight value, The second preset weight value, The third preset weight value, The fourth preset weight value, For the first The remaining available CPU cores for each candidate device For the first The number of remaining available GPUs for each candidate device. For the first Available memory for each candidate device For the first Available network bandwidth for each candidate device For migration The first task to be migrated CPU requirements for each subtask to be migrated. For migration The first task to be migrated The GPU requirements for each subtask to be migrated. For migration The first task to be migrated The memory requirements of each subtask to be migrated. For migration The first task to be migrated The network bandwidth requirements of each subtask to be migrated.
[0131] This application determines the weighted matching degree between any subtask to be migrated and any candidate device based on CPU requirement value, GPU requirement value, memory requirement value, network bandwidth requirement value, remaining available CPU cores, available GPUs, available network bandwidth, and available memory. This provides a more accurate data basis for subsequently determining the target device, thereby improving the efficiency of task migration.
[0132] Additionally, refer to Figure 2 One embodiment of this application provides a task migration system, including a network quality value determination module 1100, a computing power value determination module 1200, a task to be migrated determination module 1300, a task splitting module 1400, a task dependency graph construction module 1500, a weighted matching value determination module 1600, a target device determination module 1700, and a task migration module 1800, wherein:
[0133] The network quality value determination module 1100 is used to determine the network quality value of each initial device based on the signal strength, available network bandwidth, and latency of each initial device, after acquiring the signal strength, available network bandwidth, and latency of all initial devices.
[0134] The computing power value determination module 1200 is used to determine the computing power value of each initial device based on the CPU utilization and available memory of each initial device, after obtaining the CPU utilization and available memory of all initial devices;
[0135] The task to be migrated determination module 1300 is used to obtain the QoS priority of each task to be migrated when all tasks to be migrated are determined. The task to be migrated is a task that has not yet been completed in the source device. The source device is an initial device among all initial devices that has network fluctuations. Network fluctuations include the initial device's latency being greater than a preset latency threshold.
[0136] The task splitting module 1400 is used to split each task to be migrated into several subtasks to be migrated based on preset functional dimensions; and to determine the dependency tag value between any two subtasks to be migrated for each task to be migrated.
[0137] The task dependency graph construction module 1500 is used to construct the task dependency graph for each task to be migrated, where the nodes of the task dependency graph are the subtasks to be migrated, and the edges of the task dependency graph are the dependency label values.
[0138] The weighted matching value determination module 1600 is used to determine a set of weighted matching values based on available network bandwidth and available memory. The weighted matching values in the set of weighted matching values are used to measure the matching degree between any task to be migrated and any candidate device. The candidate device is the initial device other than the source device among all initial devices.
[0139] The target device determination module 1700 is used to determine the target device for each migration task based on network quality value, computing power value, QoS priority and weighted matching value set, wherein the target device belongs to the candidate device;
[0140] The task migration module 1800 is used to migrate tasks to the target device based on the task dependency graph of each task to be migrated.
[0141] This system determines the target device for each task to be migrated based on network quality values, computing power values, QoS priority, and a weighted matching value set. It can determine the target device for each task to be migrated by combining network quality values and computing power values, thereby reducing the risk of "uneven workload and resource mismatch" and achieving multi-dimensional resource adaptation. By combining QoS priority to determine the target device for each task to be migrated, the rights and interests of core tasks are protected. Then, the task to be migrated is migrated to the target device, reducing cross-device migration overhead and improving migration efficiency, thus achieving low-latency and high-reliability task migration.
[0142] It should be noted that the system embodiments described above are based on the same inventive concept as the method embodiments described above. Therefore, the relevant content of the method embodiments described above is also applicable to the system embodiments described above, and will not be repeated here.
[0143] Figure 3 A schematic diagram of the hardware structure for task migration provided in an embodiment of this application is shown.
[0144] The task migration device may include a processor 301 and a memory 302 storing computer program instructions.
[0145] Specifically, the processor 301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0146] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 302 is non-volatile solid-state memory.
[0147] In some embodiments, memory 302 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0148] The processor 301 implements any of the task migration methods described in the above embodiments by reading and executing computer program instructions stored in the memory 302.
[0149] In one example, the task migration device may also include a communication interface 303 and a bus 310. Wherein, as Figure 3 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 310 and complete communication with each other.
[0150] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0151] Bus 310 includes hardware, software, or both, that couples components of a task migration device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Unlimited Available Network Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0152] The task migration device can execute the task migration method described in this application embodiment based on a 3D design model, thereby achieving a combination of Figure 1 and Figure 2 The task migration methods and systems described.
[0153] Furthermore, in conjunction with the task migration methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the task migration methods in the above embodiments.
[0154] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0155] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0156] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0157] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0158] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A task migration method, characterized in that, The task migration method includes: Having obtained the signal strength, available network bandwidth, and latency of all initial devices, a network quality value for each initial device is determined based on the signal strength, available network bandwidth, and latency of each initial device. Having obtained the CPU utilization and available memory of all initial devices, the computing power value of each initial device is determined based on the CPU utilization and available memory of each initial device. Given all tasks to be migrated, obtain the QoS priority of each task to be migrated, wherein the task to be migrated is a task that has not yet been completed in the source device, and the source device is an initial device among all initial devices that has network fluctuations, and the network fluctuations include the initial device having a latency greater than a preset latency threshold; Based on a preset functional dimension, each task to be migrated is divided into several sub-tasks to be migrated; and the dependency tag value between any two sub-tasks to be migrated for each task to be migrated is determined. Construct a task dependency graph for each of the tasks to be migrated, wherein the nodes of the task dependency graph are the subtasks to be migrated, and the edges of the task dependency graph are the dependency label values; Based on the available network bandwidth and the available memory, a weighted matching value set is determined, wherein the weighted matching values in the weighted matching value set are used to measure the matching degree between any of the migration tasks and any candidate devices, and the candidate devices are the initial devices other than the source device among all the initial devices; Based on the network quality value, the computing power value, the QoS priority, and the weighted matching value set, the target device for each of the migration tasks is determined, wherein the target device belongs to the candidate devices; Based on the task dependency graph of each of the tasks to be migrated, the tasks to be migrated are migrated to the target device.
2. The task migration method according to claim 1, characterized in that, The step of determining the target device for each migration task based on the network quality value, the computing power value, the QoS priority, and the weighted matching value set includes: Having obtained the remaining battery percentage of all initial devices, the battery value of each initial device is determined based on the remaining battery percentage of each initial device; Given the topology hop count between the source device and the candidate device corresponding to any of the migration tasks, determine the distance value between each source device and any candidate device. Based on the network quality value, the computing power value, the power consumption value, and the distance value, a candidate device score is determined, wherein the candidate device score is used to characterize the score of task migration between the source device and the corresponding candidate device corresponding to the distance value; Based on the QoS priority, all the tasks to be migrated are sorted to obtain a sorted sequence of tasks to be migrated. Based on the candidate device score, the weighted matching value set, and the sorted sequence of tasks to be migrated, the target device for each task to be migrated is determined.
3. The task migration method according to claim 2, characterized in that, The step of determining the target device for each migration task based on the candidate device score, the weighted matching value set, and the sorted sequence of migration tasks includes: Calculate the sum of the weighted matching values of all the subtasks to be migrated for any of the said migration tasks and any of the said candidate devices; Based on the sorted sequence of tasks to be migrated, the candidate device with the highest sum of weighted matching values and a candidate device score greater than a preset device score threshold is selected for each task to be migrated, and is taken as the corresponding target device.
4. The task migration method according to claim 3, characterized in that, The step of migrating the tasks to be migrated to the target device based on the task dependency graph of each task to be migrated includes: Construct a soft bus channel between the source device and the target device of the task to be migrated; Based on the task dependency graph, the task to be migrated is pulled from the source device to the target device through the soft bus channel, so as to migrate the task to be migrated to the target device.
5. The task migration method according to claim 4, characterized in that, The method further includes: If the task to be migrated is successfully migrated to the target device, the resources of the source device corresponding to the task to be migrated are released, wherein the resources of the source device include computing resources and storage resources.
6. The task migration method according to claim 1, characterized in that, The step of determining the weighted matching value set based on the available network bandwidth and the available memory includes: Obtain the CPU requirement, GPU requirement, memory requirement, and network bandwidth requirement for each of the subtasks to be migrated; Obtain the remaining available CPU cores and the remaining available GPUs for each candidate device; Based on the CPU requirement value, the GPU requirement value, the memory requirement value, the network bandwidth requirement value, the remaining available CPU cores, the available GPUs, the available network bandwidth, and the available memory, determine the weighted matching degree value between any of the subtasks to be migrated and any of the candidate devices; Combine all the weighted matching degree values to obtain the weighted matching value set.
7. A task migration method according to claim 6, characterized in that, Based on the CPU requirement, GPU requirement, memory requirement, network bandwidth requirement, remaining available CPU cores, available GPUs, available network bandwidth, and available memory, the weighted matching degree between any of the subtasks to be migrated and any of the candidate devices is determined using the following formula: ; in, For the first The first task to be migrated The subtasks to be migrated and the first The weighted matching degree value among the candidate devices. The first preset weight value, The second preset weight value, The third preset weight value, The fourth preset weight value, For the first The remaining available CPU cores for each candidate device For the first The number of remaining available GPUs for each candidate device. For the first Available memory for each candidate device For the first Available network bandwidth for each candidate device For migration The first task to be migrated CPU requirements for each subtask to be migrated. For migration The first task to be migrated The GPU requirements for each subtask to be migrated. For migration The first task to be migrated The memory requirements of each subtask to be migrated. For migration The first task to be migrated The network bandwidth requirements of each subtask to be migrated.
8. A task migration system, characterized in that, The task migration system includes: A network quality value determination module is used to determine the network quality value of each initial device based on the signal strength, available network bandwidth and latency of each initial device, after obtaining the signal strength, available network bandwidth and latency of all initial devices; The computing power value determination module is used to determine the computing power value of each initial device based on the CPU utilization and available memory of each initial device, after obtaining the CPU utilization and available memory of all initial devices; The task to be migrated module is used to obtain the QoS priority of each task to be migrated when all tasks to be migrated are determined, wherein the task to be migrated is a task that has not yet been completed in the source device, the source device is an initial device among all initial devices that has network fluctuations, and the network fluctuations include the initial device having a latency greater than a preset latency threshold. The task splitting module is used to split each task to be migrated into several subtasks to be migrated based on a preset functional dimension; and to determine the dependency tag value between any two subtasks to be migrated for each task to be migrated. A task dependency graph construction module is used to construct a task dependency graph for each of the tasks to be migrated, wherein the nodes of the task dependency graph are the subtasks to be migrated, and the edges of the task dependency graph are the dependency label values; The weighted matching value determination module is used to determine a set of weighted matching values based on the available network bandwidth and the available memory, wherein the weighted matching values in the set of weighted matching values are used to measure the matching degree between any of the tasks to be migrated and any candidate device, and the candidate device is the initial device other than the source device among all the initial devices; The target device determination module is used to determine the target device for each of the migration tasks based on the network quality value, the computing power value, the QoS priority and the weighted matching value set, wherein the target device belongs to the candidate devices; The task migration module is used to migrate the task to be migrated to the target device based on the task dependency graph of each task to be migrated.
9. A task migration device, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform a task migration method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions for causing a computer to perform a task migration method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Task scheduling method and device, electronic equipment, storage medium and program product
CN119938257A
Method and System for Scheduling Task in Cloud Computing
US20160292013A1