Computing power deconstruction strategy generation method and device, equipment and medium

By optimizing the computing power deconstruction strategy through the deep reinforcement learning model, the problem of too long task execution time in the existing technology is solved, and the task execution time is reduced and resources are effectively utilized.

CN118802933AActive Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202410412498.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-10-18
Estimated Expiration
2044-04-08

AI Technical Summary

Technical Problem

In the process of computing power deconstruction in the prior art, it is difficult to match nodes with computing power requirements for computing tasks, resulting in too long task execution times.

Method used

The deep reinforcement learning model is used to obtain the scheduling queues of multiple subtasks of componentized tasks, perform topological sorting and priority allocation, and combine the environment module and the deep Q network module to generate a target computing power deconstruction strategy and optimize the subtasks on the network nodes. allocation to reduce task execution time.

Benefits of technology

It effectively reduces the task execution time and prevents the computing power node from being unable to bear larger business demands. By dividing the granularity of task objects and the deep reinforcement learning algorithm, the convergence performance and resource occupancy are taken into consideration to save the total execution time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802933A_ABST
    Figure CN118802933A_ABST
Patent Text Reader

Abstract

The invention provides a computing power deconstruction strategy generation method and device, equipment and a medium, and the method comprises the steps: obtaining a scheduling queue of a plurality of subtasks including a modularized task; wherein the sub-tasks are obtained by cutting a modularized task according to a computing power demand; inputting the scheduling queue into a deep reinforcement learning model, and obtaining a target computing power deconstruction strategy of the componentization task; wherein the deep reinforcement learning model is used for outputting a target computing power deconstruction strategy with the shortest task execution time in a plurality of computing power deconstruction strategies according to a network environment corresponding to the componentized task, and the computing power deconstruction strategy refers to a strategy that a network node for executing a subtask is allocated to each subtask of the componentized task. According to the embodiment of the invention, the granularity of the task object is reduced by dividing the componentized task into a plurality of sub-tasks, the convergence performance, the task execution time and the resource occupancy rate are comprehensively considered through the deep reinforcement learning algorithm, the total execution time is effectively saved, and the occupied resources are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge computing technology, and in particular to a method, device, equipment and medium for generating a computing power deconstruction strategy. Background Art

[0002] In the existing computing power network environment, there are three types of nodes: cloud data centers, edge clouds, and smart terminals. The computing resources between heterogeneous nodes are different, and the links between nodes have certain transmission bandwidth and transmission delay. In the real environment, computing offloading will be affected by various factors such as the external environment, software and hardware environment, or user personality, such as internal and external interference of wireless channels, performance of terminal edge and cloud, and personalized use of users. These premises make it difficult and crucial to formulate reasonable computing power deconstruction that adapts to dynamic changes in the environment. Due to the large differences in computing power that can be provided by computing power nodes at all levels such as terminal devices, edge nodes, and core nodes, and with the operation of services and networks, computing power resources will become more and more fragmented. However, in the process of computing power deconstruction in the prior art, it is difficult to match nodes that are compatible with computing power requirements for computing tasks, which easily causes the task execution time to be too long. Summary of the invention

[0003] The purpose of the present invention is to provide a computing power deconstruction strategy generation method, device, equipment and medium, which is used to solve the problem in the prior art that it is difficult to match nodes that are compatible with the computing power requirements for computing tasks during the computing power deconstruction process, which easily causes the task execution time to be too long.

[0004] To achieve the above object, an embodiment of the present invention provides a method for generating a computing power deconstruction strategy, which includes:

[0005] Obtaining a scheduling queue including a plurality of subtasks of a componentized task; wherein the subtasks are obtained by cutting the componentized task according to computing power requirements;

[0006] The scheduling queue is input into a deep reinforcement learning model to obtain a target computing power deconstruction strategy for the componentized task; wherein the deep reinforcement learning model is used to output the target computing power deconstruction strategy with the shortest task execution time among multiple computing power deconstruction strategies according to the network environment corresponding to the componentized task, wherein the computing power deconstruction strategy refers to a strategy of assigning a network node that executes each subtask of the componentized task.

[0007] Optionally, in the computing power deconstruction strategy generation method, the step of obtaining a scheduling queue of multiple subtasks of a componentized task includes:

[0008] Acquire multiple levels; wherein the levels are obtained by topologically sorting and layering the directed acyclic graph DAG corresponding to the componentized task;

[0009] Sorting the levels; wherein the fewer the number of the subtasks of the componentized task contained in the level, the higher the priority of the level;

[0010] Sorting the subtasks in the hierarchy; wherein the greater the resource requirement of the subtask, the higher the priority;

[0011] A scheduling queue is obtained according to the subtasks arranged in order of priority from high to low.

[0012] Optionally, the method, wherein the deep reinforcement learning model includes an environment module and a deep Q network module;

