Distributed on-the-fly encoding scheduling method and system for computing task flow

CN116302444BActive Publication Date: 2026-09-11NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310349410.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-04
Publication Date
2026-09-11
Estimated Expiration
2043-04-04

AI Technical Summary

Technical Problem

[0004]本发明的目的是基于主从分布式计算框架下接收流式任务的计算场景,通过提出一种新型的面向计算任务流编码方式,既解决分布式计算中的落后者问题,又避免系统在高负载下大大增加任务排队时间的问题

Benefits of technology

[0027] Compared to existing technologies, this invention offers the following advantages: In a master-slave computing framework, for a continuous stream of computing tasks, while assigning worker nodes to compute the source tasks via Round-Robin scheduling, redundant computing tasks are generated using an On-the-Fly encoding method that maintains a queue of unfinished tasks. Worker nodes are then assigned to compute these redundant tasks via Round-Robin scheduling, and each worker node is responsible for retrieving and running the tasks from its own task queue and returning them to the master node. By combining On-the-Fly encoding with Round-Robin scheduling, the impact of lagging tasks can be mitigated under low load conditions, and queuing latency can be significantly reduced under high load conditions, thus significantly lowering the system's average latency. Finally, by using reinforcement learning to adjust the parameters of the On-the-Fly encoding strategy, it can better adapt to dynamically changing arrival rates and achieve even lower average task latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302444B_ABST
    Figure CN116302444B_ABST
Patent Text Reader

Abstract

The application discloses a kind of distributed On-the-Fly encoding computing scheduling and system for computing task flow.The method is for distributed computing framework, for indivisible computing task, in the scene considering that the overhead of revoking redundant task is not negligible, due to the existence of laggard phenomenon of distributed computing and multiple node scheduling problems, the laggard problem in distributed system is alleviated by designing On-the-Fly model coding scheme, using Round-Robin scheduling mode, the problem of multiple worker node scheduling is solved, so as to reduce the average execution time of overall task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of distributed system technology, specifically relating to a flexible distributed coding computation method and system oriented towards computational task flow. Background Technology

[0002] In recent years, with the continuous increase in data volume and the growing demand for entertainment, the computational needs for data processing have increased significantly. Basic linear computations, such as matrix multiplication, are core computations in many numerical computations and machine learning algorithms, such as solving partial differential equations, forward and backward propagation in neural networks, and calculating PageRank graphs. In terms of applications, indivisible nonlinear machine learning models are becoming the primary tools for many applications. Predictive service systems, which accept queries and return results by deploying models, make predictions by inferring from these models. With the continuous improvement of computing power from hardware such as CPUs and GPUs, large-scale matrix-vector multiplication and machine learning model inference services can be deployed on a single node, eliminating the need for fragmented computational models as in traditional distributed computing. High request rates for computational tasks can lead to significant queuing latency, often requiring the deployment of multiple worker nodes in a computing cluster to provide computational services. A major problem when using distributed systems to execute distributed computing tasks is the existence of laggards. Due to unstable network conditions, virtual resource contention, and other factors, some worker nodes complete tasks very slowly, with some nodes taking 5 to 8 times longer than the average time, resulting in a poor user experience for some users.

[0003] To address the laggard problem in distributed computing, frameworks like Hadoop and Spark employ heartbeat detection to check for lagging nodes. If a worker node fails to send a heartbeat message to the master node in a timely manner, the master node reassigns the task to other nodes for execution. However, this approach incurs additional communication overhead, and re-executing tasks increases overall computational latency. In recent years, researchers have proposed an encoding-based computation model. When computational tasks exhibit linear or nonlinear characteristics, they can be encoded and sent to different worker nodes for execution. In this model, the master node only needs to receive partial results from worker nodes to decode the overall task computation result. Since it doesn't need to wait for laggard results, the overall task computation time is significantly reduced. In the encoding-based computation model, the task encoding scheme and task scheduling strategy have a significant impact on the overall task processing time. Therefore, it is necessary to design appropriate encoding schemes and task scheduling strategies. Summary of the Invention

