Task allocation method and device, electronic equipment and computer program

Optimizing cloud edge task offloading through multi-agent Markov decision-making process and deep reinforcement learning solves the problem of low resource utilization in existing technologies, realizes efficient collaborative computing of tasks on the cloud edge, and improves overall performance and user experience.

CN118796441APending Publication Date: 2024-10-18CHINA MOBILE GROUP DESIGN INST +1
View PDF 0 Cites 12 Cited by

Patent Information

Application Number
CN202410321678.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-20
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing cloud edge task offloading technology ignores global information acquisition, resulting in low utilization of cloud server or edge node computing resources, resulting in resource waste.

Method used

By constructing a multi-agent Markov decision-making process and deep reinforcement learning, combined with task priority and offloading decisions, the collaborative computing of tasks at the cloud edge is optimized, and the computing resources, data transmission rate and task completion time are comprehensively considered to realize the task allocation strategy. Dynamic adjustment.

Benefits of technology

It improves the utilization efficiency of computing resources in the cloud-edge architecture, achieves the best balance between resource utilization and task priority, reduces task completion time, and improves system performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796441A_ABST
    Figure CN118796441A_ABST
Patent Text Reader

Abstract

The invention relates to a task allocation method and device, electronic equipment and a computer program. The task allocation method comprises the following steps: receiving a plurality of to-be-processed tasks, and obtaining priorities corresponding to the plurality of to-be-processed tasks respectively; obtaining computing resources respectively corresponding to the processing nodes at present; determining a target allocation strategy when the plurality of to-be-processed tasks are processed through each processing node according to the computing resources corresponding to each processing node at present and the priorities corresponding to the plurality of to-be-processed tasks; wherein the target allocation strategy is determined and obtained according to the total time consumption predicted when the multiple to-be-processed tasks are processed by the processing nodes; and distributing the plurality of to-be-processed tasks to each processing node for processing through the target distribution strategy. According to the method and the device, node allocation and calculation processing can be performed on the to-be-processed task by adopting the target allocation strategy which comprehensively considers the task priority and the global calculation resource, so that the utilization efficiency of the calculation resource is improved, and the optimal balance between resource utilization and the task priority is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a task allocation method, device, electronic device and computer program. Background Art

[0002] With the rapid development of IoT technology and big data computing, cloud-edge-device collaborative task offloading has become an important research direction in the field of computing offloading. Cloud-edge-device collaborative task offloading refers to the dynamic allocation of computing tasks between terminals, edge nodes, and cloud servers to optimize the task computing process. Through task offloading, terminals can share complex computing tasks with edge nodes or cloud servers, reducing energy consumption while achieving faster processing speeds.

[0003] In related technologies, artificial intelligence technology is usually integrated with task offloading models to develop an adaptive offloading decision mechanism. However, in practical applications, related technologies usually ignore the acquisition of global information by task offloading models, which affects the effectiveness and real-time performance of offloading strategies, and ultimately leads to low utilization of computing resources of cloud servers or edge nodes, resulting in a waste of resources. Summary of the invention

[0004] In view of this, exemplary embodiments of the present disclosure provide a task allocation method, apparatus, electronic device, and computer program product to solve the problems existing in the related art.

[0005] According to a first aspect of the exemplary embodiments of the present disclosure, a task allocation method is provided, the method comprising:

[0006] Receiving a plurality of tasks to be processed, and obtaining priorities corresponding to the plurality of tasks to be processed respectively;

[0007] Obtain the computing resources currently corresponding to each processing node;

[0008] According to the computing resources currently corresponding to each processing node and the priorities corresponding to the multiple tasks to be processed, a target allocation strategy for processing the multiple tasks to be processed by each processing node is determined; wherein the target allocation strategy is determined based on the predicted total time consumed when each processing node processes the multiple tasks to be processed;

[0009] The multiple tasks to be processed are allocated to the processing nodes for processing through the target allocation strategy.

[0010] According to a second aspect of the exemplary embodiments of the present disclosure, there is provided a task allocation device, the device comprising:

[0011] A data acquisition module, used for receiving a plurality of tasks to be processed, and acquiring priorities respectively corresponding to the plurality of tasks to be processed;

[0012] A data processing module is used to obtain the computing resources currently corresponding to each processing node;

[0013] The data processing module is further used to determine a target allocation strategy for processing the multiple tasks to be processed by each processing node according to the computing resources currently corresponding to each processing node and the priorities corresponding to the multiple tasks to be processed; wherein the target allocation strategy is determined according to the predicted total time consumed when each processing node processes the multiple tasks to be processed;

[0014] The data processing module is further used to allocate the multiple tasks to be processed to the processing nodes for processing through the target allocation strategy.

[0015] According to a third aspect of the exemplary embodiments of the present disclosure, there is provided an electronic device, including:

[0016] at least one processor;

[0017] A memory for storing at least one processor executable instruction; wherein at least one processor is used to execute the instruction to implement the steps of the above method.

[0018] According to a fourth aspect of the present disclosure, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method described in the exemplary embodiments of the present disclosure is implemented.

[0019] At least one of the above technical solutions adopted by the exemplary embodiment of the present disclosure can achieve the following beneficial effects: first, multiple tasks to be processed are received, and the priorities corresponding to the multiple tasks to be processed are obtained, and then the computing resources corresponding to each processing node in the cloud edge terminal architecture are obtained. Obtaining the priority of the tasks to be processed and the computing resources corresponding to each processing node can facilitate the subsequent effective allocation of computing tasks and make full use of all available computing resources. The priority of the tasks to be processed can ensure that urgent or large-scale tasks are given priority, thereby improving the overall system performance. Furthermore, according to the computing resources currently corresponding to each processing node and the priorities corresponding to the multiple tasks to be processed, the target allocation strategy for processing multiple tasks to be processed by each processing node is determined; wherein the target allocation strategy is determined based on the predicted total time consumed when each processing node processes multiple tasks to be processed. Finally, the multiple tasks to be processed are allocated to each processing node for processing through the target allocation strategy. Therefore, the target allocation strategy that comprehensively considers the task priority and global computing resources is adopted to perform node allocation and computing processing on the tasks to be processed, which can improve the utilization efficiency of computing resources in the cloud edge terminal architecture and achieve the best balance between resource utilization and task priority. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the exemplary embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 A flowchart of a multi-agent-based task allocation method provided as an example in the present disclosure;

[0022] Figure 2 A diagram of a cloud-edge-device collaboration architecture provided as an example of the present disclosure;

[0023] Figure 3 A flowchart of a task allocation method provided by an exemplary embodiment of the present disclosure;

[0024] Figure 4 A schematic block diagram of functional modules of a task allocation device provided by an exemplary embodiment of the present disclosure;

