A method for online task scheduling of a heterogeneous device cooperative network
Patent Information
- Application Number
- CN202310884848.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-07-19
AI Technical Summary
[0004]现有的工作无法满足群智计算的非确定性、可演化性和可保障性,特别是在对群智计算网络进行资源调度和任务分配时,往往其优化目标忽略了群智计算网络本身的异构资源利用情况以及系统容量损失
[0074](1)本发明针对异构设备协作处理任务的网络架构提出优化策略,符合现实中异构设备和集群任务的真实场景。
Smart Images

Figure CN116991555B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of task planning technology, specifically relating to an online task scheduling method for swarm intelligence computing. Background Technology
[0002] Swarm computing is a new collaborative computing paradigm that integrates and interconnects humans, machines, and things. Human groups, cyberspace, and all physical entities are achieving widespread and deep interconnection, ushering in an era of intelligent interconnection of everything through the integration of humans, machines, and things. Swarm computing leverages the complementarity of resources, the differences in capabilities, and the cooperation and competition among heterogeneous intelligent agents (humans, machines, and things) to support computationally intensive and latency-sensitive application tasks, such as augmented reality, image processing, and short video caching—emerging AI applications in recent years under 5G / 6G networks—as well as common cluster tasks.
[0003] Resource allocation and task scheduling optimization strategies are crucial for improving resource utilization and reducing task service latency in swarm computing networks. In swarm computing networks, due to differences in system architecture, diverse computing capabilities, and limited resources among heterogeneous devices, the networks have evolved from simple cloud-edge-device structures in mobile edge computing to complex collaborative networks composed of multiple heterogeneous devices characterized by strong randomness, limited resource availability, and unstable node connectivity. Therefore, this study investigates the implicit correlations and mathematical mapping models for efficient collaboration among heterogeneous devices, explores theories of efficient cooperation, and proposes efficient resource allocation and task scheduling optimization strategies for heterogeneous device collaborative networks.
[0004] Existing work fails to meet the requirements of nondeterminism, evolvability, and guarantee in swarm intelligence computing, particularly in resource scheduling and task allocation within swarm intelligence networks. Its optimization objectives often neglect the heterogeneous resource utilization and system capacity loss inherent in the network itself. Furthermore, with the increasing number of cluster tasks and large-scale AI applications, the demand for collaborative processing across different heterogeneous devices is growing. Therefore, efficient scheduling strategies and algorithms for heterogeneous device collaborative networks are needed to meet the demands of real-world application scenarios. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention provides an online task scheduling method for swarm intelligence computing in heterogeneous device collaborative networks. First, a swarm intelligence computing network with heterogeneous device collaboration is constructed. Then, a relationship model between heterogeneous device resources and user tasks, a feature model of user tasks, and an objective function for scheduling the swarm intelligence computing network are constructed. Next, a queue state decision control model is obtained through a discretized time scaling objective function, and the flow state of the waiting queue, the time and duration of entering the scheduling cycle, and the types of heavy-flow tasks requiring scheduling are calculated using the queue state decision control model. Finally, a new bipartite graph of resources and heavy-flow tasks is created within the scheduling cycle, and an improved Hungarian algorithm is used to calculate the heavy-flow tasks within the scheduling cycle to obtain the scheduling strategy of the swarm intelligence computing network in this stage. This invention maximizes the number of task matches each time tasks are assigned, reducing the high-frequency task load on the network system.
[0006] The technical solution adopted by this invention to solve its technical problem includes the following steps:
[0007] Step 1: Construct a collaborative swarm computing network for heterogeneous devices;
[0008] Step 2: Construct a relationship model between heterogeneous device resources and user tasks, a feature model of user tasks, and establish an objective function for scheduling the swarm intelligence computing network;
[0009] Step 3: Obtain the queue state decision control model by discretizing the time scaling objective function, and calculate the traffic status of the waiting queue, the time and duration of entering the scheduling cycle, and the type of heavy traffic task that needs to be scheduled by the queue state decision control model.
[0010] Step 4: Create a new bipartite graph of resources and heavy traffic tasks within the scheduling cycle. The improved Hungarian algorithm is then used to calculate the scheduling strategy of the swarm computing network during the scheduling period.
[0011] Further, step 1 specifically includes:
[0012] The swarm computing network includes users who publish tasks, multiple heterogeneous device resources, and a task waiting queue. Users publish online tasks over time. If the resources required for a task are occupied, the task enters the waiting queue to wait for service. If the required resources are idle, the required resources work together to process the task. When a task enters the system or a resource service is completed, i.e., when the system state changes, the system's traffic status is calculated to schedule the task.
[0013] Furthermore, step 2 specifically includes:
[0014] Step 2-1: In a crowdsourcing computing network, users publish tasks online over time, which then arrive in a waiting queue; using A collection representing task types, using Let A represent the set of equipment resources; the task-resource relationship matrix is represented by an I×J dimensional A; if resource i cooperates in the service process of task j, then A... ij =1, otherwise A ij =0; for all tasks j, For all tasks i in This represents the set of resources required during the service of task type j. This represents the set of task types that are collaboratively processed by resource i;
[0015] Step 2-2: Let v jn This represents the service time of task type j, and It is a sequence of independent and identically distributed random variables with a mean of . The coefficient of variation is σ j For the service time of each type of task j, we have:
[0016] V j (0)=0
[0017]
[0018]
[0019] Where V j (n) is the sum of the times for n consecutively served tasks of type j; S j (t) represents the number of type j tasks processed continuously during the time interval [0, t] until time t.
[0020] Steps 2-3: Use This represents the arrival interval sequence of task j, with a mean of 1 / λ. j For the arrival time of each type of task j, we have:
[0021] U j (0)=0
[0022]
[0023]
[0024] Among them U j (n) represents the time when the nth type j task arrives at the system; E j (t) represents the number of type j tasks that arrive in the system after being posted by the user up to time t;
[0025] λ j These are the distribution parameters that match the arrival interval of task type j. ρ is the distribution parameter that the service time of task type j conforms to; i Let the load on resource i be represented by the following formula: The flow state for resource i is then defined as follows:
[0026]
[0027] If θ i = -∞, then resource i is in a light-flow state; if Then resource i is in a high-flow state.
[0028] For the representation of the flow status of resources, This indicates a resource in a low-traffic state. Resources indicating heavy traffic status:
[0029]
[0030]
[0031] The tasks are categorized into three sets of task types: a set of task types that are only processed by high-traffic state resources. A set of task types that are handled only by light-flow state resources A set of task types processed by two states: light traffic and heavy traffic.
[0032]
[0033]
[0034]
[0035] For all types of task j, use Q. j (t) represents the number of type j tasks in the system at time t, including tasks currently being served:
[0036] Q j (t)=Q j (0)+E j (t)-S j (T j (t))
[0037] Q j Q(t) represents the initial number of tasks in the system. j (0) = 0, T j(t) represents the cumulative time spent processing task type j during the period [0,t].
[0038] Steps 2-4: The objective function of the swarm intelligence computing network is to minimize the number of waiting tasks in the system, i.e., to minimize the system capacity loss.
[0039]
[0040] Furthermore, step 3 specifically includes:
[0041] Step 3-1: By adding task load constraints associated with resources, the objective function in continuous time is discretized into a queue state decision control model for each time step, where the task load associated with resource i is defined as:
[0042]
[0043] Step 3-2: Utilizing the fluid and diffusion scaling processes in the queue model, i.e., discretizing the continuous time interval by adding task load constraints, the queue state decision control model is established as follows:
[0044]
[0045]
[0046]
[0047] Step 3-3: For each time t, the queue flow state of the swarm intelligence computing system is a definite value, that is, the decision control model is a linear programming model in mathematical terms:
[0048]
[0049]
[0050]
[0051] We can find the optimal solution with the minimum Euclidean norm for the linear programming model above using a quadratic programming model. Since this quadratic programming model is convex, it is solvable in polynomial time.
[0052]
[0053]
[0054]
[0055]
[0056] Where z(w) represents the optimal objective function value of the linear programming model;
[0057] Steps 3-4: Using the queue state decision control model solved at time t, obtain the number of all task types whose queue state is close to the optimal solution at this time. The definitions of heavy-volume tasks and light-volume tasks are as follows:
[0058]
[0059]
[0060] The corresponding resources for handling heavy-load tasks and light-load tasks are defined as follows:
[0061]
[0062]
[0063] if Then, at time t, the scheduling cycle begins. The duration of the scheduling cycle is the expected time required to achieve optimal workload allocation among resources, calculated using the following formula:
[0064]
[0065]
[0066] Within the time interval [t, t+L(t)] The number of high-traffic tasks within Q j (t) decreased to If the value is below the specified value, after the scheduling cycle ends, the queue state decision control model is recalculated based on the system flow status at this time, and steps 3-2 to 3-4 are repeated.
[0067] Furthermore, step 4 specifically includes:
[0068] Step 4-1: Calculate the time t at which each scheduling cycle begins. The high-traffic task types within the graph, and the relationship matrix between all resources and high-traffic task-resource pairs, are used as a new bipartite graph. Perform a match;
[0069] Step 4-2: For a bipartite graph First, match the first node and mark the resources required by the first node as occupied by the task node. Then, increment the maximum number of matched tasks by 1.
[0070] Step 4-3: For the next node, if the required resources are free, repeat Step 4-2, that is, mark the node as occupied by the task node and increment the maximum number of matching tasks by 1; if there is a situation where the required resources are occupied, query the task node with the occupied resources, and then release all the resources occupied by the task node; if releasing all the resources makes the number of matching tasks greater than 1, then match these resources, mark these resources as occupied by the corresponding tasks, record the number of matching tasks X after this operation, and then increment the maximum number of matching tasks by X and decrement by 1; if releasing all the resources makes the number of matching tasks less than or equal to 1, then backtrack to the situation before the occupied resource node was removed, the currently matched task node's required resources are occupied and cannot be matched, skip the node;
[0071] Step 4-4: Repeat step 4-3 until no more heavy traffic task nodes can be matched. Finally, send the matched task type to the required resource device.
[0072] Steps 4-5: For light-traffic tasks, find the remaining idle device resources and allocate them to the corresponding light-traffic tasks for service.
[0073] The beneficial effects of this invention are as follows:
[0074] (1) This invention proposes an optimization strategy for the network architecture of heterogeneous devices collaboratively processing tasks, which is consistent with the real-world scenarios of heterogeneous devices and cluster tasks.
[0075] (2) This invention proposes a queue state decision control model based on discretized time scaling, which is used to calculate the flow status of the waiting queue, the time to enter the scheduling cycle, and the type of heavy flow task that needs to be scheduled.
[0076] (3) This invention improves the Hungarian algorithm to allocate resources for heavy traffic tasks within the scheduling cycle, so that the maximum number of tasks is matched each time a task is allocated, thereby reducing the high-frequency task load of the network system. Attached Figure Description
[0077] Figure 1 This is a scene diagram for the present invention.
[0078] Figure 2 This is a diagram illustrating the solution of the present invention. Detailed Implementation
[0079] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0080] This invention addresses the problems of existing technologies by proposing an online task scheduling scheme for swarm intelligence computing based on discrete time scaling in heterogeneous device collaborative networks. It is used for multi-server tasks in swarm intelligence computing scenarios, such as distributed training of deep neural networks or large-scale image processing tasks, i.e., scenarios where multiple server tasks simultaneously request computing resources such as CPU, GPU and FPGA.
[0081] The objective of this invention can be achieved by adopting the following technical solutions:
[0082] An online scheduling method for swarm intelligence computing based on discretized time scaling includes the following steps:
[0083] Step 1: Construct a collaborative swarm computing network for heterogeneous devices;
[0084] Step 2: Construct a relationship model between heterogeneous device resources and user tasks, a feature model of user tasks, and establish an objective function for scheduling the swarm intelligence computing network;
[0085] Step 3: By discretizing the time to scale the objective function, we obtain an easy-to-compute queue state decision control model. Then, we use the queue state decision control model to calculate the current traffic status of the waiting queue, the time and duration of entering the scheduling cycle, and the type of heavy traffic task that needs to be scheduled.
[0086] Step 4: A new bipartite graph of resources and heavy traffic tasks was created within the scheduling cycle. The improved Hungarian algorithm is then used to calculate the scheduling strategy of the swarm computing network during the scheduling period. Specific implementation examples:
[0088] Step one specifically involves: constructing a collaborative swarm computing network of heterogeneous devices. The network includes users who publish tasks, multiple heterogeneous device resources, and a task waiting queue. Users publish online tasks over time. If the resources required for a task are occupied, the task enters the waiting queue to await service; if the required resources are available, they collaborate to process the task. At the moment a task enters the system or a resource service is completed—that is, when the system state changes—the system's traffic status is calculated to schedule tasks.
[0089] In step two, within the swarm computing network, users publish tasks online over time, which then arrive in the waiting queue. A collection representing task types, using This represents the set of device resource types. The task-resource relationship matrix is represented by an I×J dimensional matrix A. If resource i collaboratively participates in the service process of task j, then A... ij =1, otherwise A ij=0. For all tasks j, there is... For all tasks i in This represents the set of resources required during the service of task type j. This represents the set of task types that are collaboratively processed by resource i.
[0090] Let v jn This represents the service time of task type j, and It is a sequence of strictly independent and identically distributed random variables with a mean of . The coefficient of variation is σ j For the service time of each type of task j, there are...
[0091] V j (0)=0
[0092]
[0093]
[0094] Where V j (n) is the sum of the times for n consecutively served tasks of type j. j (t) represents the number of type j tasks processed continuously within the time interval [0, t] until time t.
[0095] Similarly, using This represents the arrival interval sequence of task j, with a mean of 1 / λ. j For the arrival time of each type of task j, we have
[0096] U j (0)=0
[0097]
[0098]
[0099] U j (n) represents the time when the nth type j task arrives at the system. E j (t) represents the number of type j tasks that arrive in the system after being posted by the user up to time t.
[0100] λ j These are the distribution parameters that correspond to the arrival interval of task j. ρ is the distribution parameter that corresponds to the service time of task j. i Let the load on resource i be represented by the following formula: The flow state for resource i is then defined as follows:
[0101]
[0102] If θ i = -∞, then resource i is in a light-flow state; if Then resource i is in a high-flow state.
[0103] For the representation of the flow status of resources, This indicates a resource in a low-traffic state. Resources indicating heavy traffic status
[0104]
[0105]
[0106] The task classification is as follows: a set of task types processed by heavy traffic state resources, a set of task types processed only by light traffic state resources, and a set of task types processed by both light and heavy traffic states.
[0107]
[0108]
[0109]
[0110] For all tasks j, use Q. j (t) represents the number of tasks of type j in the system at time t, including the tasks being served.
[0111] Q j (t)=Q j (0)+E j (t)-S j (T j (t))
[0112] Q j (t) represents the initial number of tasks in the system, typically Q. j (0) = 0, T j (t) represents the cumulative time spent processing task type j during the period [0, t].
[0113] The objective function of a crowdsourcing computing network is to minimize the number of waiting tasks in the system, i.e., to minimize the system capacity loss.
[0114]
[0115] Step three involves adding task load constraints associated with resources to discretize the continuous-time objective function into a queue state decision control model for each time step. The task load associated with resource i is defined as follows:
[0116]
[0117] When no more tasks arrive in the system and all other resources required for collaboration are available, W(t) is the expected time that resource i should spend in order to process all relevant tasks.
[0118] By utilizing the fluid and diffusion scaling processes in the queue model—that is, by adding task load constraints to discretize the continuous time into time intervals—a queue state decision control model is established as follows:
[0119]
[0120]
[0121]
[0122] For each time t, the queue flow state of the swarm intelligence computing system is a definite value, meaning that the decision control model is a linear programming model in mathematical terms.
[0123]
[0124]
[0125]
[0126] To solve the linear programming model described above, a quadratic programming model is used to find its optimal solution with the minimum Euclidean norm. Since this quadratic programming model is convex, it is solvable in polynomial time.
[0127]
[0128]
[0129]
[0130]
[0131] Where z(w) represents the optimal objective function value of the linear programming model.
[0132] By solving the queue state decision control model at time t, we can obtain the number of all task types whose queue state is close to the optimal solution at that time. The definitions of heavy-load tasks and light-load tasks are as follows:
[0133]
[0134]
[0135] The corresponding resources for handling heavy-load tasks and light-load tasks are defined as follows:
[0136]
[0137]
[0138] if Then, at time t, the scheduling cycle begins. The duration of the scheduling cycle is the expected time required to achieve optimal workload allocation among resources, calculated using the following formula:
[0139]
[0140]
[0141] Within the time interval [t, t+L(t)] The number of high-traffic tasks within Q j (t) drops to near At the current level, after the scheduling cycle ends, the queue state decision control model is recalculated based on the system traffic status at this time, and the same process is repeated.
[0142] In step four, during each scheduling cycle, due to the collaborative processing of tasks by heterogeneous devices, there may be situations where the resources required for a certain task are occupied by other types. Therefore, in order to achieve the maximum number of task matchings, the Hungarian algorithm was improved.
[0143] Calculate time t for each entry into the scheduling cycle. The high-traffic task types within the graph, and the relationship matrix between all resources and high-traffic task-resource pairs, are used as a new bipartite graph. Perform a match.
[0144] For a bipartite graph First, match the first node. Its associated resource node must be idle. Then mark the resource required by the first node as occupied by the task node, and increment the maximum number of matched tasks by 1.
[0145] For the next node, if the required resources are free, repeat the above operation; if the required resources are occupied, query the task node with the occupied resources, and then release all resources occupied by that task node. If releasing all resources results in a number of matching tasks greater than 1, then match these resources, mark these resources as occupied by the corresponding tasks, record the number of matching tasks X after this step, and then increment the maximum number of matching tasks by X and decrement by 1; if releasing all resources results in a number of matching tasks less than or equal to 1, then backtrack to the point before the occupied resource node was removed, and if the resources required by the currently matching task node are occupied and cannot be matched, skip that node.
[0146] Repeat the above node operations until no more nodes belonging to heavy traffic tasks can be matched, and finally send the matched type of task to the required resource device.
[0147] For low-traffic tasks, after completing the above steps, find the remaining idle device resources and allocate them to the corresponding low-traffic tasks for service.
Claims
1. A method for online task scheduling in swarm computing for heterogeneous device collaborative networks, characterized in that, Includes the following steps: Step 1: Construct a collaborative swarm computing network for heterogeneous devices; Step 2: Construct a relationship model between heterogeneous device resources and user tasks, a feature model of user tasks, and establish an objective function for scheduling the swarm intelligence computing network; Step 3: Obtain the queue state decision control model by discretizing the time scaling objective function, and calculate the traffic status of the waiting queue, the time and duration of entering the scheduling cycle, and the type of heavy traffic task that needs to be scheduled by the queue state decision control model. Step 4: Create a new bipartite graph of resources and heavy traffic tasks within the scheduling cycle. The improved Hungarian algorithm is used to calculate the heavy traffic tasks within the scheduling cycle, and the scheduling strategy of the swarm computing network in this stage is obtained. Specifically: Step 4-1: Each time a scheduling cycle begins... t Calculate at any time The high-traffic task types within the graph, and the relationship matrix between all resources and high-traffic task-resource pairs, are used as a new bipartite graph. Perform a match; Step 4-2: For a bipartite graph First, match the first node and mark the resources required by the first node as occupied by that node, then increment the maximum number of matching tasks by 1; Step 4-3: For the next node, if the required resources are free, repeat Step 4-2, that is, mark the resources required by the node as occupied by the node, and increment the maximum number of matching tasks by 1; if there is a situation where the required resources are occupied, query the task node with the occupied resources, and then release all the resources occupied by the node; if releasing all the resources makes the number of matching tasks greater than 1, then match these resources, mark these resources as occupied by the corresponding tasks, record the number of matching tasks X after this operation, and then increment the maximum number of matching tasks by X and decrement by 1; if releasing all the resources makes the number of matching tasks less than or equal to 1, then backtrack to the situation before the nodes occupying the resources were released, and the resources required by the currently matching task nodes are occupied and cannot be matched, skip the node; Step 4-4: Repeat step 4-3 until no more heavy traffic task nodes can be matched, and finally send the matched type of task to the required resource device. Steps 4-5: For light-traffic tasks, find the remaining idle device resources and allocate them to the corresponding light-traffic tasks for service.
2. The online task scheduling method for swarm intelligence computing in heterogeneous device collaborative networks according to claim 1, characterized in that, Step 1 specifically involves: The swarm computing network includes users who publish tasks, multiple heterogeneous device resources, and a task waiting queue. Users publish online tasks over time. If the resources required for a task are occupied, the task enters the waiting queue to wait for service. If the required resources are idle, the required resources work together to process the task. When a task enters the system or a resource service is completed, i.e., when the system state changes, the system's traffic status is calculated to schedule the task.
3. The online task scheduling method for swarm intelligence computing in heterogeneous device collaborative networks according to claim 2, characterized in that, Step 2 specifically involves: Step 2-1: In a crowdsourcing computing network, users publish tasks online over time, which then arrive in a waiting queue; using A collection representing task types, using Represents a collection of equipment resources; The task-resource relationship matrix uses a... Vie A Indicates; if resources Collaborative Participation Types j The service process of the task, ,otherwise For all types j The tasks include For all tasks have ,in Representation type j The set of resources required during the task service process Indicates that resources A set of task types for collaborative processing; Step 2-2: Let Representation type j The service time of the task, and It is a sequence of independent and identically distributed random variables with a mean of . The coefficient of variation is For each type j The service time for the task includes: in It is continuous service n Types j The time and duration of the task; This indicates that the type is always processed within the time interval [0, t]. j The task, until the moment t Types of processing j Number of tasks; Steps 2-3: Use express j The arrival interval sequence of the tasks, with a mean of For each type j The arrival time of the task includes: in It is the first n Types j The moment the task arrives at the system; Indicated as until t The time when a task arrives at the system after being posted by a user. j Number of tasks; Is a type j The distribution parameters that the task arrival intervals conform to. Is a type j The distribution parameters that the task service time conforms to; Represented as resources The load on it is calculated using the following formula: For resources i The flow state is defined as follows: if Then resources In a light flow state; if Then resources Under heavy flow conditions; For the representation of the flow status of resources, This indicates a resource in a low-traffic state. Resources indicating heavy traffic status: The tasks are categorized into three sets of task types: a set of task types that are only processed by high-traffic state resources. A set of task types handled only by light-flow state resources. A set of task types processed by two states: light traffic and heavy traffic. ; For all types j Task, using Indicates at time t Types in the time system j The number of tasks, including those currently being served: in This represents the initial number of tasks in the system. , Indicates the type processed during the period [0, t]. j Cumulative time of the task; Steps 2-4: The objective function of the swarm intelligence computing network is to minimize the number of waiting tasks in the system, i.e., to minimize the system capacity loss. 。 4. The online task scheduling method for swarm intelligence computing in heterogeneous device collaborative networks according to claim 3, characterized in that, Step 3 specifically involves: Step 3-1: By adding task load constraints associated with resources, the continuous-time objective function is discretized into a queue state decision control model for each time step, which is related to resources. The associated task load is defined as: Step 3-2: Utilizing the fluid and diffusion scaling processes in the queue model, i.e., discretizing the continuous time interval by adding task load constraints, the queue state decision control model is established as follows: Step 3-3: For each moment t The queue flow state of a crowdsourcing computing system is a definite value, meaning that the decision control model is a linear programming model in mathematical terms. We can find the optimal solution with the minimum Euclidean norm for the linear programming model above using a quadratic programming model. Since this quadratic programming model is convex, it is solvable in polynomial time. in This represents the optimal objective function value of the linear programming model; Steps 3-4: By time t The solved queue state decision control model yields the number of all task types whose queue state is close to the optimal solution. The definitions of heavy-volume tasks and light-volume tasks are as follows: The corresponding resources for handling heavy-load tasks and light-load tasks are defined as follows: if Then at this time t The scheduling cycle begins at a certain point. The duration of the scheduling cycle is the expected time required to achieve optimal workload allocation among resources, calculated using the following formula: exist[ Within a certain time period The number of heavy traffic tasks within the system is from Reduce to If the value is below a certain threshold, after the scheduling cycle ends, the queue state decision control model is recalculated based on the current system traffic status, and steps 3-2 to 3-4 are repeated.
Citation Information
Patent Citations
Distribution and scheduling method based on separable tasks in distributed network environment
CN113238847A
Scheduling system, method and apparatus for a cluster
EP1318453A1