[0004] The purpose of this invention is to address the problem of laggards in distributed computing by proposing a novel task-oriented encoding method for receiving streaming tasks in a master-slave distributed computing framework. This method solves the problem of laggards in distributed computing and avoids the problem of significantly increasing task queuing time under high load.

[0005] Technical Solution: To achieve the above-mentioned objectives, the technical solution of this invention is as follows:

[0006] Firstly, a distributed on-the-fly coding scheduling method oriented towards computational task flows includes the following steps:

[0007] (1) The master node accepts the user's computing tasks and stores them in the waiting queue;

[0008] (2) The master node determines whether to generate redundant tasks from the waiting queue according to the On-the-Fly encoding strategy. The On-the-Fly encoding strategy maintains a lag window, which contains currently unfinished tasks and is the source task for generating redundant tasks. The encoding parameter of the On-the-Fly encoding strategy is (k, Δt), which represents the timing of generating redundant tasks. Here, k represents that after every k tasks arrive, a redundant task will be generated for all tasks in the lag window, and Δt represents that after every Δt time, a redundant task will be generated for all tasks in the lag window.

[0009] (3) The master node executes the encoding and sends the task to the worker nodes according to the scheduling policy;

[0010] (4) The master node receives the calculation results of the worker node and determines whether other calculation results can be decoded according to the On-the-Fly decoding strategy. The On-the-Fly decoding strategy determines whether a new source task can be decoded by traversing the redundant task numbers in turn and determining whether the rank of the encoding generation matrix is ​​one less than the number of tasks. The Gauss-Jordance elimination method is used to obtain the source tasks that can be decoded.

[0011] (5) The master node returns the calculation results to the user;

[0012] (6) The master node optimizes the encoding parameters through deep reinforcement learning.

[0013] Furthermore, in step (1), the master node pre-deploys the computing model on the worker nodes, while maintaining the connection and waiting for the user to send computing tasks, and caches them locally.

[0014] Furthermore, the encoding process of the master node includes: retrieving all computation tasks from the lagging window queue; performing a random linear encoding on all computation tasks; and sending them to the computation nodes in a round-robin manner.

[0015] Furthermore, the Round-Robin sending method includes: the master node distributes the computation requests from the user and the generated redundant computation requests to the internal worker nodes in turn, starting from 1, until the number of internal worker nodes N is reached, and then restarts the loop from 1.

[0016] Furthermore, the Gaussian-Jordan elimination method includes:

[0017] In each iteration, the pivot element is first found and then moved to the main diagonal of the matrix through row operations.

[0018] Divide all elements in the row containing the pivot by the pivot, so that the pivot becomes 1;

[0019] For other elements in the column containing the pivot, subtract the row containing the pivot from the row containing the pivot multiplied by the specified multiple, so that all other elements in the column containing the pivot, except the pivot, are reduced to 0.

[0020] Repeat the above operations to transform the column containing the pivot into the form of an identity matrix.

[0021] Furthermore, in step (6), deep reinforcement learning, with the help of deep neural networks, enables the master node to autonomously interact with the cluster of computing nodes and continuously update the On-the-Fly encoding parameters by reducing the average task latency.

[0022] Furthermore, the deep reinforcement learning algorithm used is the Dueling DQN algorithm; the state of the deep reinforcement learning algorithm is (number of tasks, task service time, and task type not calculated); the action of the deep reinforcement learning algorithm is (k, Δt); the reward of the deep reinforcement learning algorithm is the negative value of the length of the lagging queue.

[0023] Secondly, a distributed on-the-fly coding scheduling system for computing task flows includes a master node and several worker nodes. The master node is configured to schedule computing tasks according to the distributed on-the-fly coding scheduling method for computing task flows according to the first aspect of the present invention. The worker nodes obtain computing tasks from their own task queues based on the assignments from the master node, run the computing tasks, and return them to the master node.