[0013] Before inputting the scheduling queue into the deep reinforcement learning model to obtain the computing power decomposition strategy with the shortest execution time of the componentized task, the method further includes:

[0014] Initialize the simulation environment, hyperparameters, and Thompson sampling action exploration strategy;

[0015] The environment module of the componentized task is established according to the simulation environment, the hyperparameters and the Thompson sampling action exploration strategy; wherein the environment module obtains a reward value and a network environment state according to the current network environment and the input action, and sends the reward value and the network environment state to the deep Q network module, the reward value is inversely proportional to the execution time of the subtask, and the action is the behavior of allocating the subtask to the network node in the network;

[0016] Establishing the deep Q network module; wherein the deep Q network module is used to obtain the action with the greatest value according to the network environment state, and the value is obtained by fitting the network environment state by the deep Q network module through a fully connected layer;

[0017] The deep Q network module is trained according to the environment module to obtain the deep reinforcement learning model.

[0018] Optionally, in the method, the initializing the simulation environment, hyperparameters and Thompson sampling action exploration strategy comprises:

[0019] Initializing the simulation environment according to the data information of the componentized task; wherein the data information includes at least one of the number of the subtasks, the number of instructions of the subtasks, the data dependency between the plurality of the subtasks, the number of the network nodes, the number of instructions executed per second by the network nodes, the transmission bandwidth between the plurality of the network nodes, and the transmission delay between the network nodes;

[0020] Initializing the hyperparameters; wherein the hyperparameters include at least one of a reward control factor and a penalty control factor of a reward function and an ε value of an ε greedy algorithm;

[0021] Initialize the Thompson sampling action exploration strategy to obtain the action with the largest random number; wherein the random number is obtained according to the probability distribution corresponding to the parameter α and the parameter β of the action, the parameter α represents the number of times the task execution time obtained after the network node is assigned to the subtask is less than or equal to the preset duration, and the parameter β represents the number of times the task execution time obtained after the network node is assigned to the subtask is greater than the preset duration.

[0022] Optionally, the method, after the action of obtaining the maximum random number, further comprises:

[0023] Determine whether the reward value of the action is a maximum value, and obtain a first determination result;

[0024] If the first judgment result is yes, increase the value of the parameter α by 1;

[0025] When the first judgment result is no, the value of the parameter β is increased by 1.

[0026] Optionally, the method, wherein the step of establishing the environment module of the componentized task according to the simulation environment, the hyperparameters and the Thompson sampling action exploration strategy, comprises:

[0027] In the case where the subtask needs to be scheduled to multiple network nodes, the environment state information is obtained according to the simulation environment to generate a state submodule; wherein the environment state information includes: the sequence number d of the subtask to be scheduled, the node information R of the network node t , the requirement information V of the subtask and the correspondence information M between the assigned subtask and the network node t At least one of the following:

[0028] Obtaining a reward submodule according to the hyperparameter and the Thompson sampling action exploration strategy reward and penalty function; wherein the value of the penalty function is -β;

[0029] Acquire an action submodule according to the network nodes; wherein the number of the network nodes is the same as the number of the actions;

[0030] The environment module is established according to the state submodule, the reward submodule and the action submodule.

[0031] Optionally, in the method, the action space of the action submodule is a set of numbers of the network nodes.

[0032] Optionally, the method, wherein, after establishing the deep Q network module, the method further comprises:

[0033] Acquire the value of the plurality of actions under each of the network environment states according to the deep Q network module;

[0034] The action with the highest value in the current network environment state is determined, and outputted to the environment module to obtain the corresponding reward value.

[0035] Optionally, the method, wherein the step of training the deep Q network module according to the environment module to obtain the deep reinforcement learning model, includes:

[0036] Acquire the current network environment status according to the environment module;

[0037] Select the action through a greedy algorithm exploration strategy with ε value decay, and obtain the action value corresponding to the action;

[0038] Allocating resources of the network node to the corresponding subtask according to the action value, and obtaining environmental feedback and a next network environment state;

[0039] Randomly extracting a preset amount of data from a memory unit to calculate the loss; wherein the memory unit is used to store the environmental feedback and the network environment state; the preset amount of data is a minibatch;

[0040] Repeat the above steps until the number of repetitions reaches a preset value to obtain the deep reinforcement learning model.

[0041] In order to achieve the above object, an embodiment of the present invention further provides a computing power deconstruction strategy generation device, which includes:

[0042] A first acquisition module is used to acquire a scheduling queue including multiple subtasks of a componentized task; wherein the subtasks are obtained by cutting the componentized task according to computing power requirements;