[0025] Figure 5 A schematic block diagram of a chip provided as an example in the present disclosure;

[0026] Figure 6 The present invention is an exemplary block diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0029] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0032] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0033] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0034] As an optional but non-limiting implementation, in response to receiving an active request from the user, the method of sending a prompt message to the user may be, for example, a pop-up window, in which the prompt message may be presented in text. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device. It is understandable that the above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0035] With the rapid development of IoT technology and big data computing, cloud-edge-device collaborative task offloading has become an important research direction in the field of computing offloading. Cloud-edge-device collaborative task offloading refers to the dynamic allocation of computing tasks between terminals, edge nodes, and cloud servers to optimize the task computing process. Through task offloading, terminals can share complex computing tasks to the edge or cloud, reducing energy consumption while achieving faster processing speeds and providing better service quality.

[0036] In related technologies, artificial intelligence technology is usually integrated into the decision-making process of cloud-edge task offloading to develop an intelligent and adaptive offloading decision-making mechanism. However, in actual applications, related technologies usually ignore the model's acquisition of global information, which affects the effectiveness and real-time performance of the offloading strategy, and ultimately leads to low utilization of cloud or edge computing resources and waste of resources.

[0037] Therefore, in order to solve the above problems, the exemplary embodiments of the present disclosure provide a task allocation method, which comprehensively considers factors such as the computing resources of the cloud edge, the data transmission rate between nodes, and the completion time of the task. According to the urgency of the task and the computational amount of the task, the task offloading problem is divided into two intelligent decision-making processes: priority decision and offloading decision. By constructing a multi-agent Markov decision process and combining deep reinforcement learning training, the collaborative computing of tasks on the cloud edge is reasonably allocated with the optimization goal of minimizing the task completion time.

[0038] For example, Figure 1 A flowchart of a multi-agent-based task allocation method provided as an example in the present disclosure.

[0039] like Figure 1 As shown, the multi-agent-based task allocation method may specifically include the following steps:

[0040] Step S110: Construct a cloud-edge collaborative task allocation model.

[0041] The cloud-edge-end collaborative architecture has M terminals, N edge computing nodes, and a cloud server. Among them, the terminal devices have certain computing capabilities, the edge nodes are equipped with computing resources, and the cloud servers have the strongest computing capabilities and the largest data storage capabilities, and are usually deployed in data centers. The cloud-edge-end collaborative architecture has both a vertical offloading mode (the offloading direction is from the low computing power layer to the high computing power layer) and a horizontal offloading mode (communication and collaborative computing between devices or servers at the same layer), and parallel computing can also be performed between edge nodes. The vertical offloading mode is suitable for processing tasks that are too complex for terminal devices. The horizontal offloading mode is suitable for distributed computing scenarios, and parallel computing can be used to optimize performance and response time. In order to ensure the timely completion of tasks, each task will be assigned a deadline when it is offloaded. Terminal devices, edge nodes, and cloud servers must consider this time limit when processing offloaded tasks.

[0042] For example, Figure 2 This is a diagram of a cloud-edge-device collaboration architecture provided as an example in the present disclosure. Figure 2 As shown, cloud-edge-end collaboration includes a cloud server (cloud layer), multiple edge computing nodes (edge ​​layer) and multiple terminals (user terminal layer).

[0043] Step S120: Establish a cloud-edge communication model and a computing model.

[0044] For example, a cloud-edge-end communication model can be constructed according to the Shannon formula to calculate the transmission rate on the wireless link when the task is offloaded to the edge node or cloud server. The cloud-edge-end communication model can be expressed by the following formula (1):

[0045]

[0046] Among them, B i,k represents the link bandwidth; lb represents the logarithm with base 2; p i Indicates the transmission power of the device; g i,k represents the channel gain, which is related to the distance between the terminal device and the edge device or cloud server and can be expressed as ω represents the path loss exponent; σ 2 Represents the noise power.

[0047] For computing tasks generated by the terminal, the computing will be performed on the terminal device itself or uploaded to the edge node and cloud server for computing. When the computing task is processed by the terminal device, the time required can be expressed by the following formula (2):

[0048]

[0049] Among them, f i terminalIndicates the computing power of the terminal device; d i Indicates the data size of the task, i∈{1,2,3,...,n}; c indicates that the CPU cycle calculates one bit of data.

[0050] When the terminal device offloads the task to the edge node, the delay of uploading the task to the edge device or cloud server can be expressed by the following formula (3):

[0051]

[0052] Among them, R i,k represents the transmission rate of the task on the wireless link; d i Indicates the data size of the task.

[0053] Considering the heterogeneity of edge nodes, the computing power of edge nodes can be defined as The computation time of the task on the edge device can be expressed by the following formula (4):

[0054]

[0055] in, Indicates the computing power of edge node devices; d i Indicates the data size of the task; c means that the CPU cycle calculates one bit of data.

[0056] When the terminal device offloads the task to the cloud server, the computing time of the task can be expressed by the following formula (5):

[0057]

[0058] Among them, f i cloud Indicates the computing power provided by the cloud server; d i Indicates the data size of the task; c means that the CPU cycle calculates one bit of data.

[0059] Step S130: constructing a method for determining task priority.

[0060] In a multi-agent cloud-edge collaborative task offloading environment, the way to determine task priorities directly affects the decision-making process of task offloading. During the task offloading process, the priority of tasks can be determined by their arrival time, processing time, and deadline.

[0061] The arrival time refers to the time when the task is submitted to the system. Generally speaking, the task that arrives first has a higher priority.

[0062] Processing time refers to the computing time required to complete a task. This depends on the complexity of the task and the device on which it is performed.

[0063] A deadline is the final time by which a task must be completed. Time-sensitive tasks usually have tighter deadlines and therefore have a higher priority.

[0064] Exemplarily, the priority determination criteria may include transmission delay and computational requirements. Transmission delay refers to the time it takes for a task to travel from the sender to the receiver in the network. Smaller delays mean that tasks can be processed more quickly, so such tasks can receive higher priority. Computational requirements refer to an assessment based on the complexity of the computational operations that the task needs to perform. Tasks with large computational requirements may need to be processed earlier in a resource-limited environment to avoid being unable to complete them before the deadline.

[0065] After determining the priority of the task, the system will allocate resources and offload tasks based on resource availability and task urgency. Tasks with high priority will be given priority to offloading to edge devices or cloud servers with sufficient resources.

[0066] For example, the priority status of a task within the deadline can be expressed by the following formula (6):

[0067]

[0068] in, represents the maximum time to complete the task; α represents a scaling factor; d i Indicates the data size of the task; c means that the CPU cycle calculates one bit of data.

