A Hybrid Computing Power Scheduling Method and System Based on Task Stealing
By establishing a task theft trace network in the CPU and GPU computing units, tracking the location of task accumulation and adjusting the direction of theft connections, the problem of difficulty in adjusting the direction of task theft in traditional computing power scheduling is solved, and the efficiency of collaborative scheduling of CPU and GPU resources is improved.
Patent Information
- Application Number
- CN202611602109.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-16
- Publication Date
- 2026-11-17
AI Technical Summary
Traditional computing power scheduling methods have difficulty tracking changes in the location of task accumulation and the actual migration path, which means that the direction of task theft cannot be adjusted in a timely manner according to the task execution status, affecting the dynamic collaborative scheduling of CPU and GPU computing power resources.
By acquiring the task queues of CPU and GPU computing units, tracking the entry and completion status of tasks, establishing a task theft trace network and theft direction, tracing the task accumulation location to an idle access location along the theft direction, filtering suitable tasks and transferring them to an idle access location, and adjusting the migration direction of the stolen connection.
This reduces invalid transfers caused by discontinuous queue positions or mismatched execution states during task migration, and improves the dynamic collaborative scheduling effect of computing resources.
Smart Images

Figure CN123114776A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computing power scheduling technology, and more specifically, to a hybrid computing power scheduling method and system based on task theft. Background Technology
[0002] In traditional computing power scheduling technologies, heterogeneous computing units such as CPUs and GPUs are typically used to collaboratively execute data analysis, state calculation, and scheduling simulation tasks. As computing tasks dynamically enter, the task queues of each computing unit are prone to both accumulation and idle states. Existing task stealing methods mostly rely on the current queue state to migrate tasks, making it difficult to track changes in the task accumulation location and the actual migration path. This results in the stealing direction not being adjusted in a timely manner according to the task execution status, affecting the collaborative scheduling of computing tasks among heterogeneous computing resources.
[0003] Traditional hybrid computing scheduling methods mainly allocate tasks based on the current task queue and computing power idle status. It is difficult to track the migration of task accumulation locations and the actual transfer path of tasks, resulting in a disconnect between task stealing connections and task execution status. It is impossible to adjust the stealing direction in a timely manner according to changes in the task queue, which affects the dynamic collaborative scheduling of CPU and GPU computing power resources.
[0004] To address the above problems, this invention proposes a solution. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a hybrid computing power scheduling method and system based on task theft. By constructing task theft traces through changes in task queue occupancy and dynamically migrating the stolen connections, the method solves the problem of difficulty in synchronizing the task accumulation migration and task theft direction in a CPU and GPU hybrid computing power environment.
[0006] To achieve the above objectives, the present invention provides the following embodiments: A hybrid computing power scheduling method based on task theft includes: acquiring task queues of CPU and GPU computing units, tracking task entry and completion states, determining task accumulation positions and idle access positions, and establishing a task theft trace network and theft direction based on task migration results; tracing task accumulation positions to idle access positions along the theft direction according to the task theft trace network, acquiring traversed task queues and theft connections, filtering suitable tasks on the theft connections, transferring suitable tasks along the theft connections to idle access positions, forming queue states and execution states after task transfer; tracking the migration of task accumulation positions according to queue states and execution states after task transfer, determining the disappearance and new accumulation positions of task accumulation positions, associating the two positions along the task transfer direction, migrating the theft connections to the new accumulation positions, and adjusting the migration direction of the theft connections according to the execution state.
[0007] In a preferred embodiment, the task queues of CPU and GPU computing units are acquired, the entry and completion status of tasks are tracked, the task accumulation position and idle access position are determined, and a task theft trace network and theft direction are established based on the task migration results. Specifically, the task queues of CPU and GPU computing units maintained by the hybrid computing scheduler are acquired, the entry time, queuing position, execution start time, and completion time of each task are recorded, and a task queue sequence is established to form a task arrangement state; the queue position changes when tasks enter and complete are tracked along the task queue sequence, and the task accumulation position and idle access position are determined according to the successive changes in the task occupancy position and release position to form a position time sequence change; the time sequence changes of the accumulation position and idle access position are tracked. The system tracks the transfer of task occupancy positions, associates the occupancy and release positions before and after, and constructs a task migration trajectory. Based on the task migration trajectory, it connects adjacent computing units according to the actual access sequence of the task, and retains the migration direction between CPU to GPU, GPU to CPU, and between similar computing units to form task-stealing connections. It tracks the connection positions of the migration endpoint and the subsequent migration start point along the task-stealing connections, associates the interconnected stolen connections, and connects the connection positions in series according to the task migration direction to form a task-stealing trace network. Based on the task-stealing trace network, it tracks the connection positions of each stolen connection, identifies the path extension position and branching position along the migration direction of the task-stealing extension chain and task-stealing branches, associates the access status at the end of each branch, and forms the theft direction.
[0008] In a preferred embodiment, the changes in queue positions during task entry and completion are tracked along the task queue sequence. Based on the successive changes in task occupancy and release positions, task accumulation positions and idle access positions are determined, forming a positional temporal change. Specifically, the following steps are taken: The task queues of the CPU and GPU computing units are obtained; the queue positions are arranged according to the order of task entry; the task entry time, queue position, execution start time, and completion time are recorded to form a task queue position sequence; along the task queue position sequence, the occupancy changes of each queue position are tracked according to the task entry time, execution start time, and completion time; the entry, waiting, and execution changes of tasks at the same position are correlated to obtain the occupancy status and release time of each queue position; based on the occupancy status of each queue position... Using status and release time, the system tracks the access position of subsequent tasks before a task is completed, and associates adjacent positions extending from the occupied state to form task accumulation positions. Based on the task completion status, it identifies changes in queue position release, associates the task completion time with its queue position, and determines the queue position released after task completion. Based on the released queue position, it tracks the access status of subsequent tasks, reads the task execution status of the computing unit to which the release position belongs, and maps the release position to the corresponding computing unit's accessibility status to confirm idle access positions. According to the order of task entry and completion time, it associates task accumulation positions and idle access positions, records the appearance time and position changes of these two types of positions in different computing unit task queues, and forms a position temporal change pattern.
[0009] In a preferred embodiment, the connection positions between the migration endpoint and the subsequent migration start point are traced along the task-stealing connection. Successive stolen connections are associated, and the connection positions are linked together according to the task migration direction to form a task-stealing trace network. Specifically, the following steps are taken: The start position, end position, and migration direction of each task-stealing connection are obtained. The stolen connections are arranged according to the order in which the task migration occurs, forming a sequential sequence. The end position and start position of adjacent task-stealing connections are extracted along the sequential sequence. The queue positions corresponding to these two positions are read, and the queue position changes are traced when the task migrates from one connection to the next, establishing a positional connection relationship between adjacent task-stealing connections. Based on the positional connection relationship, the end position of the previous task-stealing connection is compared with the start position of the next task-stealing connection. The task access and migration times of the two stolen connections are read, and the previous connection is... The termination position of a connection is matched with the starting position of the next connection according to the order of task migration, and the continuation position is determined along the task migration direction. Based on the continuation position, the extension direction of the next stolen connection is traced, and the migration direction of the previous connection is associated with the access direction of the next connection. The stolen task connections that are continuously connected in the direction are sequentially linked to form a task theft extension chain. The end continuation position of the task theft extension chain is traced. When the same end continuation position has subsequent task theft connections pointing to different computing units, the actual migration time and migration direction of each subsequent task theft connection are read, and the subsequent task theft connections in each direction are retained to form a task theft branch. The starting continuation position of the task theft branch is associated with the task theft extension chain to which it belongs, and the associated stolen connections are organized along the migration direction of each branch to form a task theft trace network.
[0010] In a preferred embodiment, the task accumulation position is traced along the theft direction to an idle access position using a task theft trace network. The traversed task queues and stolen connections are obtained, and suitable tasks on the stolen connections are filtered. These suitable tasks are then transferred along the stolen connections to the idle access position, forming a queue state and execution state after the task transfer. Specifically, the process is as follows: The task accumulation position is traced along the theft direction to the idle access position. The traversed stolen connections are read, and the start and end positions of the stolen connections are mapped to their respective computing units, forming a task queue sequence along the theft path. The task occupancy position along the task queue sequence is traced along the theft direction, and the changes in task access and migration between adjacent computing units are recorded, forming a task continuity state and filtering candidate tasks and their locations. The migration direction and occupied position of candidate tasks are continuously changed across computing units. The task execution status and subsequent access position are read to form a migration continuity status. The migration direction of the occupied position is tracked along the migration continuity status of the candidate tasks. The computing units passed through and the task execution status are associated, and tasks that form continuity with idle access positions are selected to form adaptation tasks. The migration direction is tracked according to the stolen connection of the adaptation task. The stolen connection is tracked sequentially from the current queue position to the idle access position. The computing units passed through and the queue positions are associated, and the status changes of task departure and subsequent access are recorded to form a task transfer record. According to the task transfer record, the position release of the queue where the adaptation task is located and the queue access of the idle access position are tracked to obtain the queue status and execution status after the task transfer.
[0011] In a preferred embodiment, the task occupancy position is tracked along the task queue sequence along the theft direction, and the task access and migration changes of adjacent computing units are recorded to form a task continuity status and filter candidate tasks and their locations. Specifically, the following steps are taken: The task queue sequence along the theft path is obtained; the positions of each queue are arranged according to the theft direction; the occupancy task and its associated computing unit are read from each position to form a task queue position association; the position occupancy changes of adjacent queues are tracked based on the task queue position association; the departure and access positions of the same task in the preceding and following queues are recorded; and the task continuity position is formed by combining the migration direction of the theft connection; the subsequent access positions of the same task are recorded based on the task continuity position, and its occupancy position migration between different computing units is associated with it, forming a task continuity across computing units according to the migration order. The sequence is analyzed; based on the positional changes in the successive sequence, the task execution state and computing unit transition are associated, and the access position and execution changes when the task enters the subsequent computing unit are recorded to form the task migration state; when the same task has multiple subsequent access positions, the stolen connection and migration direction of the access position are read, the subsequent access position is compared with the current migration direction, the branch succession position of the task is determined, and the task branch succession state is formed; the task branch succession state is continued to be tracked to the idle access position, the succession change between the last occupied position of the task and the idle access position is recorded, and the succession termination position is determined to form the task succession range; the migration direction of the task is tracked according to the task succession range, the corresponding execution state and termination position are read, and tasks that have entered the idle access position through the stolen connection are screened to form candidate tasks and their positions.
[0012] In a preferred embodiment, the queue position release and idle access position of the adapting task are tracked according to the task transfer record to obtain the queue state and execution state after the task transfer. Specifically, the adapting task, the queue position of the adapting task, and the idle access position after migration are obtained from the task transfer record. The time when the adapting task leaves the queue and the time when it enters the idle access position are read to form a task transfer sequence. The position occupancy status of the queue before the adapting task leaves is tracked according to the task transfer sequence. The change from occupancy to release of the position after the task is moved out is recorded to form the position release status before migration. The migration destination of the adapting task is read according to the position release status before migration. The time when the adapting task enters the idle access position is tracked and recorded. The change in location from idle to occupied and the subsequent task queuing form the post-migration location access state; based on the pre-migration location release state and the post-migration location access state, the changes in the occupancy of the adaptable task before and after leaving the location and entering the location are read according to the task transfer sequence, and the changes in task entry, waiting and release at the two locations are recorded to form the queue occupancy change state; based on the queue occupancy change state, the execution state of the adaptable task at the leaving location and entering location is read, and the waiting, execution and completion times of the task before and after the migration are recorded, and the corresponding computing power unit is read to form the task execution change state; based on the queue occupancy change state and the task execution change state, the queue state and execution state after the task transfer are read according to the transfer order of the adaptable task from the leaving location to the entering location.
[0013] In a preferred embodiment, the migration of task accumulation positions is tracked based on the queue state and execution state after task transfer. The fading and new accumulation positions of task accumulation positions are determined. Two positions are associated along the task transfer direction, and the stolen connection is migrated to the new accumulation position. The migration direction of the stolen connection is adjusted according to the execution state. Specifically, the following steps are taken: The queue state and execution state after task transfer are obtained. The occupancy and execution states of the CPU and GPU task queues at the corresponding time are read according to the task transfer time to form the queue state at that time. The occupancy reduction and position release of the task accumulation position after task transfer are tracked to form the accumulation position fading state. Based on the accumulation position fading state, the changes in task entry and occupancy in the task queue are read again. New task entry positions are tracked, and the positions where tasks continuously enter and form occupancy are determined as new accumulation positions, forming the accumulation position migration state. Based on the accumulation position migration state, the canceled task accumulation is read... The task transfer direction between the current accumulation position and the new accumulation position is determined, and the two positions are connected based on the migration order of the previous and subsequent positions to form an accumulation position migration continuation. The stolen connection of the canceled task accumulation position is read according to the accumulation position migration continuation, and the queue position traversed by the stolen connection along the task transfer direction is tracked. Its end is transferred from the canceled task accumulation position to the new accumulation position to form a migration stolen connection. The task entry and execution status at the new accumulation position is read according to the migration stolen connection to obtain the migrateable tasks and candidate access positions. The CPU or GPU executing the task is determined as the next migration position, and the stolen connection from the new accumulation position to that position is determined as the next stolen direction, forming a migration stolen connection direction change state. The subsequent task access and execution status at the new accumulation position is read according to the migration stolen connection direction change state, and the migration stolen connection is adjusted to the actual task migration direction to form the adjusted migration stolen connection direction.
[0014] In a preferred embodiment, based on the stolen connection at the accumulated position of the task that was canceled and terminated, the queue positions traversed by the stolen connection along the task transfer direction are tracked, and its end is transferred from the terminated task accumulated position to the new accumulated position, forming a migration stolen connection. Specifically: based on the accumulated position of the task that was canceled and terminated and the new accumulated position, the stolen connection connecting to the terminated position is found, its migration direction and end position are read, and the transfer start point of the stolen connection is determined; based on the transfer start point of the stolen connection, the queue position where its end is located is read, and adjacent queue positions are tracked according to the task transfer direction, recording the queue positions traversed when the task transfers from the terminated position to the subsequent position, forming a stolen connection migration path; based on the stolen connection migration path, the task departure and arrival times at adjacent positions are read, and... The task transfer direction is correlated with the positional changes during the migration and continuation of the accumulation position to determine the migration position of the stolen connection end. Based on the migration position of the stolen connection end, the task access and occupancy changes of the new accumulation position are read. When the migration path forms a continuation with the new accumulation position, the stolen connection end is transferred to the new accumulation position, forming a stolen connection end transfer state. Based on the stolen connection end transfer state, the subsequent stolen connections and task transfer directions of the new accumulation position are read. The subsequent connections that are consistent with the task transfer direction before the transfer are connected to the end position after the transfer, forming a stolen connection extension state. Based on the stolen connection extension state, the stolen connections after the transfer and their subsequent continuation positions are read. The task transfer direction extending from the new accumulation position to the idle access position is retained. The connections before and after the transfer are connected in series to form a migrated stolen connection.
[0015] A system for a hybrid computing power scheduling method based on task theft includes a network module, a filtering module, and an adjustment module, with connections between the modules. The network module is used to acquire task queues of CPU and GPU computing units, track task entry and completion status, determine task accumulation positions and idle access positions, and establish a task theft trace network and theft direction based on task migration results. The filtering module is used to track task accumulation positions to idle access positions along the theft direction according to the task theft trace network, acquire the passed task queues and theft connections, filter suitable tasks on the theft connections, and transfer the suitable tasks to idle access positions along the theft connections, forming the queue state and execution state after task transfer. The adjustment module is used to track the migration of task accumulation positions according to the queue state and execution state after task transfer, determine the disappearance and new accumulation positions of task accumulation positions, associate the two positions along the task transfer direction, migrate the theft connection to the new accumulation position, and adjust the migration direction of the theft connection according to the execution state.
[0016] The technical effects and advantages of the hybrid computing power scheduling method and system based on task theft of the present invention are as follows: 1. This invention tracks candidate tasks by tracking task queue positions, stolen connections, task continuation positions, and migration continuation chains. It continuously records the occupied positions, migration directions, and execution states of candidate tasks in different computing units and filters suitable tasks by analyzing the actual process of tasks accessing idle access positions. This identifies tasks that can continue to be transferred from the actual task migration paths, combining the task theft process with the task's own queue position and execution state, reducing invalid transfers caused by discontinuous queue positions or mismatched execution states during task migration.
[0017] 2. This invention continues to read queue occupancy and execution status after task transfer is completed, tracks the reduction in occupancy and release of the original task accumulation position, and identifies new accumulation positions formed by the continuous extension of task access. It then forms an accumulation position migration continuation based on the task transfer direction between the fading position and the new accumulation position. Furthermore, it transfers the end of the existing stolen connection to the new accumulation position and adjusts the stolen connection direction according to subsequent task access and execution changes at the new accumulation position. This ensures that the task stealing path moves with the actual migration of the task accumulation position, rather than continuing to use fixed connections that have lost their corresponding task flow direction after the task queue changes, thus improving the effectiveness of dynamic collaborative scheduling of computing resources. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a hybrid computing power scheduling method based on task theft according to the present invention.
[0019] Figure 2 This is a schematic diagram of the structure of a hybrid computing power scheduling system based on task theft according to the present invention. Detailed Implementation
[0020] The embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0021] Example 1, Figure 1 This invention presents a hybrid computing power scheduling method based on task theft, comprising: S1: Obtain the task queues of CPU and GPU computing units, track the entry and completion status of tasks, determine the task accumulation location and idle access location, and establish a task theft trace network and theft direction based on the task migration results. In this embodiment, the task queues of the CPU and GPU computing units are obtained, the task entry and completion status are tracked, the task accumulation position and idle access position are determined, and a task theft trace network and theft direction are established based on the task migration results, as follows: Obtain the CPU and GPU computing unit task queues maintained by the hybrid computing power scheduler, record the entry time, queue position, execution start time and completion time of each task, and establish a task queue sequence according to the computing power unit to which the task belongs and the order in which the task enters, thus forming the task arrangement status of each computing power unit. The queue position changes when tasks enter and complete are tracked along the task queue sequence. The task accumulation position and idle access position are determined based on the successive changes in the task occupancy position and release position, forming a position time sequence change. Track the transfer of task occupancy positions along the temporal changes of accumulation positions and idle access positions, associate the occupancy positions and release positions at previous and subsequent times, determine the starting point, ending point and computing units passed through the task migration, and form a task migration trajectory. Based on the task migration trajectory, adjacent computing units are connected according to the actual access sequence of the task, and the migration direction between CPU to GPU, GPU to CPU and similar computing units is preserved to form a task stealing connection with computing unit succession relationship. The connection between the endpoint of the migration and the starting point of the subsequent migration is traced along the task theft connection. The interconnected theft connections are associated and the connection points are linked together according to the direction of task migration to form a task theft trace network. Based on the task theft trace network, the connection position of each theft connection is traced, the path extension position and branch position are identified along the migration direction of the task theft extension chain and the task theft branch, and the access status of the end of each branch is associated to form the theft direction.
[0022] In this embodiment, the changes in queue position when tasks enter and complete are tracked along the task queue sequence. The task accumulation position and idle access position are determined based on the successive changes in the task occupancy position and release position, forming a positional temporal change, as detailed below: Obtain the task queues of CPU and GPU computing units, arrange the queue positions according to the order in which tasks enter, and record the task entry time, queue position, execution start time and completion time to form a task queue position sequence. Track the occupancy changes of each queue position according to the task entry time, execution start time, and completion time, and associate the entry, waiting, and execution changes of tasks at the same position to obtain the occupancy status and release time of each queue position. Based on the occupancy status and release time of each queue position, the system tracks the access position of subsequent tasks before a task is completed. It associates adjacent positions extending from the occupancy status to form task accumulation positions. Specifically, it reads the occupancy status of each task queue at adjacent times and records whether each queue position is currently occupied by a task and when the task at that position is completed and released. For tasks that are not yet completed, it observes whether new tasks enter the queue positions behind them. For example, if a task is still in execution and multiple tasks are sequentially accessed from its subsequent positions, the system records the adjacency relationship between these subsequent access positions and the original task's occupied position. It associates positions already occupied at the previous time with newly occupied positions at the next time. If a new occupied position immediately follows the original occupied position, the two are connected to form a backward extension of the task's occupied position. These adjacent occupied positions are connected according to the task entry time. When subsequent tasks sequentially access adjacent queue positions while the previous task is not yet released, and there are still subsequent occupied positions after the previous occupied position is released, the continuous occupied position segment formed by the task entry and release sequence is determined as the task accumulation position. Based on the task completion status, the release changes of the queue position are identified, the task completion time is associated with the queue position, and the queue position released after the task is completed is determined. Specifically, the completion status and completion time of each task are read, and the queue position of the task after entering the queue is retained. The correspondence between the task completion event and the queue position is established. The queue position of the corresponding task is retrieved according to the task completion time. The queue occupancy status before and after the task completion is compared, and the queue position that changes from the task occupancy status to the unoccupancy status is identified. The queue position that changes from the occupancy status to the task completion time is associated with the task completion time to obtain the position release event generated by the task completion. Each position release event is recorded according to the computing unit and queue order to form a release position sequence that can be used when subsequent tasks are connected. Track the access status of subsequent tasks based on the released queue position, read the task execution status of the computing unit to which the release position belongs, match the release position with the access status of the corresponding computing unit, and confirm again before task access that the release position and computing unit are not occupied. The release position confirmed by the status is determined as an idle access position, thus forming an idle access position. By associating task accumulation positions and idle access positions with the order of task entry and completion, the occurrence time and position changes of the two types of positions in the task queues of different computing units are recorded to form a position time sequence change.
[0023] In this embodiment, the connection positions between the migration endpoint and the subsequent migration start point are traced along the task-stealing connection, and the interconnected stealing connections are associated. The connection positions are then connected in series according to the task migration direction to form a task-stealing trace network, as detailed below: Obtain the start position, end position, and migration direction of each task's stolen connection, and arrange the stolen connections according to the order in which the task migrations occur, forming a sequential sequence of task stolen connections. Extract the termination and start positions of adjacent task stealing connections along the consecutive sequences, read the queue positions corresponding to the two positions, track the changes in queue positions when a task migrates from the previous connection to the next connection, and establish the positional connection relationship of adjacent task stealing connections. Based on the positional connection relationship, compare the termination position of the previous task's stolen connection with the starting position of the next task's stolen connection, read the task access and migration times of the two stolen connections, match the termination position of the previous connection with the starting position of the next connection according to the order of task migration, and determine the connection position between the stolen connections along the task migration direction. Based on the location of the connection, the extension direction of the next stolen connection is tracked, the migration direction of the previous connection is associated with the access direction of the next connection, and the task stolen connections that are continuously connected in the direction are linked together to form a task stolen extension chain. The task theft extension chain is traced to its end connection position. When subsequent task theft connections pointing to different computing units have appeared at the same end connection position, the actual migration time and migration direction of each subsequent task theft connection are read. The subsequent task theft connections in each direction are retained to form task theft branches in different migration directions. Each task theft branch is recorded as a path where task migration has occurred. Associate the starting position of the task theft branch with its corresponding task theft extension chain, and organize the associated theft connections along the migration direction of each branch to form a task theft trace network that includes extension chains and branches.
[0024] Furthermore, based on the positional connection relationship, the termination position of the previous task-stealing connection is compared with the starting position of the next task-stealing connection. The task access and migration times of the two stolen connections are read, and the termination position of the previous connection and the starting position of the next connection are matched end-to-end according to the task migration sequence. The connection position between the task-stealing connections is determined along the task migration direction, as follows: Obtain the termination and start positions of two adjacent stolen connections, and read the computing unit to which the termination and start positions belong, the corresponding task, the task migration completion time and access time to form a pair of connection positions; According to the order of task migration, the termination position of the previous stolen connection is matched with the starting position of the next stolen connection. It is determined whether the task of the previous connection arrives at the starting computing unit of the next connection before the corresponding task migration of the next connection begins. The task access changes of the computing unit between the two migrations are read to determine whether there is a migration continuity between the previous and next connections. If the terminating computing unit of the previous connection is the same as the starting computing unit of the next connection, and the task access time of the next connection is later than the task migration completion time of the previous connection, then the task continuation position corresponding to the computing unit is determined as a candidate continuation position. For two stolen connections that are connected end to end, the migration endpoint of the previous connection and the migration start point of the next connection are matched according to the actual migration time of the task, and the computing unit connection relationship and task migration direction between the two migrations are preserved. Arrange these positional associations according to the actual migration sequence of the task, and connect the stolen connections in sequence with the time sequence of the previous connection migration completion and the next connection migration access. The common computing power unit corresponding to the migration endpoint of the previous connection and the migration start point of the next connection is determined as the connection position between the stolen connections.
[0025] Furthermore, the starting position of each task-stealing branch is associated with its corresponding task-stealing extension chain, and the associated stealing connections are organized along the migration direction of each branch, forming a task-stealing trace network that includes extension chains and branches, as follows: Obtain the starting position of the task-stealing branch and its position in the task-stealing extension chain. Compare the queue positions, computing units, and migration directions of the two to determine the branch's access position in the task-stealing extension chain. Along the migration direction of the task stealing branch, trace the start, end and continuation positions of each stealing connection backward from the branch access position, and arrange the stealing connections within the branch according to the continuation position to form a branch extension sequence; By comparing the termination position of adjacent stolen connections with the starting position of the next connection along the branch extension sequence, the existing continuation positions and migration directions are preserved, and the stolen connections within the branch are sequentially connected to form a continuous branch migration path. The access position of each branch is mapped to the position of its respective task theft extension chain. The positional relationship between each branch and the main extension chain is connected according to the migration path of each branch, forming a combined structure of task theft extension chain and each task theft branch. Based on the actual migration direction of the task, the task theft extension chain and the theft connections in its branches are organized starting from the task accumulation position. The existing connection positions between each connection are preserved, forming a task theft trace network extending from the task accumulation position to multiple idle access positions.
[0026] In this embodiment, the connection position of each stolen connection is tracked according to the task theft trace network. The path extension position and branching position are identified along the migration direction of the task theft extension chain and task theft branches. The access status of the end of each branch is associated to form the theft direction, as follows: Obtain the stolen connections and their succession positions in the task theft trace network. Read the start position, end position and migration direction of each connection according to the task migration sequence. Match the start and end positions of adjacent stolen connections to obtain the succession position sequence on each path. The migration direction of the stolen connection is traced along the sequence of successive positions of the task theft extension chain. The queue positions passed from the task accumulation position are recorded, and each successive position is arranged according to the migration direction to form the path extension sequence of the task theft extension chain. The sequence extends along the path to trace each connection position. When there are multiple subsequent stealing connections at the current connection position, the migration direction and access computing unit of each subsequent connection are compared, and the position where the path turns from a single path to multiple directions is determined as the diversion position. The task stealing branch tracing path extension sequence is accessed along the branch access point. The termination position of the subsequent stolen connection in the branch is read until there is no subsequent connection at the termination position. The final termination position is associated with the corresponding idle access position to form the branch end access state. Based on the path extension order between each diversion location and the access status at the end of the branch, the task accumulation location, diversion location, and idle access location are associated, and each location is connected in series according to the task migration direction to form a theft direction from the task accumulation location to each idle access location.
[0027] S2, based on the task theft trace network, track the task accumulation position to the idle access position along the theft direction, obtain the passed task queue and the stolen connection, filter the adapted tasks on the stolen connection, and transfer the adapted tasks to the idle access position along the stolen connection to form the queue state and execution state after the task transfer. In this embodiment, the task accumulation position is traced along the theft direction to an idle access position using the task theft trace network. The traversed task queues and theft connections are obtained, and the adaptable tasks on the theft connections are filtered. The adaptable tasks are then transferred along the theft connections to the idle access position, forming the queue state and execution state after the task transfer, as detailed below: Track from the task accumulation location to the idle access location along the theft direction, read the stolen connections that have passed, and match the start and end positions of the stolen connections with their respective computing power units to form a task queue sequence on the theft path; Track the task occupancy position along the task queue sequence in the direction of theft, record the task access and migration changes of adjacent computing units, form the task succession status, and filter candidate tasks and their locations. The migration direction and occupancy position of candidate tasks across computing units are tracked. The execution status and subsequent access position of the tasks are read to form the migration and continuation status of the candidate tasks. Specifically, the current queue position and computing unit to which the candidate task belongs are obtained. The migration direction of the stolen connection corresponding to the task is read to determine the current migration start position of the task. The access position of the candidate task in the next computing unit is read according to the migration direction. The current occupancy position and the next access position are matched to determine a cross-computing unit occupancy position change. The occupancy position of the candidate task in the subsequent computing units is read. The access position of the previous computing unit is used as the tracking start point of the next computing unit. The occupancy position change of the task is recorded in sequence. The execution status of the candidate task is read at each occupancy position change. Candidate tasks that are waiting and have not yet started execution are recorded as migrateable. Their current queue position and computing unit to which they belong are read. For candidate tasks that have started execution, the migration and continuation tracking is stopped. For candidate tasks that have been completed, their continuation recording is ended. The migration direction, continuous occupancy position changes, subsequent access positions and execution status of the candidate tasks are arranged in order of migration to form the migration and continuation status of the candidate tasks. The migration direction of the occupied position is tracked along the migration succession status of the candidate task, and the computing power unit and task execution status are associated. Tasks that form a succession with the idle access position are selected to form an adaptation task. Based on the stolen connection tracking migration direction of the adaptation task, the stolen connection is tracked sequentially from the current queue position to the idle access position, the computing power unit and queue position passed through are associated, and the status changes of the task leaving and subsequent access are recorded to form a task transfer record. Based on the task transfer record, track the release of the queue where the adapted task is located and the access to the queue at the idle access position, read the queue occupancy and execution status before and after the migration, and form the queue status and execution status after the task transfer.
[0028] Furthermore, the task theft trace network is used both to record task migrations that have already occurred and as a path reference for subsequent task migrations. When the system runs for the first time, before task migration records are formed, it reads the existing task access connections between CPU and GPU computing units based on the task accumulation position and idle access position formed in the task queue, and forms an initial theft connection and corresponding theft direction according to the actual access direction of the task. This allows the above process to track the task accumulation position to the idle access position and complete the first task migration. After the first task migration is completed, the task departure position, access position, migration time, and the computing unit to which it belongs are written into the task transfer record. The task theft trace network is updated using the subsequently formed task transfer records, so that subsequent task migrations can continue to be tracked along the actually occurred theft connection.
[0029] In this embodiment, the task occupancy position is tracked along the task queue sequence in the direction of theft, the task access and migration changes of adjacent computing units are recorded, a task succession status is formed, and candidate tasks and their locations are screened, as follows: Obtain the task queue sequence along the theft path, arrange the positions of each queue according to the theft direction, read the occupied tasks and their respective computing units at each position, and form a task queue position association; Based on the task queue position association, track the position occupancy changes of adjacent queues, record the departure and entry positions of the same task in the front and back queues, and form the task continuation position by combining the migration direction of the stolen connection. Based on the task continuation position, continue to record the subsequent access position of the same task, associate it with the migration of its occupied position between different computing power units, and form a task continuation sequence across computing power units according to the migration order; Based on the positional changes in the successive sequence, the task execution status is associated with the transformation of computing power units, and the access position and execution changes when the task enters the subsequent computing power unit are recorded to form the task migration status. When multiple subsequent access points appear for the same task, the stolen connection and migration direction of the access point are read, the subsequent access point is compared with the current migration direction, the branch continuation position of the task is determined, and the task branch continuation state is formed. Continue tracing along the task branch continuation status to an idle access position, record the continuation changes between the last occupied position of the task and the idle access position, and determine the position where continuation cannot continue as the continuation termination position to form the task continuation range. Based on the task continuation range, the migration direction of the task is tracked, the corresponding execution status and termination position are read, and the tasks that have been stolen and connected to the idle access position are filtered to form candidate tasks and their locations.
[0030] Furthermore, when multiple subsequent access points appear for the same task, the stolen connection and migration direction of each access point are read, the subsequent access point is compared with the current migration direction, the branch continuation position of the task is determined, and the task branch continuation state is formed, as follows: Read the task sequence across computing units formed in the previous step, find the current queue position of the same task and its multiple subsequent access positions; Obtain the stolen connections at subsequent access locations, read the start and end positions and migration direction of each stolen connection, and determine the subsequent computing units that the access locations lead to. The multiple subsequent access locations are mapped to the migration direction of the current task, and it is determined whether the access location is located at a subsequent location in the current migration direction. The access location that takes over the task migration is retained. Read the corresponding stolen connections backward according to the reserved access locations, and record the migration path of the task from the current connection location to different subsequent locations; Multiple candidate succession paths at the current succession position of the same task are aggregated, and the succession position is used as the starting point of the candidate branch. Each candidate access position is used as the extension position of different candidate branches to form a task branch succession state. The candidate branches are used as the candidate migration paths for subsequent task screening. This does not mean that multiple migrations occur at the same time for the same task.
[0031] In this embodiment, the migration direction of the occupied position is tracked along the migration succession status of the candidate task, and the passing computing unit and task execution status are associated to filter out the tasks that form a succession with the idle access position, forming an adaptation task, as follows: Obtain the migration and continuation status of candidate tasks, read their current occupied position, subsequent occupied position and migration direction, arrange the occupied positions according to the migration order of the tasks, and form a migration position sequence of candidate tasks; The candidate task is traced through the computing units it passes through based on the migration location sequence. The stolen connection and access location between adjacent occupied locations are read. The migration continuation chain of the candidate task is formed according to the start and end positions of the connection. The task execution type, required data and data residence location of the candidate task are read to form the candidate task execution information. The execution status of candidate tasks is read based on the succession position in the migration succession chain. The state changes of tasks from waiting, execution to completion between different computing power units are recorded to form a migration execution sequence. The task execution type in the candidate task execution information is matched with the computing power unit at the corresponding succession position, and it is read whether the corresponding task execution implementation exists in the computing power unit. Based on the end position of the migration continuation chain, the stolen connection is tracked, and the subsequent access position and corresponding execution status are read in combination with the migration execution sequence. The access position that takes over the current migration direction is extended to the idle access position, and the required data is tracked to the access position of the subsequent computing unit along the data residence position in the candidate task execution information to form the data access status. When the migration continuation chain of the candidate task forms a head-to-tail connection with the idle access position, read the task occupancy changes of each computing power unit during the continuation process, and extend the migration execution sequence of the candidate task to the idle access position to form a task access state. At the same time, read the memory or video memory occupancy status of the target computing power unit, and map the data required to undertake the candidate task and the computing power unit executing the task to the idle access position. Based on the task access status, read the end access location and corresponding stolen connection of the candidate task. Combine the migration continuation chain and migration execution sequence, read the task execution implementation of the computing unit to which the end access location belongs, the data access status of the candidate task, and the memory or video memory occupancy status. Then, determine the candidate task that has the corresponding task execution implementation and the required data can be accessed and the storage space can accommodate it as the adapted task.
[0032] In this embodiment, the queue location release and idle access location of the adapted task are tracked according to the task transfer record. The queue occupancy and execution status before and after the migration are read to form the queue status and execution status after the task transfer, as follows: Obtain the adapting task, the queue position of the adapting task, and the idle access position after migration from the task transfer record. Read the time when the adapting task leaves its queue and the time when it enters the idle access position to form the task transfer sequence. Based on the task transfer sequence, track the position occupancy status of the queue where the adapting task was located before leaving, and record the change of the position from occupied to released after the task is moved out, forming the position release status before migration; Based on the location release status before migration, read the migration destination of the adaptation task, track the moment when the adaptation task enters the idle access location, record the change of the location from idle to task occupied and the subsequent task queuing changes, and form the location access status after migration. Based on the release status of the position before migration and the access status of the position after migration, read the changes in the occupancy of the adaptation task before and after leaving the position and accessing the position according to the task transfer sequence, record the changes in task entry, waiting and release at the two positions, and form the queue occupancy change status. Based on the queue occupancy change status, read the execution status of the adaptation task at the departure and arrival positions, record the waiting, execution and completion times of the task before and after migration, and read the corresponding computing unit to form the task execution change status. Based on the changes in queue occupancy and task execution, the task occupancy and execution status after migration are read in the order of the adapted tasks from the departure position to the access position, i.e., the queue status and execution status after the task transfer.
[0033] S3, based on the queue state and execution state after the task transfer, track the migration of the task accumulation position, determine the disappearance of the task accumulation position and the new accumulation position, associate the two positions along the task transfer direction, migrate the stolen connection to the new accumulation position, and adjust the migration direction of the stolen connection according to the execution state. In this embodiment, the migration of the task accumulation position is tracked based on the queue state and execution state after the task transfer. The disappearance of the task accumulation position and the new accumulation position are determined. The two positions are associated along the task transfer direction, the stolen connection is migrated to the new accumulation position, and the migration direction of the stolen connection is adjusted according to the execution state, as follows: Obtain the queue status and execution status after task transfer. Read the CPU and GPU task queue occupancy and execution status at the corresponding time according to the task transfer time to form the queue status at the corresponding time. Track the reduction of occupancy and release of positions at the task accumulation position after task migration to form the accumulation position decay status. Based on the receding status of the accumulation position, continue to read the changes in task entry and occupation in the task queue, track the new task access positions, and determine the positions where tasks continue to enter and occupy as new accumulation positions, thus forming an accumulation position migration state. Based on the task transfer direction between the cancelled task accumulation position and the new accumulation position according to the migration status of the accumulation position, and connect the two positions based on the migration order of the previous and next positions to form the accumulation position migration continuation; Based on the accumulation position, the stolen connection of the task accumulation position is transferred to the queue position along the task transfer direction, and its end is transferred from the extinguished task accumulation position to the new accumulation position to form a migration stolen connection. Based on the migration and theft connection, read the task entry and execution status at the new accumulation position, obtain the migrateable tasks and candidate access positions, determine the CPU or GPU executing the task as the next migration position, and determine the theft connection from the new accumulation position to that position as the next theft direction, thus forming a migration and theft connection direction change state. Based on the change in the direction of the migration-stealed connection, the subsequent task access and execution status at the new accumulation position are read. The migration-stealed connection is then adjusted to the direction in which the task actually continues to migrate, so that the migration-stealed connection extends from the new accumulation position to the subsequent idle access position, forming the adjusted migration-stealed connection direction.
[0034] Furthermore, in heterogeneous computing nodes containing both CPU and GPU computing units, image preprocessing tasks, matrix computation tasks, and data encoding tasks are simultaneously accessed. During scheduling, the CPU task queue forms a task accumulation position due to the concentrated entry of image preprocessing tasks. Some tasks already in the CPU queue migrate to idle GPU computing units through task-stealing connections. Continuing to track the queue and execution states after the task transfer, it is found that the task occupancy at the original CPU accumulation position gradually decreases and is released, while new tasks continuously enter and extend their occupancy at adjacent queue positions on the GPU side. This determines that the task accumulation position has migrated from the CPU side to the GPU side. Further utilizing existing stolen connections to track the task transfer direction, the new accumulation position on the GPU side is used as the starting position for subsequent task migration, generating migration-stealing connections. When the execution state of subsequent tasks on the GPU side changes and causes the task to continue migrating to another idle computing unit, the direction of the subsequent migration-stealing connection is redefined based on the actual task access direction, causing subsequent tasks to transfer to the corresponding idle computing unit along the adjusted stolen connection. Through the above process, the traces of the task migration that has already occurred are preserved, and the stolen connection for subsequent task migration is generated according to the new task accumulation position. This enables the task scheduling to be updated as the task accumulation position and the current execution state change, and finally forms a dynamic task stolen scheduling result suitable for heterogeneous computing nodes.
[0035] In this embodiment, based on the fading state of the accumulation position, the task entry and occupancy changes in the task queue are continuously read, new task cluster access positions are tracked, and the positions where tasks continuously enter and form occupancy are determined as new accumulation positions, forming an accumulation position migration state, as detailed below: Obtain the fading position and release time in the fading state of the accumulation position. Use the release time as the starting point for tracking. Read the position of each task queue after the task transfer and the task entry time to form the subsequent task access sequence. Read the task entry and exit status of each queue position according to the subsequent task access sequence, and record the position occupancy change after the task enters according to the time sequence to form the occupancy change sequence of each queue position. Based on the sequence of occupancy changes, the subsequent positions occupied by tasks are tracked. When adjacent queue positions are successively accessed and occupied, the adjacent positions are connected in series according to the order of task entry to form the extended positions of task occupancy. Based on the task occupancy extension position, read the changes in task waiting, execution and release at each position, record the access position and occupancy changes of consecutive tasks in the same direction, and form a task accumulation extension state. Based on the task accumulation extension status, track the end position of the task occupation extension, read the subsequent task entry and occupation status at that position, and determine the new task concentration access position as the new accumulation position. Based on the new accumulation position, read the positional changes before and after the fading position, and connect the two positions according to the task's migration direction to form the accumulation position migration state.
[0036] In this embodiment, based on the stolen connection at the accumulated position of the task that has been canceled and read from the accumulated position, the queue position traversed by the stolen connection along the task transfer direction is tracked, and its end is transferred from the canceled task accumulated position to the new accumulated position, forming a migration stolen connection, as follows: Based on the accumulation position, the task accumulation position and new accumulation position are transferred to continue reading the canceled task accumulation position. The stolen connection at the connection termination position is found, its migration direction and end position are read, and the transfer start point of the stolen connection is determined. Based on the transfer start point of the stolen connection, read the position of the queue where the end is located, track the positions of adjacent queues according to the task transfer direction, record the queue positions passed through when the task is transferred from the fading position to the subsequent position, and form the stolen connection migration path; Based on the stolen connection migration path, read the task departure and access times at adjacent locations, match the task transfer direction with the position changes in the accumulation location migration continuation, and determine the migration position of the stolen connection end. Based on the migration location of the stolen connection end, continue to read the task access and occupation changes of the new accumulation location. When the migration path forms a connection with the new accumulation location, transfer the stolen connection end to the new accumulation location, forming a stolen connection end transfer state. Based on the transfer status of the stolen connection end, read the subsequent stolen connection and task transfer direction of the new accumulation position, and connect the subsequent connection that is consistent with the task transfer direction before the transfer to the end position after the transfer, forming a stolen connection extension state. Based on the stolen connection extension status, read the stolen connection after the transfer and its subsequent connection position, retain the task transfer direction extending from the new accumulation position to the idle access position, and connect the connections before and after the transfer to form a migration stolen connection.
[0037] Furthermore, based on the accumulated position, the process continues reading the task's accumulated position after cancellation and the new accumulated position. It then locates the stolen connection at the connection termination position, reads its migration direction and end position, and determines the transfer starting point of the stolen connection, as detailed below: Obtain the accumulation position, new accumulation position, and forward and backward migration directions of the fading task in the accumulation position migration continuation. Read the task queue where the fading position is located and its queue position as the location for stealing the connection. Based on the location of the stolen connection, read the stolen connections in the task theft trace network that pass through the location of the fading task accumulation, obtain the start position, end position and task transfer direction of each stolen connection to the location, and determine the stolen connection that continues to the location of the fading task accumulation. Read the end position of the stolen connection that is connected to the position of the fading task accumulation, track the subsequent queue position according to the task transfer direction of the stolen connection, and connect the end position and the subsequent passed position in sequence to form the extension path of the stolen connection. The position change of the end of the stolen connection is read according to the extension path of the stolen connection, the queue position continuation between the end of the stolen connection and the accumulation position of the fading task is recorded, and the accumulation position of the fading task is used as the starting position for the transfer of the stolen connection to the new accumulation position. Read the access location and occupancy changes of the new accumulation location after the task transfer, match them with the task transfer direction of the stolen connection, and determine the transfer starting point when the stolen connection migrates from the fading task accumulation location to the new accumulation location.
[0038] Example 2, Figure 2 The present invention provides a hybrid computing power scheduling system based on task theft, comprising a network module, a filtering module, and an adjustment module, wherein the modules are interconnected. The network module is used to acquire the task queues of CPU and GPU computing units, track the entry and completion status of tasks, determine the task accumulation location and idle access location, and establish a task theft trace network and theft direction based on the task migration results. The filtering module is used to track the task accumulation position to the idle access position along the theft direction according to the task theft trace network, obtain the passed task queue and the stolen connection, filter the adapted tasks on the stolen connection, and transfer the adapted tasks to the idle access position along the stolen connection to form the queue state and execution state after the task transfer. The adjustment module is used to track the migration of task accumulation positions based on the queue status and execution status after task transfer, determine the disappearance of task accumulation positions and new accumulation positions, associate the two positions along the task transfer direction, migrate the stolen connection to the new accumulation position, and adjust the migration direction of the stolen connection according to the execution status.
[0039] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0040] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the implementation. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0041] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0042] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0043] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hybrid computing power scheduling method based on task theft, characterized in that, include: The task queues of CPU and GPU computing units are obtained, the entry and completion status of tasks are tracked, the task accumulation location and idle access location are determined, and a task theft trace network and theft direction are established based on the task migration results. Based on the task theft trace network, the task accumulation position is tracked along the theft direction to the idle access position, the task queue and the stolen connection are obtained, and the adapted tasks on the stolen connection are filtered. The adapted tasks are transferred along the stolen connection to the idle access position, forming the queue state and execution state after the task transfer. Based on the queue status and execution status after task transfer, track the migration of task accumulation positions, determine the fading of task accumulation positions and new accumulation positions, associate the two positions along the task transfer direction, migrate the stolen connection to the new accumulation position, and adjust the migration direction of the stolen connection according to the execution status.
2. The hybrid computing power scheduling method based on task theft according to claim 1, characterized in that, The task queues of CPU and GPU computing units are acquired, the entry and completion status of tasks are tracked, the task accumulation location and idle access location are determined, and a task theft trace network and theft direction are established based on the task migration results, as detailed below: Obtain the CPU and GPU computing unit task queues maintained by the hybrid computing scheduler, record the entry time, queue position, execution start time and completion time of each task, and establish a task queue sequence to form a task arrangement state. The queue position changes when tasks enter and complete are tracked along the task queue sequence. The task accumulation position and idle access position are determined based on the successive changes in the task occupancy position and release position, forming a position time sequence change. Track the transfer of task occupancy positions along the temporal changes of accumulation positions and idle access positions, associate the occupancy positions and release positions at previous and subsequent times, and construct the task migration trajectory; Based on the task migration trajectory, adjacent computing units are connected according to the actual access sequence of the tasks, and the migration direction between CPU to GPU, GPU to CPU and similar computing units is preserved to form a task stealing connection. The connection between the migration endpoint and the subsequent migration start point is traced along the task theft connection, the interconnected theft connections are associated, and the connection positions are linked together according to the task migration direction to form a task theft trace network. Based on the task theft trace network, the connection position of each theft connection is traced, the path extension position and branch position are identified along the migration direction of the task theft extension chain and the task theft branch, and the access status of the end of each branch is associated to form the theft direction.
3. The hybrid computing power scheduling method based on task theft according to claim 2, characterized in that, The changes in queue position when tasks enter and complete are tracked along the task queue sequence. Based on the successive changes in the occupied and released positions of tasks, the task accumulation position and idle access position are determined, forming a positional temporal change, as detailed below: Obtain the task queues of CPU and GPU computing units, arrange the queue positions according to the order in which tasks enter, and record the task entry time, queue position, execution start time and completion time to form a task queue position sequence. Track the occupancy changes of each queue position according to the task entry time, execution start time, and completion time, and obtain the occupancy status and release time of each queue position; Based on the occupancy status and release time of each queue position, track the access position of subsequent tasks when the current task has not yet been completed, and associate the adjacent positions extending backward from the occupancy status to form task accumulation positions; Based on the task completion status, identify the release changes in the queue position, associate the task completion time with the queue position, and determine the queue position to be released after the task is completed; Track the access status of subsequent tasks based on the released queue position, read the task execution status of the computing unit to which the release position belongs, match the release position with the access status of the corresponding computing unit, and confirm the idle access position. By associating task accumulation positions and idle access positions with the order of task entry and completion, the occurrence time and position changes of the two types of positions in the task queues of different computing units are recorded to form a position time sequence change.
4. The hybrid computing power scheduling method based on task theft according to claim 2, characterized in that, Tracing the connection between the endpoint of a migration and the starting point of a subsequent migration along the task-stealing connections, associating the interconnected stealing connections, and linking the connection points in series according to the direction of task migration, a task-stealing trace network is formed, as follows: Obtain the start position, end position, and migration direction of each task's stolen connection, and arrange the stolen connections according to the order in which the task migrations occur, forming a sequential sequence of stolen connections. Extract the termination and start positions of adjacent task stealing connections along the consecutive sequences, read the queue positions corresponding to the two positions, track the changes in queue positions when a task migrates from the previous connection to the next connection, and establish the positional connection relationship of adjacent task stealing connections. Based on the positional connection relationship, compare the termination position of the previous task's stolen connection with the starting position of the next task's stolen connection, read the task access and migration times of the two stolen connections, match the termination position of the previous connection with the starting position of the next connection according to the order of task migration, and determine the continuation position along the task migration direction. Based on the location of the connection, the extension direction of the next stolen connection is tracked, the migration direction of the previous connection is associated with the access direction of the next connection, and the task stolen connections that are continuously connected in the direction are linked together to form a task stolen extension chain. The task theft extension chain is traced to its end connection position. When subsequent task theft connections pointing to different computing units have appeared at the same end connection position, the actual migration time and migration direction of each subsequent task theft connection are read, and the subsequent task theft connections in each direction are retained to form a task theft branch. Associate the starting position of each task theft branch with its corresponding task theft extension chain, and organize the associated theft connections along the migration direction of each branch to form a task theft trace network.
5. The hybrid computing power scheduling method based on task theft according to claim 1, characterized in that, Based on the task theft trace network, the task accumulation position is traced along the theft direction to the idle access position. The traversed task queue and the stolen connection are obtained, and the adaptable tasks on the stolen connection are selected. The adaptable tasks are transferred along the stolen connection to the idle access position, forming the queue state and execution state after the task transfer, as follows: Track from the task accumulation location to the idle access location along the theft direction, read the stolen connections that have passed, and match the start and end positions of the stolen connections with their respective computing power units to form a task queue sequence on the theft path; Track the task occupancy position along the task queue sequence in the direction of theft, record the task access and migration changes of adjacent computing units, form the task succession status, and filter candidate tasks and their locations. Track the migration direction and location changes of candidate tasks across computing units, read the task execution status and subsequent access location to form a migration continuity status; The migration direction of the occupied position is tracked along the migration succession status of the candidate task, and the computing power unit and task execution status are associated. Tasks that form a succession with the idle access position are selected to form an adaptation task. Based on the stolen connection tracking migration direction of the adaptation task, the stolen connection is tracked sequentially from the current queue position to the idle access position, the computing power unit and queue position passed through are associated, and the status changes of the task leaving and subsequent access are recorded to form a task transfer record. Based on the task transfer record, track the release of the queue where the adapted task is located and the access to the queue at the idle access position to obtain the queue status and execution status after the task transfer.
6. The hybrid computing power scheduling method based on task theft according to claim 5, characterized in that, The task occupancy position is traced along the task queue sequence in the direction of the theft, and the task access and migration changes of adjacent computing units are recorded to form a task succession status and filter candidate tasks and their locations, as follows: Obtain the task queue sequence along the theft path, arrange the positions of each queue according to the theft direction, read the occupied tasks and their respective computing units at each position, and form a task queue position association; Based on the task queue position association, track the position occupancy changes of adjacent queues, record the departure and entry positions of the same task in the front and back queues, and form the task continuation position by combining the migration direction of the stolen connection. Based on the task continuation position, continue to record the subsequent access position of the same task, associate it with the migration of its occupied position between different computing power units, and form a task continuation sequence across computing power units according to the migration order; Based on the positional changes in the successive sequence, the task execution status is associated with the transformation of computing power units, and the access position and execution changes when the task enters the subsequent computing power unit are recorded to form the task migration status. When multiple subsequent access points appear for the same task, the stolen connection and migration direction of the access point are read, the subsequent access point is compared with the current migration direction, the branch continuation position of the task is determined, and the task branch continuation state is formed. Continue tracing along the task branch continuation status to the idle access position, record the continuation changes between the last occupied position of the task and the idle access position, and determine the continuation termination position to form the task continuation range; Based on the task continuation range, the migration direction of the task is tracked, the corresponding execution status and termination position are read, and the tasks that have been stolen and connected to the idle access position are filtered to form candidate tasks and their locations.
7. A hybrid computing power scheduling method based on task theft according to claim 5, characterized in that, Based on the task transfer record, the system tracks the release of the queue where the adapted task was located and the access to the queue at the idle access position, obtaining the queue status and execution status after the task transfer, as detailed below: Obtain the adapting task, the queue position of the adapting task, and the idle access position after migration from the task transfer record. Read the time when the adapting task leaves its queue and the time when it enters the idle access position to form the task transfer sequence. Based on the task transfer sequence, track the position occupancy status of the queue where the adapting task was located before leaving, and record the change of the position from occupied to released after the task is moved out, forming the position release status before migration; Based on the location release status before migration, read the migration destination of the adaptation task, track the moment when the adaptation task enters the idle access location, record the change of the location from idle to task occupied and the subsequent task queuing changes, and form the location access status after migration. Based on the release status of the position before migration and the access status of the position after migration, read the changes in the occupancy of the adaptation task before and after leaving the position and accessing the position according to the task transfer sequence, record the changes in task entry, waiting and release at the two positions, and form the queue occupancy change status. Based on the queue occupancy change status, read the execution status of the adaptation task at the departure and arrival positions, record the waiting, execution and completion times of the task before and after migration, and read the corresponding computing unit to form the task execution change status. Based on the changes in queue occupancy and task execution, the queue status and execution status after the task transfer are read according to the transfer order of the adapted task from the departure position to the access position.
8. The hybrid computing power scheduling method based on task theft according to claim 1, characterized in that, Based on the queue state and execution state after task transfer, the migration of the task accumulation position is tracked. The fading of the task accumulation position and the new accumulation position are determined. The two positions are associated along the task transfer direction, and the stolen connection is migrated to the new accumulation position. The migration direction of the stolen connection is adjusted according to the execution state, as follows: Obtain the queue status and execution status after task transfer. Read the CPU and GPU task queue occupancy and execution status at the corresponding time according to the task transfer time to form the queue status at the corresponding time. Track the reduction of occupancy and release of positions at the task accumulation position after task migration to form the accumulation position decay status. Based on the receding status of the accumulation position, continue to read the changes in task entry and occupation in the task queue, track the new task access positions, and determine the positions where tasks continue to enter and occupy as new accumulation positions, thus forming an accumulation position migration state. Based on the task transfer direction between the cancelled task accumulation position and the new accumulation position according to the migration status of the accumulation position, and connect the two positions based on the migration order of the previous and next positions to form the accumulation position migration continuation; Based on the accumulation position, the stolen connection of the task accumulation position is transferred to the queue position along the task transfer direction, and its end is transferred from the extinguished task accumulation position to the new accumulation position to form a migration stolen connection. Based on the migration and theft connection, read the task entry and execution status at the new accumulation position, obtain the migrateable tasks and candidate access positions, determine the CPU or GPU executing the task as the next migration position, and determine the theft connection from the new accumulation position to that position as the next theft direction, thus forming a migration and theft connection direction change state. Based on the change in the direction of the migration-stealed connection, the subsequent task access and execution status at the new accumulation position are read, and the migration-stealed connection is adjusted to the actual migration direction of the task, thus forming the adjusted migration-stealed connection direction.
9. A hybrid computing power scheduling method based on task theft according to claim 8, characterized in that, Based on the accumulated position, the stolen connection of the task accumulated position is transferred to continue reading the canceled task accumulated position. The queue position traversed by the stolen connection along the task transfer direction is tracked, and its end is transferred from the canceled task accumulated position to the new accumulated position, forming a migration stolen connection, as follows: Based on the accumulation position, the task accumulation position and new accumulation position are transferred to continue reading the canceled task accumulation position. The stolen connection at the connection termination position is found, its migration direction and end position are read, and the transfer start point of the stolen connection is determined. Based on the transfer start point of the stolen connection, read the position of the queue where the end is located, track the positions of adjacent queues according to the task transfer direction, record the queue positions passed through when the task is transferred from the fading position to the subsequent position, and form the stolen connection migration path; Based on the stolen connection migration path, read the task departure and access times at adjacent locations, match the task transfer direction with the position changes in the accumulation location migration continuation, and determine the migration position of the stolen connection end. Based on the migration location of the stolen connection end, continue to read the task access and occupation changes of the new accumulation location. When the migration path forms a connection with the new accumulation location, transfer the stolen connection end to the new accumulation location, forming a stolen connection end transfer state. Based on the transfer status of the stolen connection end, read the subsequent stolen connection and task transfer direction of the new accumulation position, and connect the subsequent connection that is consistent with the task transfer direction before the transfer to the end position after the transfer, forming a stolen connection extension state. Based on the stolen connection extension status, read the stolen connection after the transfer and its subsequent connection position, retain the task transfer direction extending from the new accumulation position to the idle access position, and connect the connections before and after the transfer to form a migration stolen connection.
10. A system using a hybrid computing power scheduling method based on task stealing as described in any one of claims 1-9, characterized in that, It includes a network module, a filtering module, and an adjustment module, and the modules are interconnected. The network module is used to acquire the task queues of CPU and GPU computing units, track the entry and completion status of tasks, determine the task accumulation location and idle access location, and establish a task theft trace network and theft direction based on the task migration results. The filtering module is used to track the task accumulation position to the idle access position along the theft direction according to the task theft trace network, obtain the passed task queue and the stolen connection, filter the adapted tasks on the stolen connection, and transfer the adapted tasks to the idle access position along the stolen connection to form the queue state and execution state after the task transfer. The adjustment module is used to track the migration of task accumulation positions based on the queue status and execution status after task transfer, determine the disappearance of task accumulation positions and new accumulation positions, associate the two positions along the task transfer direction, migrate the stolen connection to the new accumulation position, and adjust the migration direction of the stolen connection according to the execution status.