[0043] The second acquisition module is used to input the scheduling queue into the deep reinforcement learning model to obtain the target computing power deconstruction strategy of the componentized task; wherein the deep reinforcement learning model is used to output the target computing power deconstruction strategy with the shortest task execution time among multiple computing power deconstruction strategies according to the network environment corresponding to the componentized task, wherein the computing power deconstruction strategy refers to a strategy of assigning a network node that executes each subtask of the componentized task.

[0044] In order to achieve the above-mentioned purpose, an embodiment of the present invention also provides a network device, including: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; wherein, when the processor executes the program or instruction, the computing power deconstruction strategy generation method as described above is implemented.

[0045] In order to achieve the above-mentioned purpose, an embodiment of the present invention further provides a readable storage medium on which a program or instruction is stored, wherein the program or instruction, when executed by a processor, implements the steps in the computing power deconstruction strategy generation method as described above.

[0046] In order to achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps in the computing power deconstruction strategy generation method as described above.

[0047] The beneficial effects of the above technical solution of the present invention are as follows:

[0048] The embodiment of the present invention inputs a scheduling queue including multiple subtasks of a componentized task into a deep reinforcement learning model to obtain a target computing power deconstruction strategy with the shortest task execution time among multiple computing power deconstruction strategies, thereby avoiding the situation where computing power nodes cannot carry larger business demands. The granularity of the task object is reduced by dividing the componentized task into multiple subtasks. The convergence performance, task execution time and resource occupancy rate are comprehensively considered through a deep reinforcement learning algorithm, thereby effectively saving the total execution time and reducing occupied resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of a computing power deconstruction strategy generation method according to an embodiment of the present invention;

[0050] Figure 2 A schematic diagram of componentized task hierarchy of the computing power deconstruction strategy generation method according to an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of the structure of a deep reinforcement learning model of a computing power deconstruction strategy generation method according to an embodiment of the present invention;

[0052] Figure 4 A schematic diagram of a computing power deconstruction strategy generating device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0054] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0055] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0056] Additionally, the terms "system" and "network" are often used interchangeably herein.

[0057] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0058] For ease of understanding, some contents involved in the embodiments of the present invention are described below:

[0059] like Figure 1 As shown, a computing power deconstruction strategy generation method according to an embodiment of the present invention includes:

[0060] S10, obtaining a scheduling queue including a plurality of subtasks of a componentized task; wherein the subtasks are obtained by cutting the componentized task according to computing power requirements;

[0061] It should be noted that there is a dependency relationship between the subtasks of the componentized task, and a subtask can only be executed when the corresponding parent task is completed and the result is received. The componentized task can be modeled using a directed acyclic graph (DAG), and the node value represents the computing requirement of the subtask. The componentized task is preprocessed using a priority allocation algorithm based on topological sorting, and is first sorted according to the priority of the subtask, because the larger the priority of the subtask, the more obvious the optimization of the latency of the network node that allocates more resources to the subtask, which can greatly improve the exploration efficiency of deep reinforcement learning and accelerate the convergence of the algorithm.

[0062] S20, input the scheduling queue into the deep reinforcement learning model to obtain the target computing power deconstruction strategy of the componentized task; wherein the deep reinforcement learning model is used to output the target computing power deconstruction strategy with the shortest task execution time among multiple computing power deconstruction strategies according to the network environment corresponding to the componentized task, wherein the computing power deconstruction strategy refers to a strategy of assigning a network node that executes each subtask of the componentized task.

[0063] In this embodiment, the scheduling queue including multiple subtasks of the componentized task is input into the deep reinforcement learning model to obtain the target computing power deconstruction strategy with the shortest task execution time among the multiple computing power deconstruction strategies, thereby avoiding the computing power node from being unable to carry larger business demands. The granularity of the task object is reduced by dividing the componentized task into multiple subtasks. The convergence performance, task execution time and resource occupancy rate are comprehensively considered through the deep reinforcement learning algorithm, thereby effectively saving the total execution time and reducing occupied resources.

[0064] Optionally, in the computing power deconstruction strategy generation method, step S10 includes:

[0065] Acquire multiple levels; wherein the levels are obtained by topologically sorting and layering the directed acyclic graph DAG corresponding to the componentized task;

[0066] It should be noted that if Figure 2 The figure shows an example in which six subtasks are divided into four layers. The subtasks in each layer are independent of each other and have no dependencies.

[0067] Sorting the levels; wherein the fewer the number of the subtasks of the componentized task contained in the level, the higher the priority of the level;

[0068] It should be noted that when there is only one subtask in a layer, the quality of the network node resources allocated to the subtask has a direct impact on the execution time of the layer. Therefore, the fewer the number of subtasks in the layer, the higher the priority;

[0069] Sorting the subtasks in the hierarchy; wherein the greater the resource requirement of the subtask, the higher the priority;