[0069] Exemplarily, the task priority determination method also includes dynamic priority adjustment. Since the system state and task characteristics may change, such as the arrival of a new high-priority task or the processing speed of an existing task exceeds expectations, the task priority can be dynamically adjusted according to the actual situation.

[0070] In addition to transmission delay and computing requirements, priority criteria can also include the real-time requirements of the task. The higher the real-time requirements of the task, the higher the priority. For example, real-time video stream processing or urgent data analysis may require an immediate response.

[0071] The priority determination criteria also need to consider the dependencies between tasks. If there are dependencies between tasks, that is, the output of one task is the input of another task, in this case, the top task that resolves the dependency chain can be assigned a higher priority.

[0072] Prioritization criteria can also include user preferences and service level agreements. User or application specific preferences and service level agreements can also be incorporated into the priority decision process, such as tasks of paying users may be given higher priority.

[0073] Based on this, the method of determining task priorities can handle different tasks more intelligently and dynamically, ensuring efficient use of system resources and on-time completion of tasks.

[0074] Step S140: Binary decision is made to offload the task to an edge node or a cloud server.

[0075] In a cloud-edge-device collaborative environment, the task offloading decision determines whether the task is executed on the edge device or on the cloud server. This decision can be based on multiple factors such as resource availability, task characteristics and requirements, and network status.

[0076] Specifically, it can be assumed that the number of tasks executed in parallel on the edge device is m, and the number of tasks executed on the cloud server is n. It can indicate whether the task is executed on the edge device or on the cloud server. When determining the computing task, it is determined that the computing task occurs on the edge device.

[0077] Based on this, through task offloading decision-making, we can consider the task offloading problem more comprehensively, so as to make the best offloading decision between edge devices and cloud servers. This helps to achieve the optimal allocation of resources, improve task processing efficiency, and ensure service quality and user experience.

[0078] Step S150: construct an optimization problem with the goal of minimizing the computing task completion time.

[0079] For example, the objective function of the total time of cloud-edge task offloading can be expressed by the following formula (7):

[0080]

[0081] in, represents the start time of task i executing computation on the edge device; represents the start time of the computation of task i on the cloud server; Indicates the time required for the terminal device to calculate the task; Indicates the time required for edge devices to compute tasks; Indicates the time required for the cloud server to calculate the task.

[0082] It is necessary to constrain the task to be executed only on the edge device or cloud server node and ensure that the task must be completed within the deadline T i The above constraints can be expressed by the following formulas (8) and (9):

[0083]

[0084] Among them, when When , the computing task is executed on the edge device; when When , the computing tasks are executed on the cloud server.

[0085]

[0086] Among them, T i Indicates the deadline; represents the start time of task i executing computation on the edge device; represents the start time of the computation of task i on the cloud server; Indicates the time required for the terminal device to calculate the task; Indicates the time required for edge devices to compute tasks; Indicates the time required for the cloud server to calculate the task.

[0087] for and To ensure that computing tasks occur on edge nodes or cloud servers, it is necessary to ensure that all tasks are uploaded to the edge nodes or cloud servers. This step can be expressed by the following formulas (10) and (11):

[0088]

[0089]

[0090] in, Indicates delay; represents the start time of task i executing computation on the edge device; Indicates the start time of task i's computation on the cloud server.

[0091] Step S160: Construct a multi-agent Markov decision process.

[0092] For example, a multi-agent Markov decision process (MMDP) can be used as a decision framework for cloud-edge collaborative offloading. The construction of the multi-agent Markov decision process mainly includes two main agents: the task priority sub-problem and the offloading decision sub-problem. The construction of the multi-agent Markov decision process can include the following steps:

[0093] Step S161: Define system status.

[0094] Exemplarily, the system state can be expressed by the following formula (12):

[0095]

[0096] in, Indicates the task priority system status; Indicates the uninstall decision system status.

[0097] Step S162: Define the system status of the task priority.

[0098] For example, the system status of task priority at time t It can be expressed by the following formula (13):

[0099]

[0100] Among them, et i ,i∈{1,2,...,n} represents the expected completion time of the task; F i represents the remaining time of the task within the constraint of time step t; I i Record whether the task is scheduled to time step t.

[0101] The estimated completion time of a task can be predicted based on historical data, task type, resource status, etc. The remaining time of a task can be calculated in real time based on the current execution progress and resource usage after the task starts executing. The task can be scheduled to a certain time step based on the records of the task scheduling system.

[0102] Step S163: define the system status of the uninstallation decision.

[0103] For example, the system state at time t for the offloading decision It can be expressed by the following formula (14):

[0104]

[0105] Among them, bt i0 and pt i0 They represent the start time and processing time of the task on the terminal device; bt i1 and pt i1 They represent the start time and processing time of the task at the edge node respectively; bt i2 and pt i2 They represent the start time and processing time of the task on the cloud service, respectively.

[0106] Step S164: Define the action space.

[0107] The action space represents the actions that the agent can take, which includes two parts: task priority action space and offloading decision action space. The task priority action space represents the adjustment strategy of task priority, for example, increasing or decreasing the priority of a task. The offloading decision action space represents the decision of whether the task is offloaded to the edge node or cloud server.

[0108] For example, the action space can be expressed by the following formula (15):

[0109] A t =(a p ,a u ) (15)

[0110] Among them, a p =(1,2,...,n) represents the task priority action space; a u =(0,1) represents the offloading decision action space, which determines whether the task is offloaded to the edge node or the cloud server.

[0111] Step S165: Define a reward function.

[0112] The reward function defines the immediate reward obtained when the agent takes an action. The optimization goal in the task allocation problem is to minimize the time to complete the computational task. The reward function can be expressed by the following formula (16):

[0113] R t (S t ,A t )=ct i (16)

[0114] Among them, S t Indicates system status; A t represents the action space; ct i represents the completion time of task i.

[0115] The reward function is designed to encourage the agent to choose actions that can complete the task the fastest. Using the feedback of the reward function, the agent updates the parameters of its decision-making process through a learning algorithm to optimize future action selection.

[0116] Based on this, the multi-agent Markov decision process is constructed to enable each agent to optimize the performance of the entire system through its own decision-making, that is, to complete the task as quickly as possible in the cloud-edge collaborative offloading environment. Through continuous iteration and learning, the agent can gradually find the optimal strategy based on the current state and expected rewards to achieve the best effect of task offloading.

[0117] Step S170: Model training and solving the shortest completion time problem.

[0118] Based on the above step S160, a cloud-edge-device collaborative offloading model based on deep reinforcement learning and the training process of the model are proposed in this step. The reinforcement learning goal of the cloud-edge-device collaborative offloading model is to maximize the long-term utility of the system state at time t.

[0119] For example, the cumulative reward function at time t can be expressed by the following formula (17):

[0120]