[0024] Thirdly, the present invention provides a computer device, comprising: one or more processors; a memory; and

[0025] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the distributed on-the-fly coding scheduling method for computational task flows as described in the first aspect of the invention.

[0026] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the distributed on-the-fly coding scheduling method for computational task flows as described in the first aspect of the present invention.

[0027] Compared to existing technologies, this invention offers the following advantages: In a master-slave computing framework, for a continuous stream of computing tasks, while assigning worker nodes to compute the source tasks via Round-Robin scheduling, redundant computing tasks are generated using an On-the-Fly encoding method that maintains a queue of unfinished tasks. Worker nodes are then assigned to compute these redundant tasks via Round-Robin scheduling, and each worker node is responsible for retrieving and running the tasks from its own task queue and returning them to the master node. By combining On-the-Fly encoding with Round-Robin scheduling, the impact of lagging tasks can be mitigated under low load conditions, and queuing latency can be significantly reduced under high load conditions, thus significantly lowering the system's average latency. Finally, by using reinforcement learning to adjust the parameters of the On-the-Fly encoding strategy, it can better adapt to dynamically changing arrival rates and achieve even lower average task latency. Attached Figure Description

[0028] Figure 1 This is a diagram illustrating the deployment of computing services;

[0029] Figure 2 This is a schematic diagram of an on-the-fly encoded computation scheduling architecture oriented towards computation task flow;

[0030] Figure 3 This is a flowchart of the On-the-Fly coding scheduling method for computational task flow according to the present invention;

[0031] Figure 4 This is a schematic diagram of the On-the-Fly encoding scheme designed in an embodiment of the present invention;

[0032] Figure 5 This is a schematic diagram of the On-the-Fly decoding scheme designed in an embodiment of the present invention;

[0033] Figure 6 This is an example diagram of the On-the-Fly encoding / decoding scheme in an embodiment of the present invention;

[0034] Figure 7 This is a diagram of the network structure for optimizing On-the-Fly encoding parameters using reinforcement learning in an embodiment of the present invention. Detailed Implementation

[0035] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to specific embodiments and accompanying drawings.

[0036] like Figure 1 As shown, to provide services to users, the vast majority of internet services are based on computing services, such as image encryption and decryption, item-based collaborative filtering recommendation services, and inference services provided by various neural networks, greatly satisfying diverse user needs. These service providers need to deploy these computing services on servers. Traditionally, the deployment method involves dividing the computing model and executing the computation in parallel to minimize computational latency. Tasks are typically distributed equally among the nodes in the system, with each worker node completing its local computation before submitting the final result to the central node. This computing framework is commonly called a master-worker computing framework, and the central node is also called the master node. Because the central node must wait for the results from all worker nodes to complete its final computation, failed nodes or nodes with extremely slow computation become bottlenecks in the entire computing process; these nodes are often referred to as "lagging nodes." The "lagging problem" is unavoidable. On the one hand, nodes in large-scale distributed systems are often composed of unreliable, low-end commercial hardware, leading to frequent sudden node failures. On the other hand, due to factors such as shared resource competition, network environment changes, node load imbalances, system maintenance, and power constraints, the completion time of computing tasks is unpredictable and fluctuates significantly. Consequently, some nodes may take much longer than the average time to complete their tasks, severely hindering overall computation. To combat the "lagging problem," big data processing frameworks like Hadoop and Spark typically employ periodic lagging node detection and task restarting as backups. However, the inherent randomness of "lagging" nodes is difficult to predict, and the detection-replication approach incurs excessive computational costs. Recent researchers have discovered that distributed coding computing models—based on model-segmented distributed computing frameworks—can overcome the "lagging problem" in distributed systems by using coding techniques. Appropriate coding methods generate redundant computing tasks, ensuring that the final result can be obtained from any sufficient number of nodes. Since there is no need to wait for the slowest node to complete its computation, appropriate coding can guarantee rapid completion of computing tasks even when some nodes fail or lag behind, at a relatively low computational cost.