[0070] It should be noted that when the subtasks are executed in parallel within the same level, the subtask with longer execution time has a greater impact on the total execution time of the layer. Therefore, when there are multiple subtasks within the same level, the subtask with greater resource requirements is considered to have a higher priority.

[0071] A scheduling queue is obtained according to the subtasks arranged in order of priority from high to low.

[0072] It should be noted that the subtasks are added to the scheduling queue in descending order of priority of the subtasks, waiting for scheduling.

[0073] In this embodiment, in order to convert the directed acyclic graph representing the componentized task into the input structure of a fully connected neural network, the componentized task is first preprocessed using a priority allocation algorithm based on topological sorting, and the subtasks are first placed in a scheduling queue in a certain order, which can greatly improve the exploration efficiency of deep reinforcement learning and accelerate the convergence of the algorithm.

[0074] Optionally, the method, wherein the deep reinforcement learning model includes an environment module and a deep Q network module;

[0075] Before step S20, the method further includes:

[0076] Initialize the simulation environment, hyperparameters, and Thompson sampling action exploration strategy;

[0077] The environment module of the componentized task is established according to the simulation environment, the hyperparameters and the Thompson sampling action exploration strategy; wherein the environment module obtains a reward value and a network environment state according to the current network environment and the input action, and sends the reward value and the network environment state to the deep Q network module, the reward value is inversely proportional to the execution time of the subtask, and the action is the behavior of allocating the subtask to the network node in the network;

[0078] Establishing the deep Q network module; wherein the deep Q network module is used to obtain the action with the greatest value according to the network environment state, and the value is obtained by fitting the network environment state by the deep Q network module through a fully connected layer;

[0079] The deep Q network module is trained according to the environment module to obtain the deep reinforcement learning model.

[0080] In this embodiment, if Figure 3 As shown, the deep reinforcement learning model includes the environment module and the deep Q network module for running the componentized task, the environment module is used to calculate the reward value according to the current state of the network environment and the input action, and transform the network environment state to the next state, and transmit the reward value and the next network environment state back to the deep Q network module for training, and the deep Q network module is used to select the action with the highest value from the optional action space according to the current state of the network environment.

[0081] Optionally, in the method, the initializing the simulation environment, hyperparameters and Thompson sampling action exploration strategy comprises:

[0082] Initializing the simulation environment according to the data information of the componentized task; wherein the data information includes at least one of the number of the subtasks, the number of instructions of the subtasks, the data dependency between the plurality of the subtasks, the number of the network nodes, the number of instructions executed per second by the network nodes, the transmission bandwidth between the plurality of the network nodes, and the transmission delay between the network nodes;

[0083] Initializing the hyperparameters; wherein the hyperparameters include at least one of a reward control factor and a penalty control factor of a reward function and an ε value of an ε greedy algorithm;

[0084] Initialize the Thompson sampling action exploration strategy to obtain the action with the largest random number; wherein the random number is obtained according to the probability distribution corresponding to the parameter α and the parameter β of the action, the parameter α represents the number of times the task execution time obtained after the network node is assigned to the subtask is less than or equal to the preset duration, and the parameter β represents the number of times the task execution time obtained after the network node is assigned to the subtask is greater than the preset duration.

[0085] Optionally, the method, after the action of obtaining the maximum random number, further comprises:

[0086] Determine whether the reward value of the action is a maximum value, and obtain a first determination result;

[0087] If the first judgment result is yes, increase the value of the parameter α by 1;

[0088] When the first judgment result is no, the value of the parameter β is increased by 1.

[0089] In this embodiment, the process of Thompson sampling is as follows:

[0090] (1) extracting the parameter α and the parameter β corresponding to each candidate action;

[0091] (2) The parameter α and the parameter β correspond to the probability distribution of the action, and the random number corresponding to the action is generated according to the probability distribution;

[0092] (3) Select the action with the largest random number as output;

[0093] (4) Observe the reward value. If the reward value is greater than the maximum value of all the reward values ​​that have been obtained, it is considered that selecting the network node can make the task scheduling result better, and the value of the parameter α corresponding to the action is increased by 1, otherwise the value of the parameter β is increased by 1.

[0094] After adding the Thompson action exploration strategy, better network nodes can be screened out, allowing the deep reinforcement learning model to explore more targetedly.

[0095] Optionally, the method, wherein the step of establishing the environment module of the componentized task according to the simulation environment, the hyperparameters and the Thompson sampling action exploration strategy, comprises:

[0096] In the case where the subtask needs to be scheduled to multiple network nodes, the environment state information is obtained according to the simulation environment to generate a state submodule; wherein the environment state information includes: the sequence number d of the subtask to be scheduled, the node information R of the network node t , the requirement information V of the subtask and the correspondence information M between the assigned subtask and the network node t At least one of the following:

[0097] It should be noted that, in the process of the deep reinforcement learning model perceiving the environment, the environmental state information includes the information of the subtask to be assigned and the available resource information in the network. Therefore, when the subtask needs to be scheduled to the network node, the environmental state information should include the sequence number d of the subtask to be scheduled in the scheduling queue, the network node information R available in the network, and the number of the subtasks to be scheduled in the scheduling queue. t , the requirement information V of the subtask and the correspondence information M between the assigned subtask and the network node t . Specifically expressed as: [d, R t , V, M t ].

[0098] Obtaining a reward submodule according to the hyperparameter and the Thompson sampling action exploration strategy reward and penalty function; wherein the value of the penalty function is -β;

[0099] It should be noted that the design of the reward and penalty function has a great impact on the performance of the deep reinforcement learning algorithm. Because we hope to minimize the optimization target, the reward value should be inversely proportional to the total task execution time (app_tf), which is α / app_tf. At the same time, in order to ensure the dimension of the neural network, the actions in each state are the same, but in fact, under certain conditions, some of the network nodes have been assigned to subtasks with higher priorities. At this time, if the same network nodes are selected again, the requirements will not be met, so the penalty function is designed, and the value of the penalty function is -β. The parameters α and β are two hyperparameters used to adjust the reward and penalty values ​​to a suitable range for better training of the neural network.

[0100] Acquire an action submodule according to the network nodes; wherein the number of the network nodes is the same as the number of the actions;

[0101] It should be noted that the action refers to the behavior of allocating the subtasks to the available network nodes. Therefore, there should be as many actions as there are network nodes, and the action space is the collection of the serial numbers of these network nodes.

[0102] Establishing the environment module according to the state submodule, the reward submodule and the action submodule;

[0103] It should be noted that if Figure 3 As shown, the environment module includes the state submodule, the reward submodule and the action submodule.

[0104] Optionally, in the method, the action space of the action submodule is a set of numbers of the network nodes;

[0105] It should be noted that the action refers to the behavior of allocating the subtask to the available network nodes. Therefore, there should be as many actions as there are network nodes, and the action space is the set of numbers of these network nodes: a∈{0,…,K-1}.

[0106] Optionally, the method, wherein, after establishing the deep Q network module, the method further comprises:

[0107] Acquire the value of the plurality of actions under each of the network environment states according to the deep Q network module;

[0108] The action with the highest value in the current network environment state is determined, and outputted to the environment module to obtain the corresponding reward value.

[0109] In this embodiment, the deep Q network module fits the value of different actions in each network environment state. The network parameters are initialized using a random initialization method, the value of the action is pre-set as a random value, and the network environment state is fitted to the value through multiple fully connected layers. The deep Q network module selects the action with the highest value among the different values ​​in the current network environment state, and outputs the selected action to the environment module to obtain the corresponding reward value.

[0110] Optionally, the method, wherein the step of training the deep Q network module according to the environment module to obtain the deep reinforcement learning model, includes:

[0111] Acquire the current network environment status according to the environment module;

[0112] It should be noted that the deep reinforcement learning model first obtains the network environment state S t In the process of the deep reinforcement learning model perceiving the environment, the network environment information includes the subtask information to be assigned, the network nodes available in the network, the subtask requirement information, and the correspondence information between the assigned subtask and the network node: [d, R t , V, M t ].

[0113] Select the action through a greedy algorithm exploration strategy with ε value decay, and obtain the action value corresponding to the action;

[0114] It should be noted that the action is selected by the greedy algorithm exploration strategy with ε value decay, the deep reinforcement learning model generates a random action value according to the ε probability, and the action value is generated according to the deep Q network module according to the 1-ε probability: a t = argmax a Q(φ(S t ), a; θ), followed by the Thompson sampling action exploration strategy.

[0115] Allocating resources of the network node to the corresponding subtask according to the action value, and obtaining environmental feedback and a next network environment state;

[0116] It should be noted that the deep reinforcement learning model allocates the resources of the network nodes to the corresponding subtasks according to the action value, and obtains the feedback r of the environment. t and the next network environment state S t+1 , and [S t , a t , r t , S t+1] is stored in the memory unit.

[0117] Randomly extracting a preset amount of data from a memory unit to calculate the loss; wherein the memory unit is used to store the environmental feedback and the network environment state; the preset amount of data is a minibatch;

[0118] It should be noted that since the training of neural networks requires a certain amount of data, the deep reinforcement learning model is allowed to explore the environment for a period of time before learning. When the current step is greater than the exploration step (step>store), a minibatch size of data is randomly extracted from the memory unit and (y i -Q(φ j , a j ;θ)) 2 Calculate the loss, where:

[0119]

[0120] γ is a discount factor, which means focusing on short-term returns, weakening long-term returns and ensuring the convergence of the Q network. Then the deep Q network module is updated using the gradient descent method.