[0121] Among them, R t+i represents the reward function; γ represents the discount factor, which is used to balance future rewards and current rewards.

[0122] Due to the uncertainty of state transition and action space, it is difficult to obtain U in the current time slot. t In this step, uncertainty can be eliminated by Markov decision making and expectation seeking to obtain a value function that is only related to the state and action of the current time slot. This step can be expressed by the following formula (18):

[0123]

[0124] Among them, U t represents the cumulative return function at time t; S t Indicates system status; A t represents the action space; E represents the expectation operator.

[0125] Solving the reinforcement learning problem requires finding an optimal strategy. We can assume that the action corresponding to the maximum Q value is the optimal strategy. This step can be expressed by the following formulas (19) and (20):

[0126] a t = argmaxQ * (s t ,a t ) (19)

[0127]

[0128] Among them, s t represents the system state at time t; a t represents the action space at time t; s t+1 represents the system state at time t+1; a t+1 represents the action space at time t+1; γ represents the discount factor; Represents the expectation operator.

[0129] According to the dynamic programming equation, the relationship between the action value at time t and time t+1 can be obtained as shown in the following formula (21):

[0130]

[0131] Among them, R t represents the reward function; s t represents the system state at time t; a t represents the action space at time t; s t+1 represents the system state at time t+1; a t+1 represents the action space at time t+1; γ represents the discount factor; Represents the expectation operator.

[0132] The training of the DDQN model involves two neural networks: the main network and the target network, both of which have the same neural network structure. The main network selects the maximum action a*=argmaxQ for the next state Q value π (s t+1 ,a t+1 ,ω), the target network obtains the Q value of action a*, that is, ω indicates that the main network and the target network have different parameters.

[0133] Exemplarily, the model training process is as follows:

[0134] Input: state space, action space, discount rate, update frequency C;

[0135] Initialize the main network parameters ω;

[0136] Initialize the target network parameters ω*;

[0137] Initialize the experience pool with a capacity of N;

[0138] 1. Reset the initial time slot t←0;

[0139] 2. Initialize the state space s t ;

[0140] 3. t As Q value input, use ε-greedy to select action a t ;

[0141] 4. In state s t Next, perform action a t , returns s t+1 Status, Reward t ;

[0142] 5. The four-tuple {s t ,a t ,r t ,s t+1}Put it into experience pool N

[0143] 6. Sample q samples from N and calculate the value of the target network

[0144]

[0145] 7. Construct loss function to train neural network;

[0146] 8.s t ←s t+1 ;

[0147] 9. Update the target network parameter ω*=ω every C steps;

[0148] 10. If s t If it is a terminal state, the model training ends.

[0149] Output: Neural network model parameters

[0150] Exemplarily, the loss function of model training can be expressed by the following formula (22):

[0151]

[0152] Where q represents the number of samples sampled in the experience pool; R i represents the reward function; s i represents the system status at time i; a i represents the action space at time i; s i+1 represents the system state at time i+1; a i+1 represents the action space at time i+1; γ represents the discount factor; ω represents the main network parameter.

[0153] One or more technical solutions provided in the exemplary embodiments of the present disclosure optimize the execution efficiency of computing tasks through an intelligent decision-making process. First, a task allocation model for the cloud edge is established, taking into account resource distribution and communication as well as computing power. Then, by determining the task priority, a binary decision is used to choose to offload the task to the edge node or cloud server. The goal is to construct an optimization problem centered on minimizing the task completion time, use a multi-agent Markov decision process to solve the problem, and train the model through deep reinforcement learning. This collaborative task offloading method fully integrates key factors such as the dynamic resource information of the cloud edge environment, the transmission rate between nodes, and the task completion time. By decomposing the task offloading problem into two decision-making processes of priority and offloading, efficient collaboration of computing tasks at the cloud edge is achieved.

[0154] Therefore, the task allocation method provided in the exemplary embodiment of the present disclosure can achieve optimal resource allocation through multi-agent collaboration, dynamically adapt to complex cloud-edge environments, solve the technical problem of incomplete model acquisition of global information, effectively reduce the overall task completion time, and at the same time improve the overall performance of the system and the user's service experience.

[0155] Based on the above embodiments, the present disclosure also provides a task allocation method: Figure 3 A flowchart of a task allocation method provided by an exemplary embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the method may include the following steps:

[0156] Step S310: receiving a plurality of tasks to be processed, and obtaining respective priorities corresponding to the plurality of tasks to be processed.

[0157] In an embodiment, a terminal generates or receives a plurality of pending tasks. Each pending task may include data and execution instructions necessary to complete the work. These pending tasks may be submitted manually by a user, or automatically generated and sent to the terminal by various applications, sensors, and devices. After receiving the pending tasks, priority information associated with each pending task also needs to be obtained. Priority is generally determined based on the urgency, importance, expected completion time, or specific business logic requirements of the pending tasks. For example, tasks with high real-time requirements are given higher priorities to ensure rapid response.

[0158] Step S320: Obtain the computing resources currently corresponding to each processing node.

[0159] In an embodiment, each processing node may be a processing node at each level in a cloud-edge-end collaborative architecture. The cloud-edge-end collaborative architecture may have M terminals, N edge computing nodes, and a cloud server. The terminal devices have certain computing capabilities, the edge nodes are equipped with computing resources, and the cloud servers have the strongest computing capabilities and the largest data storage capabilities, and are usually deployed in data centers. Computing resources may include information such as the CPU performance, available memory, storage space, and network bandwidth of each node.

[0160] Obtaining the computing resources currently corresponding to each processing node can ensure that the distributed resources can be fully utilized in subsequent task allocation, balance the load, and improve the overall processing efficiency.

[0161] Step S330: According to the computing resources currently corresponding to each processing node and the priorities corresponding to the multiple tasks to be processed, determine the target allocation strategy when each processing node processes the multiple tasks to be processed, wherein the target allocation strategy is determined based on the predicted total time consumed when each processing node processes the multiple tasks to be processed.

[0162] In an embodiment, the target allocation strategy can be determined based on the computing resources of each processing node and the priority of the task to be processed. Specifically, the target allocation strategy can be determined by using the shortest job first, polling scheduling or priority-based scheduling algorithm. The scheduling algorithm predicts the total time required to complete all tasks under different resource allocation conditions. The total time required may include the computing time required for the task to be processed, the time required to transmit data between processing nodes, and possible queuing delays. Then, the solution with the shortest predicted time or the lowest system load is selected as the target allocation strategy.

[0163] When developing a target allocation strategy, we need to consider the collaboration between different nodes to ensure that urgent tasks are assigned to the node with the fastest response speed. At the same time, we need to balance the load of each node to avoid overloading some nodes and affecting the overall performance. The final target allocation strategy should be able to minimize the total time consumption of the task and meet the priority requirements of all tasks.