[0037] like Figure 2As shown, with the continuous improvement of hardware technology such as CPUs and GPUs, the computing power of a single node has been greatly enhanced. It can quickly complete large-scale matrix calculations and neural network inference, eliminating the need to break large matrix calculations into smaller ones. This not only reduces communication overhead but also allows for more flexible addition or removal of worker nodes in the system. However, the large number of computation requests per unit time leads to task queuing, increasing service time and thus task completion time. Therefore, multiple computing services need to be deployed across multiple worker nodes, each maintaining its own task queue, which is received by the master node to form a computing cluster providing services to users, creating a distributed master-slave computing framework with no model partitioning. However, distributed deployment still suffers from the "lagging phenomenon," leading to increased service time. Using replication strategies or lagging detection incurs significant overhead and is less effective than coding strategies. Currently, there is no corresponding coding strategy for distributed master-slave computing frameworks with no model partitioning. Furthermore, the presence of multiple worker nodes in this problem necessitates addressing node scheduling.

[0038] In distributed coding computation, the influence of coding parameters on coding strategy is crucial. Because it deals with a computational task flow, the task arrival rate is random and unpredictable. When the task arrival rate is high, the generation of redundant tasks should be reduced to decrease queuing latency of system worker nodes. Simultaneously, the computation speed of worker nodes in the computing cluster is random and unpredictable, requiring timely adjustment of coding parameters. Delayed adjustment of coding parameters can lead to significant queuing times. In recent years, reinforcement learning has been used to adjust its action strategies by continuously interacting with the environment and receiving corresponding rewards based on changes in the environment after observing the results of its actions. Using this approach, reinforcement learning can both capture environmental features and adapt to changing environments, and has been successfully applied in some highly challenging decision-making and control domains.

[0039] This invention provides an on-the-fly encoding scheduling computation framework to address the "lagging phenomenon" and scheduling problems. Because the host node has limited control over the worker nodes and canceling a task involves task scheduling and communication overhead, this framework does not cancel source tasks that have already been decoded or redundant tasks.

[0040] like Figure 3 As shown, the distributed on-the-fly coding scheduling method for computational task flows proposed in this invention includes the following steps:

[0041] (1) The master node accepts the user's computing tasks and stores them in the waiting queue;

[0042] (2) The master node determines whether to generate redundant tasks from the waiting queue based on the On-the-Fly encoding strategy;

[0043] (3) The master node executes the encoding and sends the task to the worker nodes according to the scheduling policy;

[0044] (4) The master node receives the calculation results from the worker nodes and determines whether other calculation results can be decoded according to the On-the-Fly decoding strategy;

[0045] (5) The master node returns the calculation results to the user;

[0046] (6) The master node optimizes the encoding parameters through deep reinforcement learning.

[0047] The distributed on-the-fly coding scheduling method / system for computational task flows described in this paper can also be simply referred to as the on-the-fly coding scheduling method / system for computational task flows, or simply as the distributed coding scheduling method / system for computational task flows. The " / " in this paper represents "or".

[0048] Figure 4 This is a pseudocode diagram of the On-the-Fly coding scheduling proposed in this invention. The core idea of ​​On-the-Fly coding is that currently incomplete tasks are highly likely to become lagging tasks, so a lagging window needs to be maintained. The lagging window contains currently incomplete tasks, which are the source tasks that generate redundant tasks. The parameters of On-the-Fly coding are (k, Δt), and the physical meaning of the parameters is the timing of generating redundant tasks. k represents that after every k tasks arrive, a redundant task will be generated for all tasks in the lagging window, and Δt represents that after every Δt time elapses, a redundant task will be generated for all tasks in the lagging window. After the source task reaches k or after Δt time elapses, the conditions for generating redundant tasks are reset. The Round-Robin method is used to assign worker nodes to the source tasks, and the worker is initialized. index When set to 0, a new task is assigned to worker with sequence number 0. index The worker node, and the sequence number of the worker are updated simultaneously. index =(worker index +1)%worker num .

