Efficient task allocation method based on interconnection function and task scheduling system
By using a task allocation method based on interconnection functions, the task execution order and resource allocation are dynamically adjusted, solving the problems of flexibility and efficiency in task allocation in existing technologies, and achieving efficient task scheduling and resource utilization.
Patent Information
- Application Number
- CN202510625007.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-05-15
AI Technical Summary
Existing task allocation techniques cannot dynamically adapt to changes, have high computational complexity and low efficiency, result in serious resource waste, and cannot effectively handle complex dependencies and priority differences, leading to low resource utilization.
An efficient task allocation method based on interconnection functions is adopted. Through task characteristic analysis, dependency modeling and interconnection function scheduling, combined with a task status feedback mechanism, the task execution order and resource allocation are dynamically adjusted, and task scheduling is performed using an interconnection scheduling network.
It achieves flexibility and efficiency in task scheduling, reduces resource waste and task execution delays, and improves the system's adaptability and resource utilization.
Smart Images

Figure CN120508367B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer, in particular to a high-efficiency task allocation method based on interconnection function and a task scheduling system. BACKGROUND
[0002] In the field of modern distributed computing, cloud computing and project management, task allocation is the key to ensure the efficient operation of the system.
[0003] The goal of task allocation is to allocate each task to available resources reasonably to improve resource utilization and ensure the smooth execution of tasks according to priority and dependency; however, many existing distributed computing and cloud computing platforms use static task scheduling algorithms for task allocation, which are usually based on pre-set rules or priority ordering to allocate tasks.
[0004] For example, the shortest path algorithm, greedy algorithm or priority queue algorithm is widely used in task allocation, which can provide basic task scheduling capabilities, but cannot cope with complex and dynamic task environments. Specifically as follows:
[0005] 1. High computational complexity: Traditional task allocation algorithms usually face high computational complexity in large-scale task allocation, especially in the case of large number of tasks and resources, the algorithm consumes a lot of computation and time, which cannot adapt to dynamic changes of tasks and resource configuration.
[0006] 2. Low efficiency: Existing methods mostly rely on fixed rules or priority ordering, which cannot flexibly cope with factors such as task load and resource changes. As a result, the resource utilization of the system is low, and problems such as uneven task allocation and resource waste often occur.
[0007] 3. Lack of flexibility: Traditional algorithms do not consider the complex dependency relationship between tasks and the dynamic changes of resource usage, so they cannot automatically adjust task allocation, often leading to unreasonable task allocation and affecting the overall efficiency of the system.
[0008] Another type of existing task allocation technology uses constraint optimization-based scheduling algorithm to transform the task allocation problem into a constraint optimization problem, using mathematical methods such as linear programming or integer programming, combined with factors such as task resource demand, priority and dependency, to schedule tasks. This type of algorithm can provide more accurate resource allocation scheme for the system, trying to improve the efficiency of task allocation by optimizing the objective function. However, there are also the following problems:
[0009] 1. Large computational overhead: Although this method can accurately solve the task allocation problem, it has a large computational overhead, especially when the scale of tasks and resources is large. The solution process of linear programming and integer programming may consume a large amount of time and computing resources, and cannot quickly respond to dynamic changes in the task environment.
[0010] 2. Dependence on preset models: This type of algorithm usually needs to rely on preset mathematical models. When the state of tasks and resources changes, it needs to be re-modeled and optimized, making it difficult to adapt to environmental changes in real time.
[0011] 3. Difficulty in handling complex dependencies: When there are complex dependencies and priorities between tasks, existing technologies have difficulty in optimizing multiple constraints simultaneously, which may lead to unreasonable resource allocation and affect system performance.
[0012] In summary, the existing task allocation technology has the following problems:
[0013] 1. Unable to dynamically adapt to changes: Most existing algorithms are static and rely on fixed rules or preset models, which cannot be adjusted in real time to respond to dynamic changes in task load, resource state, etc.
[0014] 2. High computational complexity and low efficiency: Many existing task scheduling algorithms have high computational complexity and low efficiency when dealing with large-scale tasks, and cannot quickly respond to changes in tasks under high load.
[0015] 3. Resource waste: Due to the differences in dependencies and priorities between tasks, existing technologies often cannot completely avoid resource conflicts or task waiting when allocating tasks, resulting in underutilization of resources, and even idle resources.
[0016] Therefore, how to solve the problems of computational complexity, efficiency, resource waste, etc. in the existing task allocation method through more intelligent and efficient algorithms has become a technical problem to be solved. SUMMARY
[0017] To meet the needs of task allocation in modern distributed computing, cloud computing and other complex systems, the present application proposes an efficient task allocation method based on interconnection functions and a task scheduling system, which can flexibly and efficiently allocate tasks under various task demands and resource conditions.
[0018] The efficient task allocation method based on interconnection functions has the following specific steps:
[0019] Step 1: For the tasks collected in the current time period, analyze the characteristics of each task respectively;
[0020] The task set is T = {t1, t2,..., t i ..., tn}, each task characteristic including execution duration, resource requirement, priority, and dependency relationship, etc. is:
[0021]
[0022] d i is the time required to execute task t i ; R i is the resource requirement of task t i ; P i is the priority of task t i ; D i is the dependency relationship of task t i ; n is the total number of tasks, and k represents the number of tasks to be scheduled or the batch number.
[0023] Step two, based on the dependency relationship of the tasks in the characteristics, a task dependency graph G(T, E) is constructed, and an initial task execution order queue is generated.
[0024] The task dependency graph G(T, E) takes the task T as the node, and the dependency relationship E between tasks as the directed edge.
[0025] There is a directed edge (t i , t j ) ∈ E between tasks t i and t j , indicating that task t j needs to be executed after task t i is completed. Each edge (t i , t j ) is assigned a weight w ij , which is used to represent the task execution duration, priority influence, etc.
[0026] The adjacency matrix A composed of the weights of all edges in the dependency graph is represented as follows:
[0027]
[0028] Traverse the graph nodes, in the first round, initially select a node a with an in-degree of 0, and delete all edges connected to the node a. Then in the second round, continue to select the next node with an in-degree of 0. When there are at least two nodes with an in-degree of 0, for each node, calculate the total weight of all predecessor edges connected to the node, select the node corresponding to the maximum total weight from among them as the node b of the current round, and continue to delete all edges connected to the node b. Enter the next round of selection until all nodes are selected, and generate an initial task execution order queue.
[0029] Step three, select the first task from the initial task execution order queue, pass through the built m-layer interconnection scheduling network, get the allocation terminal and receiving server corresponding to the task; at the same time, update the resource state and task state vector of the task and feedback to the interconnection scheduling network.
[0030] The interconnection scheduling network is composed of m columns of interconnection units, and each column is set as an interconnection function or a scheduling switch matrix according to actual needs; wherein each interconnection function is a global transformation of a matrix, and a switch mode can be used in the row to specifically realize operations such as task exchange (Swap), up-broadcast (Up-Broadcast), down-broadcast (Down-Broadcast), blocking (Block), shuffling (Shuffle) and the like.
[0031] The interconnection function F of the jth layer j The calculation formula is:
[0032]
[0033] The optional interconnection function set is, for example, Swap, Shuffle, Reverse, Secure and the like; The comprehensive scheduling loss function is, and s is the task state vector s = [s1, s2, …, sm]T. n ] T , the initial value is 0; R is the resource matrix of all tasks; j = 1, 2, …, m.
[0034] Each interconnection function F j The interconnection scheduling network is composed of a function composite sequence:
[0035]
[0036] N 0 ′ is the initial value of the characteristics of the current task; N m ′ is the final allocation terminal of the current task.
[0037] Step four, update each interconnection function of the interconnection scheduling network, and continue to select the second task from the initial task execution order queue, pass through the interconnection scheduling network, get the allocation terminal and receiving server corresponding to the task; at the same time, update the resource state and task state vector of the task and feedback to the interconnection scheduling network.
[0038] The formula for updating the interconnection function is:
[0039]
[0040] , wherein The feedback-driven scheduling function adaptive updating mechanism can adjust the strategy according to the task state. At this time, the state vector of the task has only s1 as the updating value, and the rest continues to be 0. Similarly, only the first value in the resource matrix R is the updating value, and the rest remains unchanged.
[0041] Step five, continue to update the interconnection function, and select the next task in order until all tasks are executed, obtain the allocation matrix of all tasks under the premise of minimizing the execution time or resource consumption, and map it to the corresponding receiving queue.
[0042] The allocation terminal of all tasks forms a matrix N m The i-th row of which is mapped to the receiving queue T i The formula is:
[0043]
[0044] The efficient task scheduling system based on the interconnection function specifically comprises a task sending end, an interconnection scheduling network, a task receiving end and a task state monitoring and feedback module.
[0045] The task sending end receives external task requests in the current time period, and extracts the characteristics of each task respectively to construct an initial characteristic matrix. Then the initial characteristic matrix is sent to the interconnection scheduling network through a scheduling bus or network connection, and is finally mapped to a task scheduling result matrix N m Through the layer-by-layer mapping of each column interconnection function or scheduling switch matrix, the task receiving end is sent to the task receiving end, and after analysis, according to the task-resource mapping relationship described in the matrix, each task is distributed to the corresponding computing node or resource queue for execution.
[0046] During task execution, the task state monitoring and feedback module collects task execution progress, resource utilization, delay indicators and fault information in real time, and feeds back the data to the interconnection scheduling network, dynamically adjusts the interconnection function or scheduling switch matrix in the interconnection scheduling network, realizes resource reallocation or task migration, and improves the adaptive ability of the system under the condition of task load fluctuation or resource congestion.
[0047] The advantages of the present application are:
[0048] 1. The efficient task allocation method and task scheduling system based on the interconnection function of the present application can clearly understand the changes of the scheduling process to the task position and routing at each stage by listing each column input and output matrix through the interconnection scheduling network.
[0049] 2、The efficient task allocation method based on interconnection function and the task scheduling system can effectively cope with system load fluctuations and task demand changes, and reduce resource waste and task execution delay. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 is a flowchart of the efficient task allocation method based on interconnection function of the present application;
[0051] Figure 2 is a schematic diagram of the efficient task scheduling system based on interconnection function of the present application. DETAILED DESCRIPTION
[0052] The specific implementation method of the present application will be further described in detail below with reference to the accompanying drawings.
[0053] With the continuous increase of computer systems and task quantity, traditional task scheduling methods face many challenges, especially in high concurrency environment, how to reasonably allocate system resources, reduce task execution delay and improve resource utilization has become a problem to be solved. Traditional task scheduling methods are usually based on static rules, which makes them difficult to adapt to dynamic changes in load and task demand.
[0054] The present application provides a dynamic task scheduling method by introducing the design idea of interconnection function, which can flexibly adjust the execution order and resource allocation of tasks according to the characteristics, resource demand and dependency of tasks, so as to realize the optimization of task scheduling, improve the overall performance of the system, reduce resource waste and execution delay. Specifically, an efficient task allocation method based on interconnection function and a task scheduling system are provided, which can optimize task allocation through the following steps: task characteristic analysis, task dependency modeling, interconnection function scheduling, task execution and feedback adjustment. By combining various interconnection functions (such as identity function, exchange function, uniform shuffle function, etc.), tasks can be allocated flexibly and efficiently under various task demands and resource conditions.
[0055] The efficient task allocation method based on interconnection function, as shown in Figure 1 , the specific steps are as follows:
[0056] Step 1, for the tasks collected in the current time period, analyze the characteristics of each task respectively;
[0057] The task set is T = {t1, t2,..., t i ,...,t n}, each task characteristic includes execution time, resource demand, priority and dependency relationship, etc.; the characteristic matrix composed of all tasks is
[0058]
[0059] d i for task t i time required for execution; R i for task t i demand for computing resources (such as CPU, memory, storage, etc.); P i for task t i priority of task t i precedence relationship of task t i n is the total number of tasks, and k represents the number of tasks to be scheduled or the batch number.
[0060] Step two, based on the precedence relationship of the tasks in the characteristics, a task dependency graph is constructed, and an initial task execution order queue is generated;
[0061] The task dependency graph G (T, E) takes the task T as the node, and the dependency relationship between tasks E as the directed edge.
[0062] Task t i and t j There is a directed edge (t i , t j ) ∈ E between t j , which means that task t i needs to be executed after task t i is completed. Each edge (t j , t ij ) is assigned a weight w ij , which is used to represent the task execution duration, priority influence, etc.
[0063] The adjacency matrix A of the dependency graph is represented as follows:
[0064]
[0065] Traverse the graph nodes, in the first round, initially select the node a with an in-degree of 0, and delete all edges connected to the node a; then in the second round, continue to select the next node with an in-degree of 0, when there are at least two nodes with an in-degree of 0, for each node, calculate the total weight of all predecessor edges connected to the node, select the node corresponding to the maximum total weight from among them as the node b of the current round, and continue to delete all edges connected to the node b, enter the next round of selection, until all nodes are selected, and an initial task execution order queue is generated.
[0066] In order to meet the task dependency constraint graph G (T, E), the system introduces the edge weight w ijAs an important indicator of task dependency, when traversing the graph nodes, not only the schedulable tasks with in-degree zero are judged, but also the total weight of the predecessor edges is comprehensively evaluated for priority assessment, and the key tasks with high dependency weight and great influence on subsequent tasks are preferentially scheduled.
[0067] Step three, select the first task from the initial task execution order queue, and pass through the built m-layer interconnection scheduling network to obtain the allocation terminal and receiving server corresponding to the task; at the same time, update the resource state and task state vector of the task and feedback to the interconnection scheduling network.
[0068] First, according to the task characteristics, resource requirements and dependency relationship, select the appropriate scheduling strategy, including: using the exchange function to adjust the task priority, or using the butterfly function to schedule in layers, etc.
[0069] The interconnection scheduling network is composed of m columns of interconnection units, and each column is set as an interconnection function or a scheduling switch matrix according to actual needs; after the task order is adjusted by m layers of interconnection functions or the task flow direction is controlled by the switch matrix, the task queue is rearranged, the priority is adjusted, the path is mapped, or the resource is isolated, etc. Finally, under the premise of minimizing the execution time or resource consumption, the resource allocation of each task is adjusted in real time through monitoring feedback to ensure that the system resources are optimally utilized.
[0070] Given a task set T = {t1, t2, …, t n} and its dependency graph G(T, E), where each task has priority p(t), resource requirement r(t), etc. attributes, forming an initial characteristic matrix N 0 Input into the interconnection scheduling network, and pass through each layer of scheduling N j = F j (N j-1 ) for optimization, and finally output the optimized task allocation matrix N m and the receiving queue, to ensure that the tasks are reasonably scheduled according to the priority, load balancing, safety isolation, etc. strategy, and high efficiency is achieved.
[0071] Each interconnection function is a global transformation of the matrix, and can use a switch mode within a row to realize row-to-row routing or switching through operations such as task swapping (Swap), up-broadcasting (Up-Broadcast), down-broadcasting (Down-Broadcast), blocking (Block), and shuffling (Shuffle).
[0072] The selection of interconnection functions is not fixed, but is determined by a dynamic policy scheduling module driven by system state. This module combines the task state vector s = [s1, s2, …, s n ] T (e.g. average waiting time or failure rate of each task) and resource matrix In each scheduling stage, the interconnection function most suitable for the current network load and the target optimization direction is selected, and the interconnection function F j The calculation formula is:
[0073]
[0074] The optional interconnection function set is, for example, Swap, Shuffle, Reverse, Secure, etc. The comprehensive scheduling loss function is s, and the state vector of each task s = [s1, s2, …, sm] is n ] T The initial value is 0; R is the resource matrix of all tasks; j = 1, 2, …, m.
[0075] Each interconnection function F j The interconnection scheduling network is composed of a function composite sequence as a whole:
[0076]
[0077] N 0 ′ is the initial value of the characteristics of the current task; N m ′ is the final allocation terminal of the current task.
[0078] Step four, update each interconnection function of the interconnection scheduling network, and continue to select the second task from the initial task execution order queue, pass through the interconnection scheduling network, obtain the allocation terminal and the receiving server corresponding to the task, and update the resource state and the task state vector of the task and feedback to the interconnection scheduling network.
[0079] In the task scheduling and execution process, a state feedback module is introduced to monitor the task running state in real time, and feedback information is returned to the intermediate scheduling network to realize dynamic adjustment of the scheduling strategy. Let the state vector after task execution be:
[0080]
[0081] Wherein, s i represents the key state index (such as the weighted function of average delay, resource occupancy rate, failure rate, etc.) of the i-th task queue in the execution process.
[0082] The feedback mechanism triggers the dynamic update of part of the interconnection functions in the interconnection scheduling network according to the changes of the state quantity s and the resource matrix R, and satisfies the following feedback scheduling relationship:
[0083]
[0084] Wherein, The feedback-driven scheduling function adaptive updating mechanism can adjust the strategy according to the task state; for example, enabling broadcast, shuffling or fault isolation operation, thereby continuously optimizing the overall task scheduling effect. At this time, the state vector of the task has only s1 as the update value, and the rest continues to be 0; similarly, only the first value in the resource matrix R is the update value, and the rest remains unchanged.
[0085] Step five, continue to update the interconnection function, and select the next task in order until all tasks are executed, obtain the allocation matrix of all tasks under the premise of minimizing the execution time or resource consumption, and map it to the corresponding receiving queue.
[0086] The allocation terminal of all tasks forms a matrix N m , and the i-th row of the matrix is mapped to the receiving queue T i . The formula is:
[0087]
[0088] Finally, all the tasks after scheduling optimization are distributed to the corresponding receiving nodes or computing resource pool.
[0089] The efficient task scheduling system based on the interconnection function specifically comprises a task sending end, an interconnection scheduling network, a task receiving end, and a task state monitoring and feedback module.
[0090] As shown in Figure 2 , the task sending end receives the external task request of the current time period, and extracts the characteristics of each task respectively to construct an initial characteristic matrix containing information such as task execution time, resource demand, priority, and before-after dependency relationship; then the initial characteristic matrix is sent to the interconnection scheduling network through the scheduling bus or network connection, and the task scheduling result matrix N m is finally generated through the layer-by-layer mapping of each column interconnection function or scheduling switch matrix, and is sent to the task receiving end. After analysis, according to the task-resource mapping relationship described in the matrix, each task is distributed to the corresponding computing node or resource queue for execution.
[0091] During task execution, the task state monitoring and feedback module collects task execution progress, resource utilization, delay indicators, fault information, etc. in real time, and feeds back the data to the interconnection scheduling network, dynamically adjusts the interconnection function or scheduling switch matrix in the interconnection scheduling network, realizes resource reallocation or task migration, and thereby improves the adaptive ability of the system under the condition of task load fluctuation or resource congestion. The whole system takes the interconnection function as the core scheduling logic, combines real-time sensing of task state and dynamic optimization strategy, and ensures that the task scheduling process has high efficiency, flexibility and robustness.
[0092] The interconnection scheduling network in the present application is a function sequence: (F1, F2, …, F m ), each (F j ) corresponds to the (j)th column in the network, and can be one of two types:
[0093] 1. Interconnection function: such as Swap, Shuffle, Reverse, Secure, etc., which sorts, shuffles, reverses the order, or securely routes the entire column of tasks, etc.
[0094] 2. Switch: such as “direct, exchange, upcast, downcast”, etc., which uses matrix multiplication to control the mapping or broadcasting of input ports to output ports.
[0095] In this way, a multi-column intermediate network is formed, each column performing an interconnection function to complete a scheduling operation.
[0096] For the switch (Switch), assume that there are 2 ports in the same row: the upper port input is (x1), and the lower port input is (x2); denoted as vector [x1, x2];
[0097] The switch can be abstracted as a (2x2) matrix
[0098]
[0099] The output vector is:
[0100] Adjusting the values of ((a, b, c, d)) in the matrix can obtain the effects of direct, exchange, upcast, or downcast.
[0101] Direct (Direct): The data of the input port is directly output to the specified output port without additional forwarding or copying.
[0102] · Matrix:
[0103] · Calculation:
[0104] · Use: By default, there is no scheduling or simple pass-through, with small overhead and fast speed.
[0105] Exchange (Exchange): Rearrange or exchange between rows or columns in the same layer, and “swap” the input and output ports.
[0106] · Matrix:
[0107] · Calculation:
[0108] • Use: commonly used to realize transverse exchange, combined with priority processing in interconnection functions, high-priority tasks can be moved to more idle or more front channels.
[0109] Up-Broadcast: broadcast or send the tasks received by the current node to "one layer up" to several specific nodes.
[0110] • Matrix:
[0111] • Calculation:
[0112] • Use: when it is necessary to broadcast high-priority tasks to multiple paths in the upper layer (to ensure that more receivers or critical nodes are reached as soon as possible), the up-broadcast mode can be started.
[0113] Down-Broadcast: multicast or broadcast the tasks received by the current node to "one layer down".
[0114] • Matrix:
[0115] • Calculation:
[0116] • Use: in a multi-level network, if a receiving queue is seriously delayed or blocked, non-critical tasks can be sorted to the backup layer or broadcast to other idle nodes through "down-broadcast", so as to reduce the pressure of the blocked end. In addition, for specific high-priority tasks, they can also be down-broadcast to multiple alternative nodes to avoid single node failure or overload.
[0117] Lock (block)
[0118] If you need to block a port, you only need to set the corresponding output item to 0. For example:
[0119] • Only output to the upper port, block the lower port:
[0120] • Only output to the lower port, block the upper port:
[0121] For the interconnection function, the comprehensive scheduling loss function The optimization indicators considered can include:
[0122] - system delay;
[0123] - balance of resource use;
[0124] - punishment for high-priority tasks not being scheduled in time;
[0125] - scheduling risk of safety-sensitive tasks.
[0126] Example Conditional Trigger Mechanism:
[0127] - If Var(R) is high (resource usage fluctuation is large), prefer uniform shuffling function f shuffle ;
[0128] - If max(s i ) exceeds delay threshold θ, trigger priority scheduling function f swap ;
[0129] - If security levels of tasks in the system are densely distributed, enable security isolation function f secure for scheduling separation
[0130] This dynamic scheduling mechanism ensures that the scheduling scheme of interconnection functions can be adaptively adjusted according to the real-time running state of the task system, thereby improving the robustness, response efficiency, and scheduling optimization ability of the overall system.
[0131] Below are the formal definitions and explanations of common interconnection functions:
[0132] Identity Function (Identity)
[0133] · Notation: f id
[0134] · Meaning: No order or position change is made to the input matrix, which is directly transmitted to the output.
[0135] · Formalization: If M = [m i,k ] is the previous column of output, then
[0136] f id (M)[i,k] = m i,k ,
[0137] where i ∈ {1, …, n} represents the row index, and k represents the column index (the position of the task within the row).
[0138] Application Condition: Suitable for stages where system resources are stable and the order of current tasks does not need to be adjusted; can be used as the default scheduling operation under "low load" or "no bottleneck" conditions.
[0139] Swap Function (Swap)
[0140] · Notation: f swap
[0141] · Meaning: Swaps or sorts tasks, commonly used in priority burst scenarios to move high-priority tasks to a more forward or more idle row / position.
[0142] · Formalization:
[0143] - with priority function p(t), if some tasks t x , t y satisfy p(t x ) > p(t y ), then one or more swap operations can be performed:
[0144]
[0145] - When swapping rows, tasks within row i and row j can also be swapped. For example:
[0146] f swap (M)[i,k] = M[j,k], f swap (M)[j,k] = M[i,k].
[0147] - The specific swap strategy can be operated according to the "upcast" or "downcast" mode, so that high-priority tasks move to the upper or lower row.
[0148] Application condition: When there is a sudden change in task priority or a delay-sensitive task in the system, it is enabled. It is suitable for low-delay and high-real-time scenarios.
[0149] Uniform Shuffle Function
[0150] · Notation: f shuffle
[0151] · Meaning: Merge all tasks in each row into a set, randomly scatter them, and then evenly distribute them back to each row. It is often used for load balancing.
[0152] · Formalization:
[0153] 1. Let the last column matrix be M = [m ,k ] n×c (c is the number of columns).
[0154] 2. Merge all tasks into set U
[0155] 3. Randomly arrange U to σ(U) = (u1, u2, …, u |U| ).
[0156] 4. Divide σ(U) into n rows (or approximately divide) to form the output matrix M'[i, *].
[0157] Application condition: Triggered when some rows or nodes are high-load for a long time, resources are uneven, and local congestion and resource tilt problems are solved.
[0158] Reverse Function
[0159] · Notation: f reverse
[0160] • Meaning: The order of rows or tasks within a row can be reversed, often used for resource shortage or path optimization, allowing subsequent rows or columns to process tasks that would have been processed first.
[0161] • Formalization (example: reverse row order):
[0162] f reverse (M)[i,k] = M[n-i+1,k].
[0163] Or reverse column order:
[0164] f reverse (M)[i,k] = M[i,c-k+1].
[0165] Application condition: Suitable for scenarios that require late arrival first or resource-intensive reverse relief, such as short task priority strategy, preemption mechanism, etc.
[0166] Butterfly function
[0167] • Notation: f butterfly
[0168] • Meaning: Common in multi-level networks, used for congestion control or fault bypass. Determine the task flow direction through bitwise exchange.
[0169] • Formalization:
[0170] - Represent row index i in binary as b1b2…bi logn ;
[0171] - Exchange some bits at column j, such as b j and b j+1 ;
[0172] - Get new index i', let
[0173] f butterfly (M)[i',k] = M[i,k].
[0174] Application condition: When path conflict, network congestion, link failure occurs in multi-level network, perform fault tolerance rerouting or path avoidance.
[0175] Secure routing function
[0176] • Notation: f secure
[0177] • Meaning: Move tasks with high security level to designated secure rows or secure nodes for isolated processing, while other tasks remain on the original path.
[0178] • Formalization:
[0179] - Let sec(t) be the security level of task t;
[0180] - If sec(t) ≥ θ, redirect t to safe row i s ; otherwise, unchanged.
[0181] f secure (M)[i s ,k′]=t,f secure (M)[i,k]=Null or replaced,
[0182] where k′ can be determined by specific rules (e.g., put at the end of the queue).
[0183] Application conditions: triggered when the task security level exceeds the threshold; suitable for security isolation, privileged operations, and sensitive data transmission scenarios.
[0184] The invention is based on an efficient task allocation method for interconnection functions, which is divided into the following four steps:
[0185] 1. Task characteristic analysis: analyze the execution time, resource demand, priority, and other characteristics of each task to ensure reasonable basis for subsequent scheduling.
[0186] 2. Task dependency modeling: based on the dependency relationship between tasks, construct a task dependency graph to support task scheduling and execution order.
[0187] 3. Interconnection function scheduling: select appropriate scheduling strategies (such as using exchange functions to adjust task priority, or using butterfly functions for hierarchical scheduling) based on task characteristics, resource requirements, and dependency relationships.
[0188] 4. Task execution and feedback adjustment: after task execution, real-time adjustment of task resource allocation is performed through monitoring feedback to ensure optimal utilization of system resources.
[0189] During task execution, the system monitors task status and resource usage in real time, and adjusts task scheduling through a feedback mechanism:
[0190] • Dynamic resource adjustment: adjust computing resource allocation according to task execution status.
[0191] • Task execution monitoring: detect task execution bottlenecks and optimize scheduling strategies as needed.
[0192] • Exception handling: rollback or reallocate tasks when they fail.
[0193] Finally, the optimization goal of task scheduling is:
[0194]
[0195] Through the optimization scheme, the efficiency and stability of task execution are ensured, the utilization rate of computing resources is improved, and the scheduling demand of burst tasks is adapted.
[0196] The efficient task allocation system based on interconnection functions comprises:
[0197] 1. The sending end (initial task matrix)
[0198] denoted as M 0 , has n rows (representing n parallel task queues). The number of columns can represent multiple tasks or batches to be processed in the queue.
[0199] 2. Intermediate network (multi-column)
[0200] There are m stages (columns) in total: the jth column uses the interconnection function F j ;
[0201] The input of the jth column is the output matrix M j-1 of the previous column, and the output is the matrix M j ;
[0202] Each "row switch" in the column performs the logic of F j (such as specific operations such as broadcasting, switching, blocking, etc.).
[0203] 3. Receiving end (final task matrix)
[0204] denoted as M m ;
[0205] n rows of M m are allocated to n receiving queues {R1,…,R n} as the final output.
[0206] Embodiment:
[0207] For the sake of example, assume that the initial task matrix n=4, and each row has 4 parallel tasks / batches, denoted as:
[0208]
[0209] Rows 1-4 correspond to 4 parallel queues / ports respectively, and columns 1-4 represent task positions or timing batches in the row.
[0210] The following demonstrates how the network performs interconnection functions "column by column" and obtains intermediate outputs M 1 ,M 2 ,…,M m in different scenarios. Each example is accompanied by a schematic table or diagram to visually display the input / output matrix of each column of the intermediate network.
[0211] Scenario of priority burst:
[0212] • Goal: "Move up" or "front" high priority tasks in the middle network.
[0213] • Approach: In column 1, use f swap (Swap) + row switch "upcast", subsequent columns can use identity function or small-scale swap.
[0214] Middle network representation:
[0215] 1. Column 0: M 0 (initial).
[0216] 2. Column 1: F1 = f swap Perform priority burst handling; output M 1 .
[0217] 3. Column 2: F2 = f id (identity), output M 2 .
[0218] 4.... up to column m.
[0219] Matrix instance:
[0220] 1. Initial M 0 :
[0221]
[0222] 2. Column 1 (F1): Swap
[0223] - Detect priority extremely high; swap with row 1 and place it at the front. - Get M 1 :
[0224]
[0225] 3. Column 2 (F2): Identity
[0226] - No longer change order: M 2 = M 1 .
[0227] 4. If there are more columns, M 3 ,..., M m can be represented in turn.
[0228] Final: High priority tasks enter the front row of column 1, which can be processed preferentially in subsequent processes. Scenario of load balancing:
[0229]
[0230] • Goal: If a row is heavily loaded, tasks should be spread to other rows.
[0231] • Approach: Use f shuffle in corresponding column, output new M j .
[0232] Intermediate network representation:
[0233] • Column 1: Normal pass-through (f id ).
[0234] • Column 2: Uniform shuffle using f shuffle .
[0235] • Columns 3, 4, \dots: Other functions or identity can be chosen as needed.
[0236] Matrix example:
[0237] 1. Initial M 0 Row 3 is overloaded:
[0238]
[0239] 2. Column 1: F1 = f id , output M 1 = M 0 .
[0240] 3. Column 2: F2 = f shuffle
[0241] - Merge all tasks and randomly spread them out and evenly distribute them;
[0242] - Get M 2 (examples):
[0243]
[0244] Subsequent columns can remain identity or do other scheduling; at this time, the pressure on row 3 is significantly alleviated.
[0245] Scenario of resource shortage / high latency congestion:
[0246] • Goal: Row 2 is short of resources, needs to prevent new tasks from entering and divert existing tasks to other rows.
[0247] • Approach: Use swap or reverse in corresponding column, combined with "lockout / downcast" operation; output new M j . Intermediate network representation:
[0248] • Column 1: Can be transmitted normally first;
[0249] • Column 2: Detect that row 2 is in short supply, enable "lockout + downcast";
[0250] • Column 3: Continue other strategies, etc.
[0251] Matrix example:
[0252] 1. Initial M 0 Row 2 resource exhausted:
[0253]
[0254] 2. Column 1:
[0255] 3. Column 2: F2 enables "Row 2 lock + offload", offloads tasks of Row 2 to Rows 3, 4; outputs M 2 :
[0256]
[0257] Subsequent columns can maintain this offloading state or further fine-tune.
[0258] Scenario of security policy:
[0259] • Goal: Move high-security tasks to secure rows;
[0260] • Method: Use f secure in a certain column, uniformly detect sec(t) and redirect to secure rows.
[0261] Intermediate network representation:
[0262] • Column 1: Normal transmission;
[0263] • Column 2: f secure , outputs M 2 ;
[0264] • Column 3, 4…: Subsequent operations are subject to conditions.
[0265] Matrix example:
[0266] 1. Initial M 0 : t 1,2 , t 2,3 both have high security level
[0267]
[0268] 2. Column 1:
[0269] 3. Column 2: F2 = f secure
[0270] - If sec(t) ≥ θ, move to Row 1.
[0271] - Get M 2 :
[0272]
[0273] The interconnection functions described in the present application: Swap, Shuffle, Reverse, Butterfly, Secure, etc. solve various scheduling requirements (priority burst, load balancing, fault switching, security policy…); can provide flexible and scalable scheduling solutions in large-scale parallel scenarios, and the combination of each column function is sufficient to cover a variety of burst and complex application requirements.
[0274] The intermediate network described in the present application can clearly understand the changes made by the scheduling process to the task location and routing at each stage by listing each column input and output matrix.
[0275] The feedback adjustment mechanism during task execution described in the present application can effectively cope with system load fluctuations and task demand changes, reducing resource waste and task execution delay.
[0276] In addition to the dynamic task scheduling scheme based on interconnection functions, the present application can also use traditional static task scheduling methods, such as priority queue-based scheduling systems, or schedule tasks through fixed rules. Static scheduling methods usually work effectively when task load and resource demand change little, but they lack flexibility and adaptability and cannot handle complex and dynamically changing task requirements. The scheduling scheme based on interconnection functions can respond in real time to changes in task characteristics, priority, dependency relationships, and resource usage, thus providing more efficient and flexible scheduling. Although static methods can also complete some basic task scheduling requirements, compared to the interconnection function-based scheme, they cannot achieve the effect of dynamic adjustment and optimal resource allocation, so the dynamic scheduling scheme based on interconnection functions is more suitable for high-load, multi-task dependency, and complex resource scheduling environments.
[0277] The technical key points of the present application lie in the interconnection function design idea, especially the innovative application in task characteristic analysis, task dependency modeling, interconnection function scheduling, and real-time feedback adjustment during task execution, which can flexibly adjust the execution order of tasks according to their priority, resource demand, and dependency relationship, achieve optimal allocation of resources, and maximize system performance. The core technology points to be protected include:
[0278] 1. Application of interconnection functions in task scheduling, how to combine different types of interconnection functions (such as identity function, exchange function, uniform shuffle function, butterfly function) to flexibly schedule according to task characteristics.
[0279] 2. Task dependency modeling and scheduling mechanism: How to construct dynamic scheduling strategies based on the dependencies between tasks and achieve optimal task allocation through interconnection functions.
[0280] 3. Feedback adjustment mechanism during task execution: How to monitor resource usage in real time during task execution and dynamically adjust task scheduling strategies to ensure efficient task execution.
Claims
1. An efficient task allocation method based on interconnection function, characterized in that, The specific steps are as follows: Step one, for the tasks collected in the current time period, the characteristics of each task are analyzed respectively; Each task characteristic includes execution duration, resource demand, priority and dependency relationship; Step two, based on the task's front and back dependency relationship in the characteristics, build the task dependency graph And generate the initial task execution order queue; Task dependency graph with tasks as nodes, dependencies between tasks as directed edges; Traverse the graph nodes, in the first round, select the node a with an in-degree of 0, delete all edges connected to the node a; then in the second round, continue to select the next node with an in-degree of 0, when there are at least two nodes with an in-degree of 0, for each node, calculate the total weight sum of all predecessor edges connected to the node, select the node corresponding to the maximum total sum as the node b of the current round, continue to delete all edges connected to the node b, and enter the selection of the next round until all nodes are selected, and an initial task execution order queue is generated; Step three, select the first task from the initial task execution sequence queue, pass through the built layer interconnection scheduling network, get the allocation terminal and receiving server corresponding to the task; at the same time, update the resource state and task state vector of the task and feedback to the interconnection scheduling network. The interconnection scheduling network is composed of Each column is set as an interconnection function according to actual needs; the first column is set as an interconnection function of a first layer, the second column is set as an interconnection function of a second layer, and the third column is set as an interconnection function of a third layer. The interconnection function of the layer The calculation formula is: ; a set of optional interconnection functions; a comprehensive scheduling loss function, a state vector for each task, initialized to 0; a resource matrix for all tasks; ; The interconnection functions The interconnection scheduling network is configured as a whole into a function composite sequence: ; initial value for the characteristic of the current task; final allocation terminal for the current task; Step four, update the interconnection functions of the interconnection scheduling network, and continue to select the second task from the initial task execution order queue, pass through the interconnection scheduling network to obtain the allocation terminal and receiving server corresponding to the task; at the same time, update the resource state and task state vector of the task and feed back to the interconnection scheduling network; The formula for updating the interconnection function is: ; wherein, represents the feedback-driven scheduling function adaptive update mechanism, which can adjust the strategy according to the task state; at this time, the state vector of the task is only is the update value, and the rest continues to be 0; similarly, the resource matrix only the first value is the update value, and the rest remains unchanged; Step five, continue to update the interconnection function, and select the next task in order until all tasks are executed, obtain the allocation matrix of all tasks under the premise of minimizing execution duration or resource consumption, and map it to the corresponding receiving queue; The allocation terminal of all tasks forms a matrix , the first row, i.e. the first task is mapped to the receiving queue The formula is: 。 2. The interconnection function based efficient task allocation method of claim 1, wherein, In the step one, the task set is , the characteristic matrix is: ; to perform tasks time required; for tasks demand for computing resources; for tasks priority; for tasks precedence and dependency; total number of tasks, represent the number of tasks to be scheduled or the number of batches.
3. The interconnection function based efficient task allocation method as claimed in claim 1, wherein, The step two, task and between the directed edge There is a dependency relationship, indicating that the task Need to be executed after the completion of the task Each edge corresponds to a weight, indicating the task execution time and priority influence; an adjacency matrix of all the weights of the edges in the dependency graph is represented as follows: ; for edge assigned weight.
4. The interconnection function based efficient task allocation method of claim 1, wherein, In step three, each interconnection function is a global transformation of the matrix, and a switch mode can be used within the row to realize task exchange, upcast, downcast, blocking or shuffling operation.
5. An efficient task scheduling system using the efficient task allocation method based on interconnection function according to claim 1, characterized in that, Specifically, it comprises: Task sending end, interconnection scheduling network, task receiving end and task state monitoring and feedback module; The task sending end receives external task requests of the current time period, and respectively extracts characteristics of each task to construct an initial characteristic matrix; then the initial characteristic matrix is sent to the interconnected scheduling network through a scheduling bus or a network connection, and finally a task scheduling result matrix is generated through layer-by-layer mapping of each column of interconnected functions , and is sent to the task receiving end, and after analysis, each task is distributed to the corresponding computing node or resource queue for execution according to the task-resource mapping relationship described in the matrix.
6. The high efficiency task scheduling system of claim 5, wherein, During task execution, the task state monitoring and feedback module collects task execution progress, resource utilization, delay index and fault information in real time, and feeds back the data to the interconnection scheduling network, dynamically adjusts the interconnection functions in the interconnection scheduling network, realizes resource reallocation or task migration, and thus improves the adaptive ability of the system under the condition of task load fluctuation or resource congestion.
Citation Information
Patent Citations
Cloud computing task scheduling priority determination method based on genetic algorithm
CN118963953A
Intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling
CN119512707A