[0164] Step S340: Allocate multiple tasks to be processed to each processing node for processing through the target allocation strategy.

[0165] In the embodiment, according to the target allocation strategy, the tasks to be processed are allocated to the corresponding processing nodes. After the tasks are allocated, each node starts to execute the tasks according to its own computing resources. The system also needs to monitor the execution status of the tasks so that the tasks can be quickly reallocated when any node fails or delays. In addition, the system may need to collect execution feedback and resource utilization in real time so as to dynamically adjust the allocation strategy.

[0166] Based on this, by receiving multiple tasks to be processed and obtaining the priorities corresponding to the multiple tasks to be processed, the computing resources corresponding to each processing node in the cloud-edge-end architecture are obtained. Obtaining the priorities of the tasks to be processed and the computing resources corresponding to each processing node can facilitate the subsequent effective allocation of computing tasks and make full use of all available computing resources. The priority of the tasks to be processed can ensure that urgent or computationally intensive tasks are given priority, thereby improving the overall system performance. Furthermore, according to the computing resources currently corresponding to each processing node and the priorities corresponding to the multiple tasks to be processed, the target allocation strategy for processing multiple tasks to be processed by each processing node is determined; wherein the target allocation strategy is determined based on the predicted total time consumed when each processing node processes multiple tasks to be processed. Finally, the multiple tasks to be processed are allocated to each processing node for processing through the target allocation strategy. Therefore, the target allocation strategy that comprehensively considers the task priority and global computing resources is used to allocate nodes and perform computing processing on the tasks to be processed, which can improve the utilization efficiency of computing resources in the cloud-edge-end architecture and achieve the best balance between resource utilization and task priority.

[0167] Based on the above embodiment, in another embodiment provided by the present disclosure, the above task allocation method may further include:

[0168] According to computing resources and priorities, multiple tasks to be processed are assigned processing nodes to obtain multiple preset allocation strategies;

[0169] Predict the total time consumption corresponding to each preset allocation strategy;

[0170] The preset allocation strategy with the shortest total time consumption is determined as the target allocation strategy.

[0171] In the embodiment, it is first necessary to collect the computing resource information of each processing node and the priority of the task to be processed. The computing resource information may include indicators such as a central processing unit, storage size, and network bandwidth. According to the computing resources of each processing node and the priority of the task to be processed, a plurality of preset allocation strategies are generated. Each preset allocation strategy is used to specify the processing node to which each task to be processed is allocated.

[0172] Then, each preset allocation strategy is simulated to estimate the total time required to complete all pending tasks. This prediction process needs to take into account factors such as the dependencies between pending tasks, the computing resources of each processing node, and the network transmission speed.

[0173] Finally, by comparing the total time consumption of each preset allocation strategy, the strategy with the shortest total time consumption is selected as the target allocation strategy.

[0174] Based on this, by comprehensively considering computing resources and task priorities, it is possible to ensure that urgent tasks are processed in a timely manner while maximizing the resource utilization of nodes. In addition, predicting the total time consumption of each allocation strategy and selecting the best solution can help shorten the task completion time and improve the response speed and throughput of the entire system.

[0175] Based on the above embodiment, in another embodiment provided by the present disclosure, the above prediction of the total time consumption corresponding to each preset allocation strategy may specifically include:

[0176] Obtaining transmission time consumptions corresponding to the plurality of tasks to be processed respectively; the transmission time consumption is determined according to a preset allocation strategy and the transmission data volumes corresponding to the plurality of tasks to be processed respectively;

[0177] Obtaining the computational time corresponding to the plurality of tasks to be processed respectively; the computational time is determined according to the computational resources of the target processing node and the computational amount corresponding to the plurality of tasks to be processed respectively; the target processing node is a processing node used for computing and processing the tasks to be processed in a preset allocation strategy;

[0178] The total time is determined based on the transmission time and the calculation time.

[0179] In the embodiment, the computational amount corresponding to each task to be processed can be obtained by first collecting basic information of the task to be processed. The computational amount can be estimated by factors such as the complexity of the task and the size of the input data.

[0180] Then, the data transmission time can be estimated based on the computational workload of each task to be processed and the preset task allocation strategy. In a distributed system, the transmission of a task from one node to another usually involves network transmission, and its time consumption depends on the amount of data and network bandwidth. The estimation of transmission time needs to consider parameters such as the current network status, packet size, and network latency.

[0181] Furthermore, the computing resource information of the target processing node can be obtained, including the processor speed, memory size, read / write capability, etc. of the target processing node. The computing time is then estimated based on the computing resources of the target processing node and the computing amount of the task to be processed.

[0182] Finally, add the data transmission time and the computation time to get the total time of each pending task. Traverse each preset allocation strategy and predict the total time of all pending tasks under the strategy. By comparing the total time under different strategies, you can choose the strategy with the shortest total time to execute the pending task.

[0183] Based on this, by comprehensively considering the data transmission and total computing time, the performance of different preset allocation strategies is automatically predicted and compared to select the optimal task allocation decision. In this way, the load can be effectively balanced, the task completion time can be reduced, and the overall throughput of the system can be improved.

[0184] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S310 may include:

[0185] Obtain the task deadlines and computational amounts corresponding to multiple pending tasks;

[0186] The priority of each task to be processed is determined according to the task deadline and the computational effort. The task deadline is negatively correlated with the priority, and the computational effort is positively correlated with the priority.

[0187] In an embodiment, the priorities of multiple pending tasks can be determined according to their respective corresponding task deadlines and computational loads. The task deadline refers to the final time point at which the task must be completed. For pending tasks, the closer the task deadline is to the current time, the higher its corresponding priority; the farther the task deadline is from the current time, the lower its corresponding priority. The computational load requirement refers to the evaluation based on the complexity of the computational operations required for the task.

[0188] For tasks to be processed, tasks with large computational workload need to be processed earlier in an environment with limited resources to avoid being unable to complete them before the deadline. Therefore, the tasks with large computational workload have higher corresponding priorities.

[0189] Exemplarily, the priority status within the task deadline can be expressed by the above formula (5).

[0190] In an optional manner, the arrival time and processing time of the tasks to be processed may also be used to determine their priorities.

[0191] The arrival time refers to the time when the task is submitted to the system. Generally speaking, the task that arrives first has a higher priority.

[0192] Processing time refers to the computing time required to complete a task. This depends on the complexity of the task and the device on which it is performed.

[0193] Exemplarily, the computational amount corresponding to the task to be processed can be determined by the computational time of different processing nodes. The computational time required for processing on the terminal device can be expressed by the above formula (2), the computational time required for processing on the edge device can be expressed by the above formula (4), and the computational time required for processing on the cloud server can be expressed by the above formula (5).