[0049] Figure 5The diagram shows the pseudocode for On-the-Fly decoding proposed in this invention. Worker nodes complete their calculations and return the results to the master node. The master node caches the results in the result set according to the task generation sequence number. The master node first confirms whether the received result is the result of the source task. If it is, it directly returns it to the user. Simultaneously, it iterates through redundant task sequences according to the order in which tasks arrived. It checks whether the rank of the encoded matrix is ​​one less than the number of tasks to determine if a new source task can be decoded. Gaussian-Jordan elimination is then used to obtain decodeable source tasks. This process continues until no new source task can be decoded, at which point all calculation results are returned to the user.

[0050] The specific process of Gauss-Jord elimination includes: in each iteration, first find the pivot and move it to the main diagonal of the matrix through row operations; divide all elements in the row containing the pivot by the pivot to make the pivot equal to 1; for the other elements in the column containing the pivot, subtract the row containing the pivot from the row containing the pivot by a specified multiple to make all other elements in the column containing the pivot equal to 0; repeat the above operations to transform the column containing the pivot into the form of an identity matrix.

[0051] Figure 6 The diagram shows a complete example of On-the-Fly coding scheduling for computational task flows. The parameters of the On-the-Fly coding strategy are selected as (3, 4), meaning that a redundant task is generated for the lagging window every three tasks or every four time units.

[0052] like Figure 6 As shown in (a), the current time slice is t=05, and the system parameters are k=0 and worker. index =1, Δt=0, task X1 arrives at the master node, but the condition for generating a redundant task is not met. According to the Round-Robin scheduling, task X1 is assigned to worker node W1, and the parameters are updated simultaneously, k=1, worker index =2, Δt=1.

[0053] like Figure 6 As shown in (b), upon entering the next time slice t=1, task X2 arrives at the master node. After assessment, the conditions for generating redundant tasks are not met. According to the Round-Robin scheduling, task X2 is assigned to worker node W2, and the parameters are updated: k=2, worker... index =3, Δt=2.

[0054] Figure 6As shown in (c), upon entering the next time slice t=2, task X3 arrives at the master node. According to the Round-Robin scheduler, task X3 is assigned to worker node W3, and the parameters are updated simultaneously. k=3, worker... index =4, Δt=2, after judgment, the condition "k=3" for generating redundant tasks is met. A linear operation is performed on all tasks in the lagging task window to generate redundant tasks. The current lagging task window contains (X1, X2, X3), that is, R1(1, 2, 3) = W (1,1) ·X1+W (1,2) ·X2+W (1,3) ·X3, (where W) (i,j) (This refers to the j-th encoded parameter of the i-th redundant task). According to the Round-Robin scheduler, task R1(1, 2, 3) is assigned to worker node W4 to update the parameters. k = 0, worker index =5, Δt=3.

[0055] like Figure 6 As shown in (d), upon entering the next time slice t=3, worker node W1 returns the calculation result to the master node, which stores the result in the result queue. Tasks X4 and X5 arrive at the master node, and according to the Round-Robin scheduler, task X4 is assigned to worker node W5, and parameters k=1 and worker are updated. index =1, assign task X5 to worker node W1 according to Round-Robin scheduling, and update parameter k=2, worker index =2, and simultaneously update the parameters Δt=4. After judgment, the condition for generating redundant tasks "Δt=4" is met. The current lagging task window contains (X2, X3, X4, X5). Perform a linear operation on all tasks in the lagging task window to generate redundant tasks, R2(2, 3, 4, 5) = W (2,2) ·X2+W (2,3) ·X3+W (2,4) ·X4+W (2,5) ·X5, according to the Round-Robin scheduler, assigns task R2(2,3,4,5) to worker node W2 to update parameters k=2, worker index =3, Δt=0.