[0121] Repeat the above steps until the number of repetitions reaches a preset value, and obtain the deep reinforcement learning model;

[0122] It should be noted that the predetermined value can be set according to actual conditions and requirements.

[0123] In this embodiment, the embodiment of the present invention uses the deep reinforcement learning model to obtain a method for cloud-edge computing power deconstruction strategy, realizes self-learning of environmental information through reinforcement learning, without relying on artificial experience and rules; abstracts and represents the state space through a deep neural network; the reasoning stage only relies on the deep neural network, and the reasoning speed is fast. By adopting a deep reinforcement learning algorithm, the convergence performance, task execution time and resource occupancy rate are comprehensively considered, effectively saving the total execution time and reducing occupied resources. The stability and convergence speed of the deep reinforcement learning algorithm are improved by adopting preprocessing and Thompson action exploration strategies.

[0124] like Figure 4 As shown, in order to achieve the above purpose, an embodiment of the present invention further provides a computing power deconstruction strategy generation device, which includes:

[0125] The first acquisition module 401 is used to acquire a scheduling queue including multiple subtasks of a componentized task; wherein the subtasks are obtained by cutting the componentized task according to computing power requirements;

[0126] The second acquisition module 402 is used to input the scheduling queue into the deep reinforcement learning model to obtain the target computing power deconstruction strategy of the componentized task; wherein the deep reinforcement learning model is used to output the target computing power deconstruction strategy with the shortest task execution time among multiple computing power deconstruction strategies according to the network environment corresponding to the componentized task, wherein the computing power deconstruction strategy refers to a strategy of assigning a network node that executes each subtask of the componentized task.

[0127] Optionally, in the computing power deconstruction strategy generating device, the first acquisition module 401 includes:

[0128] A first acquisition unit is used to acquire multiple levels; wherein the levels are obtained by topologically sorting and layering the directed acyclic graph DAG corresponding to the componentized task;

[0129] A first processing unit is used to sort the levels; wherein the fewer the number of the subtasks of the componentized task included in the level, the higher the priority of the level;

[0130] A second processing unit is used to sort the subtasks in the hierarchy; wherein the greater the resource requirement of the subtask, the higher the priority;

[0131] The second acquisition unit is used to acquire the scheduling queue according to the subtasks arranged in order of priority from high to low.

[0132] Optionally, in the device, the deep reinforcement learning model includes an environment module and a deep Q network module;

[0133] The device also includes:

[0134] The first processing module is used to initialize the simulation environment, hyperparameters and Thompson sampling action exploration strategy;

[0135] A second processing module is used to establish the environment module of the componentized task according to the simulation environment, the hyperparameters and the Thompson sampling action exploration strategy; wherein the environment module obtains a reward value and a network environment state according to the current network environment and the input action, and sends the reward value and the network environment state to the deep Q network module, the reward value is inversely proportional to the execution time of the subtask, and the action is the behavior of allocating the subtask to the network node in the network;

[0136] A third processing module is used to establish the deep Q network module; wherein the deep Q network module is used to obtain the action with the greatest value according to the network environment state, and the value is obtained by fitting the network environment state by the deep Q network module through a fully connected layer;

[0137] The third acquisition module is used to train the deep Q network module according to the environment module to obtain the deep reinforcement learning model.

[0138] Optionally, in the device, the first processing module comprises:

[0139] A third processing unit, configured to initialize the simulation environment according to the data information of the componentized task; wherein the data information includes at least one of the number of the subtasks, the number of instructions of the subtasks, the data dependency between the plurality of the subtasks, the number of the network nodes, the number of instructions executed per second by the network nodes, the transmission bandwidth between the plurality of the network nodes, and the transmission delay between the network nodes;

[0140] A fourth processing unit, configured to initialize the hyperparameters; wherein the hyperparameters include at least one of a reward control factor and a penalty control factor of a reward function and an ε value of an ε greedy algorithm;

[0141] The third acquisition unit is used to initialize the Thompson sampling action exploration strategy and obtain the action with the largest random number; wherein the random number is obtained according to the probability distribution corresponding to the parameter α and the parameter β of the action, the parameter α represents the number of times the task execution time obtained after the network node is assigned to the subtask is less than or equal to the preset duration, and the parameter β represents the number of times the task execution time obtained after the network node is assigned to the subtask is greater than the preset duration.

[0142] Optionally, the device further comprises:

[0143] A fourth acquisition module, used to determine whether the reward value of the action is a maximum value, and obtain a first determination result;

[0144] a fourth processing module, configured to increase the value of the parameter α by 1 if the first judgment result is yes;

[0145] The fifth processing module is used to increase the value of the parameter β by 1 when the first judgment result is no.

[0146] Optionally, in the device, the second processing module comprises:

[0147] The fifth processing unit is used to obtain environment status information according to the simulation environment and generate a status submodule when the subtask needs to be scheduled to multiple network nodes; wherein the environment status information includes: the sequence number d of the subtask to be scheduled, the node information R of the network node t, the requirement information V of the subtask and the correspondence information M between the assigned subtask and the network node t At least one of the following:

[0148] A fourth acquisition unit is used to acquire a reward submodule according to the hyperparameter and the Thompson sampling action exploration strategy reward and penalty function; wherein the value of the penalty function is -β;

[0149] a fifth acquisition unit, configured to acquire an action submodule according to the network node; wherein the number of the network nodes is the same as the number of the actions;

[0150] The sixth processing unit is used to establish the environment module according to the state submodule, the reward submodule and the action submodule.

[0151] Optionally, in the device, the action space of the action submodule is a set of numbers of the network nodes.

[0152] Optionally, the device further comprises:

[0153] A fifth acquisition module, configured to acquire the values ​​of the plurality of actions under each of the network environment states according to the deep Q network module;

[0154] The sixth processing module is used to determine the action with the highest value in the current network environment state, and output it to the environment module to obtain the corresponding reward value.

[0155] Optionally, in the device, the third acquisition module includes:

[0156] A sixth acquisition unit, configured to acquire the current network environment state according to the environment module;

[0157] a seventh acquisition unit, configured to select the action through a greedy algorithm exploration strategy with ε value decay, and acquire an action value corresponding to the action;

[0158] an eighth acquisition unit, configured to allocate resources of the network node to the corresponding subtask according to the action value, and acquire environmental feedback and a next network environment state;

[0159] a seventh processing unit, configured to randomly extract a preset amount of data from the memory unit to calculate the loss; wherein the memory unit is configured to store the environmental feedback and the network environment state; and the preset amount of data is a minibatch;

[0160] The ninth acquisition unit is used to repeat the above steps until the number of repetitions reaches a preset value to obtain the deep reinforcement learning model.

[0161] It should be noted here that the above-mentioned device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.

[0162] In order to achieve the above-mentioned purpose, an embodiment of the present invention also provides a network device, including: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; wherein, when the processor executes the program or instruction, the computing power deconstruction strategy generation method as described above is implemented.

[0163] In order to achieve the above-mentioned purpose, an embodiment of the present invention also provides a readable storage medium on which a program or instruction is stored, wherein when the program or instruction is executed by the processor, the steps in the computing power deconstruction strategy generation method as described above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0164] In order to achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps in the computing power deconstruction strategy generation method as described above.

[0165] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present invention. Therefore, the present invention should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present invention will be perfect and complete, and the scope of the present invention will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "including" and / or "comprising" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values ​​includes the upper and lower limits of that range and any subranges therebetween.

[0166] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for generating a computing power deconstruction strategy, characterized in that: include: Obtaining a scheduling queue including a plurality of subtasks of a componentized task; wherein the subtasks are obtained by cutting the componentized task according to computing power requirements; The scheduling queue is input into a deep reinforcement learning model to obtain a target computing power deconstruction strategy for the componentized task; wherein the deep reinforcement learning model is used to output the target computing power deconstruction strategy with the shortest task execution time among multiple computing power deconstruction strategies according to the network environment corresponding to the componentized task, wherein the computing power deconstruction strategy refers to a strategy of assigning a network node that executes each subtask of the componentized task.

2. The computing power deconstruction strategy generation method according to claim 1 is characterized in that: The obtaining of a scheduling queue including a plurality of subtasks of a componentized task comprises: Acquire multiple levels; wherein the levels are obtained by topologically sorting and layering the directed acyclic graph DAG corresponding to the componentized task; Sorting the levels; wherein the fewer the number of the subtasks of the componentized task contained in the level, the higher the priority of the level; Sorting the subtasks in the hierarchy; wherein the greater the resource requirement of the subtask, the higher the priority; A scheduling queue is obtained according to the subtasks arranged in order of priority from high to low.

3. The method according to claim 1, characterized in that: The deep reinforcement learning model includes an environment module and a deep Q network module; Before inputting the scheduling queue into the deep reinforcement learning model to obtain the computing power decomposition strategy with the shortest execution time of the componentized task, the method further includes: Initialize the simulation environment, hyperparameters, and Thompson sampling action exploration strategy; The environment module of the componentized task is established according to the simulation environment, the hyperparameters and the Thompson sampling action exploration strategy; wherein the environment module obtains a reward value and a network environment state according to the current network environment and the input action, and sends the reward value and the network environment state to the deep Q network module, the reward value is inversely proportional to the execution time of the subtask, and the action is the behavior of allocating the subtask to the network node in the network; Establishing the deep Q network module; wherein the deep Q network module is used to obtain the action with the greatest value according to the network environment state, and the value is obtained by fitting the network environment state by the deep Q network module through a fully connected layer; The deep Q network module is trained according to the environment module to obtain the deep reinforcement learning model.