[0194] Based on this, effective resource allocation and time management can be achieved by determining task priorities by comprehensively considering the deadline and computational effort of the task. Considering the deadline ensures that urgent pending tasks are given priority, reducing the risk of delays and failure to complete on time. Considering the computational effort ensures that resource-intensive pending tasks can start in a timely manner, avoiding congestion caused by long processing times. In addition, incorporating arrival time and processing time into priority decisions further optimizes task scheduling and ensures more fair and efficient resource use. This prioritization method not only improves the user experience, but also significantly improves the performance and responsiveness of the entire system.

[0195] Based on the above embodiment, in another embodiment provided by the present disclosure, the above step S310 may further include:

[0196] Predicting the transmission time of each task to be processed during the data transmission process according to the calculation amount corresponding to each task to be processed;

[0197] The priority of the task to be processed is determined according to the transmission time and the amount of calculation; the transmission time is negatively correlated with the priority, and the amount of calculation is positively correlated with the priority.

[0198] In an embodiment, the priority determination criteria may include transmission time and computational complexity. The transmission time refers to the time taken for the task to be processed to travel from the sending end to the receiving end in the network. A shorter transmission time means that the task can be processed more quickly, so such a task to be processed can be given a higher priority. The computational complexity refers to an evaluation based on the complexity of the computational operations required for the task to be processed. A task to be processed with a large computational complexity may need to be processed earlier in an environment with limited resources to avoid being unable to be completed before the deadline.

[0199] In the embodiment, when the terminal device offloads the to-be-processed task to the edge node, the transmission time consumed for uploading the to-be-processed task to the edge device or the cloud server can be expressed by the above formula (3).

[0200] Based on this, using transmission time and computing power as key factors for priority determination can ensure that pending tasks with high data transmission efficiency can be quickly started, thereby shortening the overall job completion time. Secondly, considering computing power as part of the priority ensures that those computing-intensive tasks can enter the queue for processing in advance, avoiding the risk of task overdue due to long processing time. In addition, adjusting task priority according to transmission time and computing power can adapt to changing network conditions and computing needs, which helps to balance the load of the cloud-edge architecture as a whole, avoiding the situation where some nodes are overloaded while other nodes are idle, thereby improving the overall utilization of system resources.

[0201] Based on the above embodiment, in another embodiment provided by the present disclosure, predicting the total time consumption corresponding to each preset allocation strategy may further include:

[0202] Construct a task allocation decision model;

[0203] Input computing resources and priorities into the trained task allocation decision model, allocate processing nodes to multiple tasks to be processed, and obtain multiple preset allocation strategies;

[0204] Traverse each preset allocation strategy, and obtain the score corresponding to each preset allocation strategy according to the value function in the task allocation decision model;

[0205] The preset allocation strategy with the highest score is determined as the target allocation strategy.

[0206] In an embodiment, a multi-agent Markov decision process may be used as a task allocation decision model. The multi-agent Markov decision process is suitable for describing and solving the problem of multiple agents making decisions in an environment according to their respective states, where the decisions of the agents influence each other.

[0207] In the multi-agent Markov decision model, each processing node can be regarded as an agent, their computing resources are part of their state, and the priority of tasks is a reflection of the state of the environment. The goal of the agent is to maximize the long-term benefit by allocating tasks, where the benefit is evaluated by the value function.

[0208] The value function is a function that evaluates the expected benefit of an agent taking a specific action in a specific state. It can be set based on the urgency of the task, the matching degree of computing resources, and the computational amount of the task. The value function may take into account multiple factors, such as the time efficiency of task completion, resource utilization, and the overall load balance of the system.

[0209] In the task allocation process, the multi-agent Markov decision model first receives the state input of the current environment, that is, the computing resource status of each processing node and the priority information of multiple tasks to be processed. The trained multi-agent Markov decision model will output a series of possible task allocation strategies. These strategies are a set of actions that the agent may take in a specific state.

[0210] After that, we traverse these preset allocation strategies and use the value function to score each strategy to evaluate its possible long-term benefits. Finally, we select the strategy with the highest score as the target allocation strategy, that is, the task allocation plan that is most likely to achieve the best long-term effect under the current state.

[0211] Exemplarily, the multi-agent Markov decision process may include the above steps S161-S165. The value function may be expressed by the above formula (18).

[0212] Exemplarily, constructing the task allocation decision model may also include determining to offload the task to an edge node or a cloud server through a binary decision.

[0213] Specifically, the target allocation strategy determines whether the pending tasks are executed on the edge device or on the cloud server. It can be assumed that the number of pending tasks executed in parallel on the edge device is m, and the number of pending tasks executed on the cloud server is n. It can indicate whether the task to be processed is executed on the edge node or on the cloud server. When , it is determined that the task to be processed occurs on the edge node.

[0214] Based on this, the target allocation strategy can more comprehensively consider the allocation of pending tasks, so as to make the best offloading decision between edge devices and cloud servers. This helps to achieve the optimal allocation of resources, improve task processing efficiency, and ensure service quality and user experience.

[0215] Exemplarily, constructing the task allocation decision model may also include constructing an optimization problem with the goal of minimizing the computing task completion time.

[0216] Exemplarily, the objective function of the total time consumption of the tasks to be processed can be expressed by the above formula (7).

[0217] When you need to constrain tasks to be executed only on edge nodes or cloud server nodes, you also need to ensure that the tasks must be completed within the deadline T i The above constraints can be expressed by the above formulas (8) and (9).

[0218] In order to ensure that computing tasks occur on edge nodes or cloud servers, it is necessary to ensure that all tasks are uploaded to the edge nodes or cloud servers. This step can be achieved through the above formulas (10) and (11).

[0219] Based on this, the use of a multi-agent Markov decision model enables each agent to optimize the performance of the entire system through its own decisions, that is, to complete the task as quickly as possible in a cloud-edge collaborative offloading environment. Secondly, using the value function for policy evaluation can ensure that the selected allocation strategy can bring the greatest benefit in the long run, not just in the short term. This helps avoid over-focusing on urgent tasks and ignoring resource utilization and system stability.

[0220] Based on the above embodiment, in another embodiment provided by the present disclosure, the training process of the above task allocation decision model may specifically include:

[0221] Get the initial state of the preset model before training;

[0222] Input the training sample into the preset model for training, and obtain the training state of the preset model after training; the training sample includes the initial state, the initial allocation strategy and the score corresponding to the initial allocation strategy; the score corresponding to the initial allocation strategy is calculated according to the value function in the preset model;

[0223] The parameters in the preset model are updated according to the loss value between the initial state and the training state, and the updated preset model is determined as the task allocation decision model after training.