[0056] like Figure 6As shown in (e), upon entering the next time slice t=4, worker node W2 returns the calculation result of task X2, worker node W4 returns the calculation result of task R1(1,2,3), worker node W5 returns the calculation result of task X4, and worker node W2 returns the calculation result of task R2(2,3,4,5). At this point, the task result queue contains the calculation results of tasks X1, X2, redundant task R1(1,2,3), X4, and redundant task R2(2,3,4,5). We can attempt to decode sequentially. Based on tasks X1, X2, redundant task R1(1,2,3), X4, and redundant task R2(2,3,4,5), the results of tasks X3 and X5 can be solved using the Gauss-Jordand elimination method.

[0057] like Figure 7 As shown, deep reinforcement learning is used to optimize two parameters (k, Δt) of the on-the-fly encoding strategy. The difficulty in optimizing the encoding strategy lies in two aspects: first, the runtime distribution of worker nodes in the system is unknown, and even if the distribution can be fitted, it is difficult to accurately estimate the distribution parameters; second, the on-the-fly encoding computation framework system, oriented towards computational task flows, differs from previous model-segmentation-based encoding computation frameworks, making it difficult to accurately model or evaluate the upper and lower bounds of the average task latency. Deep reinforcement learning, leveraging deep neural networks, can autonomously interact with the external environment and continuously update its decision-making strategy based on rewards obtained from the outside world. It has become an important method for solving various decision-making problems and has achieved great success in the fields of gaming, business, and robot control. This invention uses the Double Q-learning algorithm, employing two estimators (Double Q-learning) to compute the value function of Q-learning, overcoming the instability and poor performance of the Q-Learning algorithm due to large-scale overestimation of action values. Specifically, this involves separating the state and action to a certain extent, and adding value and advantage functions, which allows the network to converge faster when there are repeated states. The most important aspect of reinforcement learning is the setting of states, actions, and rewards; here, the state space is set up. Where m is the number of tasks waiting to be completed, n is the total number of completed tasks, and w is the number of source tasks completed. Action Space Where k and Δt are the timing for generating redundant tasks, and T mean This is the average task completion time. The immediate reward is r. t (s t a t ) = -m, the average time for long-term tasks is modeled as Where E represents expectation and T represents time. The network structure mainly consists of four layers: the first layer is the input layer, the second layer is the hidden layer, the third layer is divided into two parts, the advantage layer and the value layer, and the fourth layer is the output layer.

[0058] Deep reinforcement learning, through deep neural networks, enables master nodes to autonomously interact with a cluster of computing nodes, continuously updating on-the-fly encoding parameters by reducing average task latency.

[0059] This invention, through an on-the-fly encoding method and a round-robin scheduling method, not only mitigates the impact of lagging tasks under low loads but also significantly reduces queuing latency under high loads, thereby substantially reducing the system's average latency. Finally, by using reinforcement learning to adjust the parameters of the on-the-fly encoding strategy, it can better adapt to dynamically changing arrival rates and achieve even lower average task latency.

[0060] The present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the distributed on-the-fly architecture oriented towards computational task flows as described above. y The steps of the coding scheduling method.

[0061] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the distributed on-the-fly coded scheduling method for computational task flows as described above.

[0062] The present invention also provides a distributed on-the-fly coding scheduling system for computing task flows, including a master node and several worker nodes. The master node is configured to schedule computing tasks according to the distributed on-the-fly coding scheduling method for computing task flows according to the present invention. The worker nodes obtain computing tasks from their own task queues based on the assignment of the master node, run the computing tasks, and return them to the master node.

[0063] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0064] This invention is described with reference to flowchart illustrations of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each step in the flowchart, and combinations of steps in the flowchart, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the steps in the flowchart. Figure 1 A device for a function specified in one or more processes.