4. The method according to claim 3, characterized in that The initialization simulation environment, hyperparameters and Thompson sampling action exploration strategy include: Initializing the simulation environment according to the data information of the componentized task; wherein the data information includes at least one of the number of the subtasks, the number of instructions of the subtasks, the data dependency between the plurality of the subtasks, the number of the network nodes, the number of instructions executed per second by the network nodes, the transmission bandwidth between the plurality of the network nodes, and the transmission delay between the network nodes; Initializing the hyperparameters; wherein the hyperparameters include at least one of a reward control factor and a penalty control factor of a reward function and an ε value of an ε greedy algorithm; Initialize the Thompson sampling action exploration strategy to obtain the action with the largest random number; wherein the random number is obtained according to the probability distribution corresponding to the parameter α and the parameter β of the action, the parameter α represents the number of times the task execution time obtained after the network node is assigned to the subtask is less than or equal to the preset duration, and the parameter β represents the number of times the task execution time obtained after the network node is assigned to the subtask is greater than the preset duration.

5. The method according to claim 4, characterized in that After the action of obtaining the maximum random number, the method further includes: Determine whether the reward value of the action is a maximum value, and obtain a first determination result; If the first judgment result is yes, increase the value of the parameter α by 1; When the first judgment result is no, the value of the parameter β is increased by 1.

6. The method according to claim 3, characterized in that The environment module for establishing the componentized task according to the simulation environment, the hyperparameters and the Thompson sampling action exploration strategy includes: In the case where the subtask needs to be scheduled to multiple network nodes, the environment state information is obtained according to the simulation environment to generate a state submodule; wherein the environment state information includes: the sequence number d of the subtask to be scheduled, the node information R of the network node t , the requirement information V of the subtask and the correspondence information M between the assigned subtask and the network node t At least one of the following: Obtaining a reward submodule according to the hyperparameter and the Thompson sampling action exploration strategy reward and penalty function; wherein the value of the penalty function is -β; Acquire an action submodule according to the network nodes; wherein the number of the network nodes is the same as the number of the actions; The environment module is established according to the state submodule, the reward submodule and the action submodule.

7. The method according to claim 6, characterized in that The action space of the action submodule is a set of serial numbers of the network nodes.

8. The method according to claim 3, characterized in that After establishing the deep Q network module, the method further includes: Acquire the value of the plurality of actions under each of the network environment states according to the deep Q network module; The action with the highest value in the current network environment state is determined, and outputted to the environment module to obtain the corresponding reward value.

9. The method according to claim 3, characterized in that: The step of training the deep Q network module according to the environment module to obtain the deep reinforcement learning model includes: Acquire the current network environment status according to the environment module; Select the action through a greedy algorithm exploration strategy with ε value decay, and obtain the action value corresponding to the action; Allocating resources of the network node to the corresponding subtask according to the action value, and obtaining environmental feedback and a next network environment state; Randomly extracting a preset amount of data from a memory unit to calculate the loss; wherein the memory unit is used to store the environmental feedback and the network environment state; the preset amount of data is a minibatch; Repeat the above steps until the number of repetitions reaches a preset value to obtain the deep reinforcement learning model.

10. A computing power deconstruction strategy generation device, characterized in that: include: A first acquisition module is used to acquire a scheduling queue including multiple subtasks of a componentized task; wherein the subtasks are obtained by cutting the componentized task according to computing power requirements; The second acquisition module is used to input the scheduling queue into the deep reinforcement learning model to obtain the target computing power deconstruction strategy of the componentized task; wherein the deep reinforcement learning model is used to output the target computing power deconstruction strategy with the shortest task execution time among multiple computing power deconstruction strategies according to the network environment corresponding to the componentized task, wherein the computing power deconstruction strategy refers to a strategy of assigning a network node that executes each subtask of the componentized task.

11. A network device comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the method for generating a computing power deconstruction strategy as described in any one of claims 1 to 9 is implemented.

12. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, the steps in the computing power deconstruction strategy generation method as described in any one of claims 1-9 are implemented.

13. A computer program product, characterized in that It includes computer instructions, which, when executed by a processor, implement the steps in the computing power deconstruction strategy generation method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Silicon slice optimal scheduling method and device

    CN101751025A

  • Scheduling method for directed acyclic graph tasks in heterogeneous multi-core processor system

    CN112817708A

  • Computing power resource measurement method based on deep reinforcement learning

    CN115168027A

  • Information center network-based computing power network task scheduling method and device

    CN115766722A

  • Multi-task scheduling method, system and device based on trusted computing and storage medium

    CN116360939A