[0224] In the embodiment, the purpose of training the task allocation decision model is to find a target allocation strategy that can maximize the system benefit. First, an initial allocation strategy is defined, and at the same time, an initial value function is set, which can assign a score to each possible allocation strategy according to the current system state. This score represents the expected benefit of adopting the strategy.

[0225] Before presetting the model, you need to obtain the initial state before training. The initial state reflects the changes in the task priority state and unloading decision state of the preset model before training. The task priority state refers to the priority ranking of each task in the system, while the unloading decision state refers to whether the current task is processed at the terminal or has been unloaded to other nodes.

[0226] When the initial allocation strategy is executed, the task allocation decision model will enter the training state. The training state reflects the changes in the task priority state and offloading decision state of the model after the initial allocation strategy is executed.

[0227] After obtaining the training state, the value function is used to evaluate the score obtained by executing the current initial allocation strategy. This score is based on the training state and the initial value function parameters, which represents the sum of the immediate benefit of adopting the current allocation strategy plus the expected future benefits.

[0228] Furthermore, based on the training state and this score, a reinforcement learning algorithm, such as Q-learning, temporal difference learning, or deep reinforcement learning, can be used to update the parameters of the value function, thereby reducing the gap between the expected return and the actual return, that is, the error between the score predicted by the value function and the score actually obtained by executing the strategy.

[0229] After multiple iterations, the parameters of the value function will gradually converge, the value function can accurately reflect the long-term benefits of different allocation strategies, and the predictions of the task allocation decision model will become more and more accurate, so that a trained task allocation decision model can be determined, which can provide target allocation strategies for different system states.

[0230] Specifically, the training process of the task allocation decision model can refer to the above step S170.

[0231] Based on this, during the training process of the task allocation decision model, the parameters of the value function are constantly updated, and the task allocation decision model can more accurately capture the complex relationship between task priority and offloading decision status. This adaptive capability enables the task allocation decision model to make target allocation strategies under various workloads and computing resource states, thereby improving the immediate task allocation efficiency and improving long-term resource utilization and task processing performance.

[0232] One or more technical solutions provided in the exemplary embodiments of the present disclosure optimize the execution efficiency of computing tasks through an intelligent decision-making process. First, a task allocation model for the cloud edge is established, taking into account resource distribution and communication as well as computing power. Then, by determining the task priority, a binary decision is used to choose to offload the task to the edge node or cloud server. The goal is to construct an optimization problem centered on minimizing the task completion time, use a multi-agent Markov decision process to solve the problem, and train the model through deep reinforcement learning. This collaborative task offloading method fully integrates key factors such as the dynamic resource information of the cloud edge environment, the transmission rate between nodes, and the task completion time. By decomposing the task offloading problem into two decision-making processes of priority and offloading, efficient collaboration of computing tasks at the cloud edge is achieved.

[0233] Therefore, the task allocation method provided in the exemplary embodiment of the present disclosure can achieve optimal resource allocation through multi-agent collaboration, dynamically adapt to complex cloud-edge environments, solve the technical problem of incomplete model acquisition of global information, effectively reduce the overall task completion time, and at the same time improve the overall performance of the system and the user's service experience.

[0234] The above mainly introduces the solutions provided by the exemplary embodiments of the present disclosure. It is understandable that in order to implement the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.

[0235] The exemplary embodiments of the present disclosure can divide the functional units of the electronic device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the exemplary embodiments of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0236] In the case of dividing each functional module according to each function, an exemplary embodiment of the present disclosure provides a task allocation device, which may be a server or a chip applied to a server. Figure 4This is a schematic block diagram of the functional modules of a task allocation device provided by an exemplary embodiment of the present disclosure. Figure 4 As shown, the task allocation device 400 includes:

[0237] The data acquisition module 410 is used to receive a plurality of tasks to be processed and obtain the priorities respectively corresponding to the plurality of tasks to be processed;

[0238] The data processing module 420 is used to obtain the computing resources currently corresponding to each processing node;

[0239] The data processing module 420 is further configured to determine a target allocation strategy for processing the multiple tasks to be processed by each processing node according to the computing resources currently corresponding to each processing node and the priorities corresponding to the multiple tasks to be processed; wherein the target allocation strategy is determined according to the total time consumed by each processing node when processing the multiple tasks to be processed;

[0240] The data processing module 420 is further configured to allocate the plurality of tasks to be processed to the processing nodes for processing according to the target allocation strategy.

[0241] In another embodiment provided in the present disclosure, the data processing module 420 is also used to allocate processing nodes to the multiple tasks to be processed according to the computing resources and the priority, and obtain multiple preset allocation strategies; predict the total time corresponding to each preset allocation strategy; and determine the preset allocation strategy with the shortest total time as the target allocation strategy.

[0242] In another embodiment provided by the present disclosure, the data processing module 420 is also used to obtain the transmission time corresponding to the multiple tasks to be processed respectively; the transmission time is determined according to the preset allocation strategy and the transmission data volume corresponding to the multiple tasks to be processed respectively; obtain the calculation time corresponding to the multiple tasks to be processed respectively; the calculation time is determined according to the computing resources of the target processing node and the calculation volume corresponding to the multiple tasks to be processed respectively; the target processing node is the processing node used to perform calculation processing on the tasks to be processed in the preset allocation strategy; the total time is determined according to the transmission time and the calculation time.

[0243] In another embodiment provided by the present disclosure, the data processing module 420 is also used to obtain the task deadline times and computational amounts corresponding to the multiple tasks to be processed respectively; determine the priorities corresponding to each task to be processed according to the task deadline times and the computational amounts; the task deadline times are negatively correlated with the priority levels, and the computational amounts are positively correlated with the priority levels.

[0244] In another embodiment provided by the present disclosure, the data processing module 420 is further used to predict the transmission time of each task to be processed in the data transmission process according to the calculation amount corresponding to each of the multiple tasks to be processed;

[0245] The priority corresponding to the task to be processed is determined according to the transmission time consumption and the calculation amount; the transmission time consumption is negatively correlated with the priority, and the calculation amount is positively correlated with the priority.

[0246] In another embodiment provided by the present disclosure, the data processing module 420 is also used to construct a task allocation decision model;

[0247] The computing resources and the priority are input into the trained task allocation decision model, and the processing nodes are allocated to the multiple tasks to be processed to obtain multiple preset allocation strategies; each preset allocation strategy is traversed, and the scores corresponding to each preset allocation strategy are obtained according to the value function in the task allocation decision model; and the preset allocation strategy with the highest score is determined as the target allocation strategy.