[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.

[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 Steps of a specified function in one or more processes.

[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A distributed on-the-fly coding scheduling method oriented towards computational task flow, characterized in that, The method includes the following steps: (1) The master node accepts the user's computing tasks and stores them in the waiting queue; (2) The master node determines whether to generate redundant tasks from the waiting queue according to the On-the-Fly encoding strategy. The On-the-Fly encoding strategy maintains a lag window, which contains currently unfinished tasks and is the source task for generating redundant tasks. The encoding parameters of the On-the-Fly encoding strategy are (k, ∆t), which represent the timing of generating redundant tasks. Here, k represents that after every k tasks arrive, a redundant task will be generated for all tasks in the lag window, and ∆t represents that after every ∆t time, a redundant task will be generated for all tasks in the lag window. (3) The master node performs encoding and sends the task to the worker node according to the scheduling policy; the encoding process of the master node includes: taking all computing tasks out of the lagging window queue; performing random linear encoding on all computing tasks; and sending them to the computing node in a round-robin manner; the round-robin sending method includes: the master node allocates the computing requests from the user and the generated redundant computing requests to the worker nodes in turn, starting from 1, until the number of internal worker nodes N is reached, and then restarts the loop from 1. (4) The master node receives the calculation results of the worker node and determines whether other calculation results can be decoded according to the On-the-Fly decoding strategy. The On-the-Fly decoding strategy determines whether a new source task can be decoded by traversing the redundant task numbers in turn and determining whether the rank of the encoding generation matrix is ​​one less than the number of tasks. The Gauss-Jord elimination method is used to obtain the source tasks that can be decoded. (5) The master node returns the calculation results to the user; (6) The master node optimizes the encoding parameters through deep reinforcement learning.

2. The method according to claim 1, characterized in that, In step (1), the master node pre-deploys the computing model on the worker nodes, while maintaining the connection and waiting for the user to send computing tasks, and caches them locally.

3. The method according to claim 1, characterized in that, The Gaussian-Jordan elimination method includes: In each iteration, the pivot is first found and then moved to the main diagonal of the matrix through row operations. Divide all elements in the row containing the pivot by the pivot, so that the pivot becomes 1; For other elements in the column containing the pivot, subtract the row containing the pivot from the row containing the pivot multiplied by the specified multiple, so that all other elements in the column containing the pivot, except the pivot, are reduced to 0. Repeat the above operations to transform the column containing the pivot into the form of an identity matrix.

4. The method according to claim 1, characterized in that, In step (6), deep reinforcement learning, with the help of deep neural networks, enables the master node to interact autonomously with the cluster of computing nodes and continuously update the On-the-Fly encoding parameters by reducing the average task latency.

5. The method according to claim 4, characterized in that, The deep reinforcement learning algorithm used is the Dueling DQN algorithm; the state of the deep reinforcement learning algorithm is (number of tasks, task service time, and task type not calculated); the action of the deep reinforcement learning algorithm is (k, ∆t); the reward of the deep reinforcement learning algorithm is the negative value of the length of the lagging queue.

6. A distributed on-the-fly coding scheduling system oriented towards computational task flow, characterized in that, It includes a master node and several worker nodes. The master node is configured to schedule computing tasks using the distributed on-the-fly coding scheduling method for computing task flow according to any one of claims 1-5. The worker nodes retrieve computing tasks from their own task queues based on the assignment from the master node, run the computing tasks, and return them to the master node.

7. A computer device, characterized in that, include: One or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the distributed on-the-fly coding scheduling method for computational task flows as described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the distributed on-the-fly coding scheduling method for computational task flows as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Fault tolerance method and system based on multi-master-node master-slave distributed architecture

    CN113505021A

  • Distributed computing method and system based on MDS coding and flexible scheduling strategy

    CN114756381A