[0248] In another embodiment provided by the present disclosure, the data processing module 420 is also used to obtain the initial state of the preset model before training; input the training sample into the preset model for training to obtain the training state of the preset model after training; the training sample includes the initial state, the initial allocation strategy and the score corresponding to the initial allocation strategy; the score corresponding to the initial allocation strategy is calculated according to the value function in the preset model; the parameters in the preset model are updated according to the loss value between the initial state and the training state, and the updated preset model is determined as the task allocation decision model after training.

[0249] Figure 5 Schematic block diagram of a chip provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, the chip 500 includes one or more (including two) processors 501 and a communication interface 502. The communication interface 502 can support the server to perform the data sending and receiving steps in the above method, and the processor 501 can support the server to perform the data processing steps in the above method.

[0250] Optional, such as Figure 5 As shown, the chip 500 also includes a memory 503, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory (NVRAM).

[0251] In some embodiments, Figure 5As shown, the processor 501 performs corresponding operations by calling the operation instructions stored in the memory (the operation instructions may be stored in the operating system). The processor 501 controls the processing operations of any one of the terminal devices, and the processor may also be called a central processing unit (CPU). The memory 503 may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory 503 may also include NVRAM. For example, in an application, the memory, the communication interface, and the memory are coupled together through a bus system, wherein the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, in Figure 5 Various buses are labeled as bus system 504 .

[0252] The method disclosed in the above-mentioned embodiment of the present disclosure can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiment of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware.

[0253] The exemplary embodiment of the present disclosure also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to cause the electronic device to perform the method according to the embodiment of the present disclosure when executed by the at least one processor.

[0254] The exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform the method according to the embodiments of the present disclosure.

[0255] The exemplary embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform the method according to the embodiments of the present disclosure.

[0256] Figure 6 The block diagram of the electronic device provided as an example of the present disclosure, the block diagram of the electronic device 600 that can be used as the server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0257] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0258] A plurality of components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to the electronic device 600, and the input unit 606 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 607 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 608 may include, but is not limited to, a disk, an optical disk. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0259] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above. Each of the methods described above may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609.

[0260] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0261] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0262] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0263] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0264] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0265] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0266] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).

[0267] Although the present disclosure has been described in conjunction with specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present disclosure. Accordingly, this specification and the drawings are merely exemplary illustrations of the present disclosure as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present disclosure. Obviously, those skilled in the art may make various modifications and variations to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A task allocation method, characterized in that: The method comprises: Receiving a plurality of tasks to be processed, and obtaining priorities corresponding to the plurality of tasks to be processed respectively; Obtain the computing resources currently corresponding to each processing node; According to the computing resources currently corresponding to each processing node and the priorities corresponding to the plurality of tasks to be processed, a target allocation strategy for processing the plurality of tasks to be processed by each processing node is determined; wherein the target allocation strategy is determined based on the predicted total time consumed when each processing node processes the plurality of tasks to be processed; The multiple tasks to be processed are allocated to the processing nodes for processing through the target allocation strategy.

2. The method according to claim 1, characterized in that The method further comprises: Allocating processing nodes to the multiple tasks to be processed according to the computing resources and the priorities to obtain multiple preset allocation strategies; Predict the total time consumption corresponding to each preset allocation strategy; The preset allocation strategy with the shortest total time consumption is determined as the target allocation strategy.

3. The method according to claim 2, characterized in that The predicting of the total time consumption corresponding to each preset allocation strategy includes: Acquire the transmission time consumption corresponding to the plurality of tasks to be processed respectively; the transmission time consumption is determined according to the preset allocation strategy and the transmission data volume corresponding to the plurality of tasks to be processed respectively; Obtaining the computational time consumptions respectively corresponding to the plurality of tasks to be processed; the computational time consumption is determined according to the computational resources of the target processing node and the computational amount respectively corresponding to the plurality of tasks to be processed; the target processing node is the processing node used in the preset allocation strategy to perform computational processing on the tasks to be processed; The total time consumption is determined according to the transmission time consumption and the calculation time consumption.

4. The method according to claim 1, characterized in that: The obtaining the priorities respectively corresponding to the plurality of tasks to be processed includes: Obtaining task deadlines and computational loads corresponding to the plurality of tasks to be processed; The priority corresponding to each task to be processed is determined according to the task deadline and the calculation amount; the task deadline is negatively correlated with the priority, and the calculation amount is positively correlated with the priority.

5. The method according to claim 1, characterized in that The obtaining the priorities respectively corresponding to the plurality of tasks to be processed includes: Predicting the transmission time of each task to be processed in the data transmission process according to the calculation amounts respectively corresponding to the multiple tasks to be processed; The priority corresponding to the task to be processed is determined according to the transmission time consumption and the calculation amount; the transmission time consumption is negatively correlated with the priority, and the calculation amount is positively correlated with the priority.

6. The method according to claim 1, characterized in that The method further comprises: Construct a task allocation decision model; Inputting the computing resources and the priorities into the trained task allocation decision model, allocating processing nodes to the multiple tasks to be processed, and obtaining multiple preset allocation strategies; Traversing each preset allocation strategy, and obtaining scores corresponding to each preset allocation strategy according to the value function in the task allocation decision model; The preset allocation strategy with the highest score is determined as the target allocation strategy.

7. The method according to claim 6, characterized in that The method further comprises: Get the initial state of the preset model before training; Input the training sample into the preset model for training, and obtain the training state of the preset model after training; the training sample includes the initial state, the initial allocation strategy and the score corresponding to the initial allocation strategy; the score corresponding to the initial allocation strategy is calculated according to the value function in the preset model; The parameters in the preset model are updated according to the loss value between the initial state and the training state, and the updated preset model is determined as the trained task allocation decision model.

8. A task allocation device, characterized in that: The device comprises: A data acquisition module, used for receiving a plurality of tasks to be processed, and acquiring priorities respectively corresponding to the plurality of tasks to be processed; A data processing module is used to obtain the computing resources currently corresponding to each processing node; The data processing module is further used to determine a target allocation strategy for processing the multiple tasks to be processed by each processing node according to the computing resources currently corresponding to each processing node and the priorities corresponding to the multiple tasks to be processed; wherein the target allocation strategy is determined according to the predicted total time consumed when each processing node processes the multiple tasks to be processed; The data processing module is further used to allocate the multiple tasks to be processed to the processing nodes for processing through the target allocation strategy.

9. An electronic device, characterized in that: include: at least one processor; a memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the steps of the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Multi-process assembly system matching strategy optimization method considering waiting threshold

    CN119270807A

  • DPU task scheduling method and DPU task scheduling system

    CN119576494A

  • Remote 3D printer sharing method and system based on 5G communication

    CN119718223A

  • A method and system for remotely sharing 3D printers based on 5G communication

    CN119718223B

  • Distributed task scheduling method and system for heterogeneous tasks based on cloud native, and medium

    CN119759594A