A method, system and device for dynamic network heterogeneous resource management and task allocation
By building multiple constraints and objective functions in a dynamic distributed network, using Lagrangian slack and Markov decision-making processes for resource management and task allocation, the traditional scheduling method has solved the low resource utilization rate and tasks in a dynamic environment. The problem of low efficiency has achieved efficient resource management and task execution.
Patent Information
- Application Number
- CN202411654417.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In the dynamic distributed network, especially in the bulk domain network, there are resource constraints and heterogeneity difficult to deal with, insufficient adaptability of the dynamic environment, insufficient task dependence and priority processing, and insufficient energy consumption management. The problem of perfection leads to low overall resource utilization and low task execution efficiency.
A dynamic network heterogeneous resource management and task allocation method is proposed. By constructing multiple constraints and objective functions, the static task allocation strategy is obtained by using Lagrangian slack solution, and based on the dynamic task allocation strategy, Markov decision-making process is used. Resource adjustments are carried out and the target task allocation strategy is obtained by combining alternating optimization.
In the case of dynamic environment and resource heterogeneity, the overall resource utilization rate and task execution efficiency are improved, and the system stability is improved through alternating optimization.
Smart Images

Figure CN119172334B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, system and device for dynamic network heterogeneous resource management and task allocation. Background Art
[0002] In dynamic distributed networks, such as body area networks, Internet of Things (IoT) or vehicle-to-vehicle network (VANET), tasks in body area networks are often complex processes consisting of multiple data collection, processing and transmission operations. For example, the collection and real-time processing of physiological data such as electrocardiogram (ECG), blood pressure and body temperature are typical tasks that require not only the participation of sensor nodes, but also the coordination of the allocation of computing and communication resources.
[0003] Traditional centralized scheduling methods rely on central control nodes to perform unified task allocation. However, with the increase in the number of body area network devices and the dynamic changes in the topology structure, traditional scheduling methods have the following significant disadvantages, such as resource constraints and difficulty in handling heterogeneity, insufficient adaptability to dynamic environments, inadequate task dependency and priority processing, and imperfect energy consumption management. These disadvantages lead to low overall resource utilization and low task execution efficiency in traditional scheduling methods in dynamic environments and resource heterogeneity. Summary of the invention
[0004] The present application aims to propose a method, system and device for dynamic network heterogeneous resource management and task allocation, which can improve the overall resource utilization and improve the task execution efficiency in a dynamic environment and resource heterogeneity.
[0005] In a first aspect, an embodiment of the present application provides a method for dynamic network heterogeneous resource management and task allocation, the method comprising:
[0006] Building multiple constraints that need to be met when managing heterogeneous resources and allocating tasks in a dynamic network;
[0007] constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption;
[0008] Based on the first objective function and the plurality of constraints, a static task allocation strategy is obtained by using Lagrangian relaxation solution;
[0009] Constructing a dynamic task allocation strategy for adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, using a Markov decision process to adjust resources for each time step to obtain a target resource adjustment amount for each time step, wherein the time step is determined according to the total execution time of the task;
[0010] Constructing a static task update strategy according to the static task allocation strategy and the target resource adjustment amount;
[0011] Based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy, an alternating optimization is used to obtain a target task allocation strategy.
[0012] Compared with the prior art, the first aspect of the present application has the following beneficial effects:
[0013] The method constructs multiple constraints that need to be met when performing heterogeneous resource management and task allocation in a dynamic network; constructs a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption; based on the first objective function and multiple constraints, Lagrangian relaxation is used to solve the static task allocation strategy; a dynamic task allocation strategy is constructed when adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, the resources of each time step are adjusted using a Markov decision process to obtain the target resource adjustment amount for each time step, and the time step is determined according to the total execution time of the task; a static task update strategy is constructed based on the static task allocation strategy and the target resource adjustment amount; based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy, the target task allocation strategy is obtained by alternating optimization. In this way, the static task allocation strategy is solved by Lagrangian relaxation to improve the satisfaction of the static task allocation strategy with respect to the constraints, and the heterogeneous resources are adjusted in real time and dynamically through the Markov decision process, so that the overall resource utilization rate can be improved and the task execution efficiency can be improved in the case of a dynamic environment and resource heterogeneity. And through alternating optimization, the target task allocation strategy can achieve a balance between the global and local aspects, and gradually improve the stability of the system.
[0014] In some embodiments, constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption includes:
[0015] ;
[0016] in, represents the static task allocation strategy matrix, , Representation Task Assigned to the node , Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, Represents the weight coefficient of energy consumption.
[0017] In some implementations, the static task allocation strategy is obtained by using Lagrangian relaxation solution based on the first objective function and the plurality of constraints, including:
[0018] Constructing an unconstrained objective function according to the first objective function and the plurality of constraints;
[0019] The unconstrained objective function is solved by Lagrangian relaxation to obtain a static task allocation strategy.
[0020] In some implementations, constructing an unconstrained objective function according to the first objective function and the plurality of constraints includes:
[0021] ;
[0022] in, represents the static task allocation strategy matrix, , Representation Task Assigned to the node , Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, represents the weight coefficient of energy consumption, Indicates The constraint function of the constraint condition, Indicates The threshold of the constraint condition, Indicates The Lagrange multiplier of the constraints.
[0023] In some implementations, the constructing of a dynamic task allocation strategy for adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, using a Markov decision process to adjust resources for each time step to obtain a target resource adjustment amount for each time step includes:
[0024] According to the static task allocation strategy, a dynamic task allocation strategy for adjusting resources in a Markov decision process is constructed;
[0025] Using resource adjustments in the dynamic task allocation strategy as actions in a Markov decision process;
[0026] Observe the state of the current time step and make the strategy choose the action corresponding to the current state;
[0027] Calculate the reward for executing the action corresponding to the current state;
[0028] According to the reward, the strategy and state of the next time step are updated until the task is completed or the convergence condition of the Markov decision process is reached, and the target resource adjustment amount for each time step is obtained.
[0029] In some implementations, calculating a reward for executing an action corresponding to a current state includes:
[0030] ;
[0031] in, Indicates reward, Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Indicated in Time Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Indicated in Time Node Energy consumption, Represents the weight coefficient of energy consumption.
[0032] In some implementations, constructing a static task update strategy according to the static task allocation strategy and the target resource adjustment amount includes:
[0033] The target resource adjustment amount for each time step within the total execution time of the task is accumulated and averaged to obtain a first result value;
[0034] Summing the first result value and the static task allocation strategy to obtain a second result value;
[0035] The static task allocation strategy is updated using the second result value to construct a static task update strategy.
[0036] In a second aspect, an embodiment of the present application further provides a dynamic network heterogeneous resource management and task allocation system, the system comprising:
[0037] A constraint construction unit, used to construct multiple constraints that need to be met when performing heterogeneous resource management and task allocation in a dynamic network;
[0038] An objective function construction unit, for constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption;
[0039] An allocation strategy solving unit, configured to obtain a static task allocation strategy by using Lagrangian relaxation solution based on the first objective function and the plurality of constraints;
[0040] A resource adjustment amount calculation unit is used to construct a dynamic task allocation strategy when adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, use a Markov decision process to adjust the resources of each time step to obtain a target resource adjustment amount for each time step, where the time step is determined according to the total execution time of the task;
[0041] An update strategy construction unit, configured to construct a static task update strategy according to the static task allocation strategy and the target resource adjustment amount;
[0042] The target strategy obtaining unit is used to obtain the target task allocation strategy by adopting alternating optimization based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy.
[0043] In the third aspect, an embodiment of the present application also provides an electronic device, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a dynamic network heterogeneous resource management and task allocation method as described above.
[0044] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute a dynamic network heterogeneous resource management and task allocation method as described above.
[0045] It can be understood that the beneficial effects of the second to fourth aspects compared with the related art are the same as the beneficial effects of the first aspect compared with the related art. Please refer to the relevant description in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0047] Figure 1 It is a flowchart of an embodiment of a method for dynamic network heterogeneous resource management and task allocation provided by the present application;
[0048] Figure 2 It is a structural diagram of an embodiment of a dynamic network heterogeneous resource management and task allocation system provided by the present application;
[0049] Figure 3 It is a schematic diagram of the structure of an embodiment of the electronic device provided by the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0051] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0052] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0053] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.
[0054] In dynamic distributed networks, such as body area networks, Internet of Things (IoT) or vehicle-to-vehicle network (VANET), tasks in body area networks are often complex processes consisting of multiple data collection, processing and transmission operations. For example, the collection and real-time processing of physiological data such as electrocardiogram (ECG), blood pressure and body temperature are typical tasks that require not only the participation of sensor nodes, but also the coordination of the allocation of computing and communication resources.
[0055] Traditional centralized scheduling methods rely on central control nodes to perform unified task allocation. However, with the increase in the number of body area network devices and the dynamic changes in the topology structure, traditional scheduling methods have the following significant disadvantages, such as resource constraints and difficulty in handling heterogeneity, insufficient adaptability to dynamic environments, inadequate task dependency and priority processing, and imperfect energy consumption management. These disadvantages lead to low overall resource utilization and low task execution efficiency in traditional scheduling methods in dynamic environments and resource heterogeneity.
[0056] In order to solve the problem that the above-mentioned traditional scheduling method has low overall resource utilization and low task execution efficiency in a dynamic environment and with heterogeneous resources, the present application proposes a dynamic network heterogeneous resource management and task allocation method, system and device.
[0057] Reference Figure 1 The embodiment of the present application provides a method for dynamic network heterogeneous resource management and task allocation, the method comprising the following steps:
[0058] Step S100: construct multiple constraints that need to be met when performing heterogeneous resource management and task allocation in a dynamic network;
[0059] Step S200: constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption;
[0060] Step S300: Based on the first objective function and multiple constraints, a static task allocation strategy is obtained by using Lagrangian relaxation solution;
[0061] Step S400, constructing a dynamic task allocation strategy for adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, using a Markov decision process to adjust the resources for each time step to obtain a target resource adjustment amount for each time step, where the time step is determined according to the total execution time of the task;
[0062] Step S500: construct a static task update strategy according to the static task allocation strategy and the target resource adjustment amount;
[0063] Step S600: Based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy, an alternating optimization is used to obtain a target task allocation strategy.
[0064] In this embodiment, multiple constraints that need to be met when performing heterogeneous resource management and task allocation in a dynamic network are constructed; a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption is constructed; based on the first objective function and multiple constraints, a static task allocation strategy is obtained by Lagrangian relaxation; a dynamic task allocation strategy is constructed when adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, the resources of each time step are adjusted by a Markov decision process to obtain the target resource adjustment amount for each time step, and the time step is determined according to the total execution time of the task; a static task update strategy is constructed according to the static task allocation strategy and the target resource adjustment amount; based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy, the target task allocation strategy is obtained by alternating optimization. In this way, the static task allocation strategy is solved by Lagrangian relaxation to improve the satisfaction degree of the static task allocation strategy for the constraints, and the heterogeneous resources are adjusted in real time by the Markov decision process, so that the overall resource utilization rate can be improved in the case of dynamic environment and resource heterogeneity, and the task execution efficiency can be improved. And through alternating optimization, the target task allocation strategy can achieve a balance between the global and local aspects, and gradually improve the stability of the system.
[0065] The above-mentioned multiple constraints may include resource constraints, task unique allocation constraints, task dependency and time constraints, and time window constraints.
[0066] The resource constraint may be that the resource consumption of each node cannot exceed the available resources of the node.
[0067] The above-mentioned task unique allocation constraint may be that each task can only be assigned to one node.
[0068] The above-mentioned task dependencies and time constraints may mean that the execution of the task must satisfy the dependencies and time windows.
[0069] The above dependency relationship can refer to the logical relationship that some tasks must be completed before other tasks can be started. Through task dependency modeling, the system can ensure that tasks are executed in order and avoid task delays or failures caused by improper dependencies.
[0070] The above time window constraint can be that the task must be completed within its time window. Time Window Constraint: refers to the restriction that the task must start and end within a specific time range. In body area networks, time window constraints ensure that tasks can be completed within a specified time period. Especially in resource-constrained or emergency task scenarios, the management of time windows is particularly important.
[0071] The first objective function constructed above is used to maximize the task execution utility and minimize resource consumption and energy consumption. It can be that the first objective function constructed can maximize the task execution utility (ie, task benefit) and minimize resource consumption and energy consumption.
[0072] The above-mentioned execution utility, resource consumption and energy consumption may be obtained by using methods in the prior art, and this embodiment does not make any specific limitations or descriptions.
[0073] The above-mentioned static task allocation strategy is obtained by using Lagrangian relaxation based on the first objective function and multiple constraints. The constraints can be integrated into the first objective function, the first objective function is converted into an unconstrained optimization problem, and then the Lagrangian relaxation is used to obtain the optimal task allocation solution. The optimal task allocation solution is the static task allocation strategy.
[0074] The above-mentioned Lagrangian relaxation can be a heuristic algorithm for solving complex optimization problems, and is usually used to solve integer linear programming problems. By "relaxing" some constraints and converting them into penalty terms and adding them to the objective function, this method can simplify the solution process and gradually approach the optimal solution.
[0075] The above-mentioned dynamic task allocation strategy for adjusting resources for the static task allocation strategy can be a dynamic resource scheduling based on the static task allocation strategy, that is, resource adjustment will be made when network resources, task status and node energy consumption are constantly changing, and the static task allocation strategy and resource adjustment amount are added together to construct the dynamic task allocation strategy.
[0076] The above-mentioned dynamic task allocation strategy uses a Markov decision process to adjust the resources at each time step to obtain the target resource adjustment amount for each time step. The time step is determined according to the total execution time of the task. Since the resource adjustment amount can change according to the network resources, task status and node energy consumption, the resource adjustment amount in the dynamic task allocation strategy can be used as an action in the Markov decision process. Then, the Markov decision process can find the optimal action for each time step according to the constantly changing state, and this action is the target resource adjustment amount.
[0077] The above Markov decision process can be a mathematical model used to describe the state transition and benefits in the decision-making process. The Markov decision process consists of states, actions, transition probabilities and reward functions, which helps intelligent agents (such as sensor nodes) maximize long-term benefits by choosing different actions. The Markov decision process is used in this application to model the decision-making process of sensor resource allocation.
[0078] The static task update strategy is constructed according to the static task allocation strategy and the target resource adjustment amount. The static task update strategy may be constructed by adding the static task allocation strategy and the target resource adjustment amount.
[0079] The above-mentioned alternating optimization can be used to deal with the dependencies between multiple variables or multiple models. By continuously iteratively optimizing different variables or models, the degree of coupling between them can be gradually reduced to achieve a global optimal or approximate optimal solution.
[0080] In some implementations, constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption includes:
[0081] ;
[0082] in, represents the static task allocation strategy matrix, , Representation Task Assigned to the node , Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, Represents the weight coefficient of energy consumption.
[0083] In this embodiment, the constructed first objective function can both maximize the task execution utility and minimize resource consumption and energy consumption.
[0084] In some implementations, based on the first objective function and multiple constraints, a Lagrangian relaxation solution is used to obtain a static task allocation strategy, including:
[0085] Constructing an unconstrained objective function according to the first objective function and a plurality of constraints;
[0086] Lagrangian relaxation is used to solve the unconstrained objective function and obtain the static task allocation strategy.
[0087] In this embodiment, the constraints are integrated into the first objective function, which is converted into an unconstrained optimization problem. Then, the Lagrangian relaxation is used to solve the optimal task allocation solution. The optimal task allocation solution is the static task allocation strategy. By iteratively adjusting the Lagrangian multiplier, an approximate solution to the large-scale task allocation problem is achieved, which effectively improves the global optimization performance of task allocation.
[0088] In some implementations, constructing an unconstrained objective function based on the first objective function and a plurality of constraints includes:
[0089] ;
[0090] in, represents the static task allocation strategy matrix, , Representation Task Assigned to the node , Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, represents the weight coefficient of energy consumption, Indicates The constraint function of the constraint condition, Indicates The threshold of the constraint condition, Indicates The Lagrange multiplier of the constraints.
[0091] In some implementations, a dynamic task allocation strategy is constructed when adjusting resources for a static task allocation strategy, and based on the dynamic task allocation strategy, a Markov decision process is used to adjust resources for each time step to obtain a target resource adjustment amount for each time step, including:
[0092] Based on the static task allocation strategy, a dynamic task allocation strategy for resource adjustment in the Markov decision process is constructed;
[0093] The resource adjustment in the dynamic task allocation strategy is regarded as the action in the Markov decision process;
[0094] Observe the state of the current time step and make the strategy choose the action corresponding to the current state;
[0095] Calculate the reward for executing the action corresponding to the current state;
[0096] According to the reward, the strategy and state of the next time step are updated until the task is completed or the convergence condition of the Markov decision process is reached, and the target resource adjustment amount for each time step is obtained.
[0097] In this embodiment, a dynamic task allocation strategy for adjusting resources in a Markov decision process is constructed based on a static task allocation strategy; the resource adjustment amount in the dynamic task allocation strategy is used as an action in the Markov decision process; the state of the current time step is observed so that the strategy selects the action corresponding to the current state; the reward for executing the action corresponding to the current state is calculated; based on the reward, the strategy and state of the next time step are updated until the task is completed or the convergence condition of the Markov decision process is reached, and the target resource adjustment amount for each time step is obtained. In this way, dynamic resource scheduling is performed through the Markov decision process, and resource allocation can be dynamically adjusted according to the real-time state and reward signal to ensure that the system always maintains optimal performance during execution. This method enables the system to have high adaptability and robustness in the face of dynamic changes. At the same time, through the combination with the static task allocation scheme, the unification of global optimization and local fine-tuning is achieved.
[0098] In some implementations, calculating a reward for executing an action corresponding to a current state includes:
[0099] ;
[0100] in, Indicates reward, Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Indicated in Time Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Indicated in Time Node Energy consumption, Represents the weight coefficient of energy consumption.
[0101] In this embodiment, the reward for executing the action corresponding to the current state is calculated by task utility, resource consumption and energy consumption, thus achieving dynamic optimization of task utility, resource consumption and energy consumption. The immediate reward signal is used to guide the strategy update, so that the system can continuously optimize performance in a dynamic environment.
[0102] In some implementations, a static task update strategy is constructed according to the static task allocation strategy and the target resource adjustment amount, including:
[0103] The target resource adjustment amount for each time step within the total task execution time is accumulated and averaged to obtain a first result value;
[0104] The first result value is summed with the static task allocation strategy to obtain a second result value;
[0105] The second result value is used to update the static task allocation strategy to construct a static task update strategy.
[0106] In this embodiment, a feedback mechanism is used to construct a static task update strategy based on the static task allocation strategy and the target resource adjustment amount. Specifically, the target resource adjustment amount for each time step within the total task execution duration is accumulated and averaged to obtain a first result value; the first result value is summed with the static task allocation strategy to obtain a second result value; the second result value is used to update the static task allocation strategy to construct a static task update strategy. In this way, after each round of task execution, the feedback mechanism uses the empirical results of dynamic scheduling to update the static task allocation plan (i.e., the static task allocation strategy). Later, through multiple rounds of alternating optimization, the system gradually adapts to changes in the actual environment, which can improve resource utilization efficiency and task execution performance.
[0107] To facilitate understanding by those skilled in the art, a set of best embodiments is provided below:
[0108] In terms of task decomposition and resource scheduling in body area networks (BANs), existing technologies have the following significant shortcomings: 1. Resource constraints and heterogeneity are difficult to handle: sensor nodes in the BAN system architecture are heterogeneous, and the computing power, communication bandwidth and battery life of different nodes vary significantly. Existing task allocation and scheduling methods often fail to fully consider this heterogeneity, resulting in low resource utilization, individual nodes may be overloaded, and the overall task execution effect is affected. 2. Insufficient adaptability to dynamic environments: sensor nodes in BANs usually have a dynamic topology, and the connection status and resource status of nodes will change with time and environment (such as node movement and resource consumption). However, most existing technologies are based on static or semi-static assumptions and cannot flexibly respond to task adjustments under dynamic network conditions, resulting in delayed task allocation and system instability. 3. Inadequate task dependency and priority processing: In BANs, monitoring tasks usually have complex dependencies, and some key tasks must be executed first. However, existing technologies are often ineffective in handling task priorities and dependencies, which may cause key tasks to be delayed, affecting the timeliness and accuracy of data. 4. Imperfect energy management: Sensor nodes in body area networks are usually powered by batteries, and node energy consumption is a key issue for the continuous operation of the system. The existing task scheduling scheme lacks optimization of energy consumption, resulting in the rapid depletion of power in some nodes, affecting the long-term stable operation of the body area network.
[0109] In view of the above shortcomings, this embodiment aims to provide a task decomposition and resource scheduling optimization method based on reinforcement learning to improve the task execution efficiency and system stability of the body area network. Specific goals include: 1. Handling node heterogeneity: Optimizing resource allocation through Markov decision modeling, rationally utilizing different resources of heterogeneous sensor nodes in the body area network, avoiding overload or resource waste, and maximizing resource utilization. 2. Improving adaptability in dynamic environments: This embodiment combines deep reinforcement learning to achieve adaptive task allocation and resource scheduling in dynamic environments. Nodes can adjust resource allocation strategies according to real-time environmental changes to ensure the flexibility and timeliness of the task execution process. 3. Optimizing task priority and dependency processing: By constructing task dependency constraints and reinforcement learning algorithms, this embodiment can effectively handle the dependencies and priorities between tasks, ensure that key tasks are executed first, reduce task delays, and ensure the timely processing of important data. 4. Energy efficiency optimization: In view of the energy consumption problem of sensor nodes, this embodiment introduces an energy efficiency management mechanism, dynamically considers battery life (i.e., energy consumption) in the resource allocation management process, extends the node working time, and ensures that the body area network can operate stably for a long time.
[0110] Through the above technical points, this embodiment solves the problem of the existing technology that the decomposition is difficult due to the complex dependencies of tasks in the body area network. At the same time, it solves the problem that the dynamic characteristics of the network make it difficult to accurately match subtasks with network resources and difficult to achieve effective task allocation. Thereby achieving more efficient and intelligent body area network task allocation and resource management.
[0111] 1. Definition of mathematical problem.
[0112] 1. Problem definition.
[0113] In a dynamic resource-constrained body area network, the goal of this embodiment is to maximize task benefits and minimize resource and energy consumption through task allocation and resource scheduling. The following variables are defined:
[0114] Task Collection: , node collection: ,node In time Resource status at the time ,Task At the node The utility of execution (i.e., task benefit) ,node Execute the task Resource consumption ,node In time Energy consumption ,in, , .
[0115] It should be noted that the task benefits, resource consumption and energy consumption of this embodiment can be calculated using existing technologies known to those skilled in the art, and this embodiment does not make specific limitations or descriptions.
[0116] Task allocation plan Represents the dynamic allocation results of each task at different times:
[0117] ;
[0118] in, represents the initial allocation scheme (i.e., static task allocation strategy), Indicates time The resource adjustment amount.
[0119] 2. Construction of constraints.
[0120] In order to ensure the stability of the system and the smooth execution of tasks, task allocation and resource scheduling (i.e. resource management) must meet the following constraints:
[0121] (1) Resource constraints: the resource consumption of each node cannot exceed its available resources:
[0122] ;
[0123] in, Indicates at time Time Node Execute the task resource consumption, Representation Node In time The resource status (i.e. available resources) at the time.
[0124] (2) Task unique assignment constraint: each task can only be assigned to one node:
[0125] ;
[0126] in, Indicates at time Time Task Assigned to the node .
[0127] (3) Task dependencies and time constraints: The execution of tasks must satisfy dependencies and time windows:
[0128] ;
[0129] in, Representation Task The start time of Representation Task The end time of a task, that is, the next task will start after the completion of one task. Representation Task , Representation Task , Representation Task and tasks There are dependencies between them.
[0130] (4) Time window constraint: The task must be completed within its time window:
[0131] ;
[0132] in, Representation Task The end time of Representation Task The start window time, Representation Task The end window time.
[0133] 3. Objective function construction.
[0134] The optimization goal of the system is to maximize the utility of task execution while minimizing resource consumption and node energy consumption. The objective function is defined as:
[0135] ;
[0136] in, represents the static task allocation strategy matrix, , Representation Task Assigned to the node , Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, Represents the weight coefficient of energy consumption.
[0137] 2. Technical solution of this embodiment.
[0138] The optimization process of this embodiment adopts an alternating optimization strategy, combining the static task allocation scheme (ie, the static task allocation strategy) with dynamic resource adjustment, and gradually adjusts the allocation scheme through a feedback mechanism, so that the system reaches the optimal state in a dynamic environment.
[0139] Specifically, this embodiment adopts an alternating optimization strategy combining static task allocation and dynamic resource scheduling. The core idea is to solve the initial task allocation scheme through Lagrangian relaxation. , and combined with the Markov decision process (MDP) to dynamically adjust resource allocation during execution. The introduction of this method is mainly to solve the problem that static planning cannot adapt to the dynamic environment, and to overcome the local optimal trap that may occur in the dynamic scheduling process. Through the feedback mechanism and multiple rounds of iterative alternating optimization, a balance can be achieved between the global and local, and the system stability can be gradually improved.
[0140] Specifically, we first solve the static task allocation by using the Lagrangian relaxation method, integrate the complex constraints into the objective function, and obtain the initial allocation plan. During the task execution phase, the allocation scheme is adjusted through a policy gradient-based reinforcement learning method. , and optimize the strategy through reward signals in the MDP decision optimization framework. After the task is completed, the results of dynamic scheduling are fed back to the static allocation plan to update To adapt to the new environment. Static task allocation provides the basis for dynamic scheduling, and the feedback of dynamic scheduling continuously corrects the static allocation, and the two are performed alternately until the convergence conditions are met. This collaborative optimization strategy ensures the robustness and efficiency of the system in a dynamic environment. The technical solution of this embodiment specifically includes the following contents:
[0141] 1. Static task allocation: Lagrangian relaxation solution.
[0142] (1) Reasons for introducing Lagrangian relaxation.
[0143] In a complex body area network, the allocation of tasks is affected by multiple constraints such as resource constraints, task dependencies, and time windows. Directly solving optimization problems with these complex constraints is often computationally expensive, especially in problems involving integer programming. Therefore, this embodiment introduces the Lagrangian relaxation method, relaxes the complex constraints into Lagrangian multiplier terms, and integrates the constraints into the objective function. In this way, the original problem is transformed into an unconstrained optimization problem that is easier to solve. By continuously iteratively updating the Lagrangian multipliers, the optimal solution can be gradually approached.
[0144] (2) Formalization of the problem.
[0145] The goal of the original optimization problem is to maximize the task execution utility and minimize resource consumption and energy consumption. The original optimization problem is expressed as follows:
[0146] ;
[0147] in, represents the static task allocation strategy matrix, , Representation Task Assigned to the node , Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, Represents the weight coefficient of energy consumption.
[0148] (3) Introducing constraints.
[0149] In order to meet the operation requirements of the system, the optimization process needs to meet the following constraints:
[0150] 1. Resource constraints:
[0151] ;
[0152] 2. Task unique allocation constraints:
[0153] ;
[0154] 3. Task dependency constraints:
[0155] ;
[0156] 4. Time window constraints:
[0157] ;
[0158] (4) Lagrangian relaxation model.
[0159] By introducing the Lagrange multiplier , integrate the above constraints into the objective function and transform it into an unconstrained optimization problem. The Lagrangian relaxation problem is as follows:
[0160] ;
[0161] in, represents the static task allocation strategy matrix, , Representation Task Assigned to the node , Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, represents the weight coefficient of energy consumption, Indicates The constraint function of the constraint condition, Indicates The threshold of the constraint condition, Indicates The Lagrange multiplier of the constraints.
[0162] (5) Solution process
[0163] The Lagrangian relaxation method optimizes the and update multiplier to approach the optimal solution.
[0164] 1. Initialize the Lagrange multiplier: set the initial value and step length .
[0165] 2. Iteratively update the task allocation plan:
[0166] ;
[0167] This step is solved by solving the unconstrained optimization problem .
[0168] 3. Update the Lagrange multiplier:
[0169] ;
[0170] By updating the Lagrange multipliers, the constraints are ensured to be satisfied step by step.
[0171] 4. Check the convergence condition: If the convergence condition is met (such as the multiplier change is less than the threshold), end the iteration; otherwise return to step 2.
[0172] (6) Obtain the solution.
[0173] After the convergence condition is met, the output This is a static task allocation scheme. This scheme provides the basis for dynamic resource scheduling, that is, it is passed to the dynamic scheduling stage as an initial scheme:
[0174] .
[0175] (7) Advantages and applications.
[0176] Through the Lagrangian relaxation method, the complexity of constraints is reduced in the solution process, while ensuring the feasibility of the final solution. This method provides a global optimization perspective in static task allocation and lays a solid foundation for subsequent dynamic resource scheduling.
[0177] 2. Dynamic resource scheduling (i.e. dynamic network heterogeneous resource management): MDP-based optimization.
[0178] (1) Reasons for introducing MDP for dynamic resource scheduling.
[0179] Static task allocation scheme Although a globally optimized initial allocation is provided, network resources, task status, and node energy consumption will continue to change during the actual execution process. In order to cope with these dynamic changes, this embodiment uses a policy gradient-based reinforcement learning method to update and adjust resource allocation under the MDP decision optimization framework. Under the MDP framework, the decision at each time step not only depends on the current state, but also dynamically adjusts the strategy according to the reward signal to ensure that the system always maintains optimal performance during execution.
[0180] (2) Model definition of MDP.
[0181] The MDP model is described as a five-tuple , specifically defined as follows:
[0182] The state space S represents the state of the system at each time step.
[0183] The action space A represents the optional resource adjustment actions at each time step.
[0184] State transition probability Indicates that an action is being performed After that, from the state Transfer to state probability.
[0185] Immediate Reward Function Describe the payoff of each action in a given state.
[0186] Discount Factor Control the importance of future rewards in current decisions.
[0187] (3) Definition of state space.
[0188] state At time step Represents a collection of the following information:
[0189] ;
[0190] in, Representation Node In time available resources at the time, Representation Task The execution effect of Representation Node In time energy consumption.
[0191] (4) Definition of action space.
[0192] At each time step , the system follows the strategy Select a resource adjustment action , the adjustment plan is as follows:
[0193] ;
[0194] in, represents the initial static allocation scheme, Indicates the current time step The resource adjustment amount.
[0195] (5) Definition of the immediate reward function.
[0196] Immediate Reward Function Balance task utility, resource consumption, and energy consumption:
[0197] ;
[0198] in, Indicates reward, Representation Task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Indicated in Time Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Indicated in Time Node Energy consumption, Represents the weight coefficient of energy consumption (i.e., discount factor).
[0199] (6) Strategy update and value function.
[0200] In the reinforcement learning process, the policy gradient method is used to update the policy :
[0201] ;
[0202] in, represents the learning rate, which controls the step size of the policy update. Indicates status The value function of The expected value of future cumulative rewards, Indicates status The value function of .
[0203] (7) State transfer and feedback mechanism.
[0204] The state transition model is described as follows:
[0205] ;
[0206] The system performs an action at each time step Then enter the next state , and update the strategy according to the new status and reward.
[0207] (8) MDP solution process.
[0208] The dynamic resource scheduling process of MDP is as follows:
[0209] 1. Initialization strategy and status .
[0210] 2. At each time step :
[0211] (a) Observe the current state ;
[0212] (b) According to the strategy Select Action :
[0213] ;
[0214] (c) Execution Action , and calculate the immediate reward:
[0215] ;
[0216] (d) Update status:
[0217] ;
[0218] (e) Update strategy:
[0219] ;
[0220] 3. Repeat the above process until the task is completed or the convergence condition is reached.
[0221] (9) Obtain the solution.
[0222] After the convergence condition is met, the output A scheme for dynamic task allocation.
[0223] (10) Summary.
[0224] Through dynamic resource scheduling with MDP, the system can dynamically adjust resource allocation according to real-time status and reward signals. This method enables the system to have high adaptability and robustness in the face of dynamic changes. At the same time, by comparing with the static task allocation scheme The combination of global optimization and local fine-tuning is achieved.
[0225] 3. Feedback mechanism: Update static task allocation.
[0226] (1) Reasons for introducing the feedback mechanism.
[0227] Static task allocation scheme The initial global optimal allocation is provided, but in the actual task execution process, the dynamic changes in the environment and resources may cause the initial solution to deviate from the optimal. Therefore, the feedback mechanism can be used to correct the static task allocation by using the experience information learned in the dynamic resource scheduling process to further improve the overall performance of the system. The feedback mechanism ensures that the system has long-term adaptability and stability in complex environments, making the static task allocation With dynamic resource adjustment Tightly integrated.
[0228] (2) The core idea of the feedback mechanism.
[0229] Dynamic resource scheduling at each time step The amount of resource adjustment generated It will be gradually accumulated and used to update the static task allocation plan when the task is completed or convergence conditions are reached. This feedback process enables the system's static allocation scheme to continuously adapt to resource changes during actual execution through multiple rounds of alternating optimization.
[0230] (3) Formula definition of feedback mechanism.
[0231] In the feedback mechanism, static task allocation Update according to the accumulated results of dynamic scheduling (i.e. static task update strategy). The static task update strategy formula is as follows:
[0232] ;
[0233] The left side of the arrow Indicates the updated static task allocation strategy. represents the static task allocation scheme before the update, represents the total time steps of task execution, Represents the time step The resource adjustment amount indicates the amount of resource adjustment in the dynamic scheduling process. of fine-tuning.
[0234] (4) Derivation process
[0235] 1. Accumulation of dynamic resource adjustments: At each time step , according to the status Select Action , and Make adjustments:
[0236] ;
[0237] The dynamic adjustment amount Relative to the static solution of fine-tuning.
[0238] 2. Average of cumulative results: At each time step during the entire task execution process , accumulate all resource adjustments:
[0239] ;
[0240] To balance the contribution of each time step, the accumulated results are averaged:
[0241] ;
[0242] 3. Update static task allocation: Feed the cumulative results of dynamic scheduling back to the static allocation plan In the above example, a new allocation scheme is formed:
[0243] ;
[0244] This update ensures that static solutions can gradually adapt to resource changes in dynamic environments and improve the long-term performance of the system.
[0245] (5) Convergence analysis.
[0246] After multiple rounds of alternating optimization of static task allocation and dynamic resource scheduling, the system will gradually approach the global optimal solution. The optimization process terminates when the following convergence conditions are met:
[0247] ;
[0248] in, It represents a preset convergence threshold, which can be changed according to actual conditions and is not specifically limited in this embodiment.
[0249] (6) Summary of the algorithm process.
[0250] The feedback mechanism uses the experience results of dynamic scheduling to update the static task allocation plan after each round of task execution. Through multiple rounds of alternating optimization, the system gradually adapts to changes in the actual environment and improves resource utilization efficiency and task execution performance.
[0251] (7) Advantages and applications.
[0252] 1. Adaptability: The system can continuously optimize the initial allocation plan according to the changes in the dynamic execution process. 2. Stability: Through multiple feedback, the static plan It can gradually converge to the global optimum. 3. Collaborative optimization: The feedback mechanism realizes the close combination of static task allocation and dynamic resource scheduling to ensure the efficient operation of the system.
[0253] 4. Alternating optimization and convergence conditions.
[0254] (1) Reasons for introducing alternating optimization.
[0255] Since the system operates in a dynamic environment, relying solely on static task allocation or dynamic resource scheduling cannot ensure long-term optimal performance. It can provide an initial allocation plan from a global perspective, but it cannot adapt to the dynamic changes of resources and environment during execution. Although it has real-time adjustment capabilities, it is easy to fall into local optimality if it lacks global optimization support. To solve this problem, this embodiment adopts an alternating optimization strategy, which gradually approaches the global optimal solution by alternating static task allocation and dynamic resource scheduling multiple times.
[0256] (2) Definition of alternating optimization.
[0257] In the alternating optimization process, the system updates the static allocation plan according to the feedback mechanism after each round of task execution. , and then use the updated As the basis for the next round of dynamic scheduling, the process continues to iterate until the convergence condition is met.
[0258] (3) Formula description of alternating optimization.
[0259] 1. Initial static task allocation: Use Lagrangian relaxation to solve the static solution:
[0260] ;
[0261] in, represents the initial allocation scheme, represents the Lagrange multiplier.
[0262] 2. Dynamic resource scheduling: At each time step Based on current strategy To make resource adjustments:
[0263] .
[0264] 3. Feedback mechanism: At the end of each round of task execution, the static allocation scheme is updated according to the results of dynamic scheduling:
[0265] .
[0266] 4. Alternating optimization process: After each round of alternating optimization, It will serve as the basis for the next round of dynamic resource scheduling.
[0267] (4) Convergence conditions.
[0268] The alternating optimization of the system will terminate when the following convergence conditions are met:
[0269] ;
[0270] in, Represents the convergence threshold, which is used to control the accuracy of the algorithm. represents the norm of a matrix or vector, Indicates the total number of time steps for task execution.
[0271] If the system meets the above conditions after multiple alternating optimizations, it is considered that the system has reached convergence and the optimization process is terminated.
[0272] (5) Convergence analysis.
[0273] Convergence analysis ensures that the system reaches the optimal state within a finite number of steps:
[0274] 1. Monotonicity: After each alternating optimization, the system's objective function value Will not decrease, that is:
[0275] ;
[0276] in, Indicates the number of iterations of alternating optimization.
[0277] 2. Convergence conditions: Since the objective function is bounded, under the condition of satisfying resource constraints, the objective function of the system will tend to be stable after multiple rounds of iterations.
[0278] 3. Global optimality: Through the alternation of dynamic feedback and static optimization, the system gradually approaches the global optimal solution, which is the target task allocation strategy.
[0279] (6) Summary of the algorithm process.
[0280] The alternating optimization process is as follows:
[0281] 1. Initialize the static allocation scheme and Lagrange multipliers .
[0282] 2. Perform dynamic resource scheduling at each time step Adjust resource allocation .
[0283] 3. Accumulate feedback from dynamic scheduling and update the static task allocation plan:
[0284] ;
[0285] 4. Check the convergence conditions. If the conditions are met, terminate; otherwise, return to step 2.
[0286] (7) Advantages and applications.
[0287] 1. Adaptability: Through dynamic feedback mechanism, the system can adapt to changes in complex environment. 2. Global optimality: Through multiple rounds of alternating optimization, avoid local optimal trap. 3. Robustness: In the face of uncertainty in resources and environment, the system can still maintain high performance.
[0288] Compared with the prior art, this embodiment has the following advantages:
[0289] By introducing a policy gradient-based reinforcement learning method under the MDP decision optimization framework, the resource allocation of each sensor node in the body area network can be optimized in real time, solving the problem that the static resource allocation model in the prior art is difficult to adapt to the dynamic changes of the body area network. Traditional methods usually assume that resources and network states are static, and cannot effectively cope with resource competition between sensor nodes and dynamic changes in network topology. This embodiment introduces a reinforcement learning method and a feedback mechanism, and adjusts the scheduling strategy according to the real-time environment through an adaptive mechanism to ensure efficient collaboration of tasks between different nodes. In addition, this embodiment also designs a dynamic task decomposition and scheduling mechanism, which can flexibly adjust task allocation according to the state of sensor nodes in the body area network and task dependencies, ensuring the timely completion of high-priority and critical tasks. Compared with the traditional centralized scheduling method, the distributed scheduling scheme of this embodiment reduces the load of the central processing node and enhances the flexibility and adaptability of the system. At the same time, through energy efficiency optimization, feedback mechanism and alternating optimization strategy, the redundancy in the data transmission process is significantly reduced, and the battery life of the node is extended. These advantages enable this embodiment to effectively improve task completion efficiency and resource utilization in the body area network, especially in the face of multi-tasks, heterogeneous resources and dynamic topology environments.
[0290] The application scenarios of this embodiment include:
[0291] The technical solution of this embodiment is mainly used for task decomposition and resource scheduling in body area networks, especially in dynamic monitoring scenarios involving multiple sensor nodes such as health monitoring and elderly care. Sensor nodes in body area networks are usually responsible for the collection and processing of different physiological data. The complexity of tasks and the limited node resources make efficient task allocation and resource optimization particularly important. This embodiment optimizes the task allocation between nodes while ensuring the accuracy of data collection through the combination of Lagrangian relaxation method, policy gradient-based reinforcement learning method, feedback mechanism and alternating optimization, thereby ensuring the long-term stable operation of the body area network.
[0292] The technical solution of this embodiment is not only applicable to task decomposition and resource optimization in body area networks, but can also be extended to other dynamic distributed networks, such as the Internet of Things (IoT) or vehicle-to-vehicle network (VANET). In these networks, the framework of this embodiment can also be used to solve problems such as dynamic resource allocation and task scheduling, and has good scalability.
[0293] Reference Figure 2 The embodiment of the present application also provides a dynamic network heterogeneous resource management and task allocation system, which includes a constraint condition construction unit 100, an objective function construction unit 200, an allocation strategy solving unit 300, a resource adjustment amount calculation unit 400, an update strategy construction unit 500 and a target strategy obtaining unit 600, wherein:
[0294] The constraint condition construction unit 100 is used to construct a plurality of constraint conditions to be satisfied when performing heterogeneous resource management and task allocation in a dynamic network;
[0295] An objective function construction unit 200, for constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption;
[0296] An allocation strategy solving unit 300 is used to obtain a static task allocation strategy by using Lagrangian relaxation solution based on the first objective function and multiple constraints;
[0297] The resource adjustment amount calculation unit 400 is used to construct a dynamic task allocation strategy when adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, use a Markov decision process to adjust the resources for each time step to obtain a target resource adjustment amount for each time step, where the time step is determined according to the total execution time of the task;
[0298] An update strategy construction unit 500 is used to construct a static task update strategy according to the static task allocation strategy and the target resource adjustment amount;
[0299] The target strategy obtaining unit 600 is used to obtain the target task allocation strategy by adopting alternating optimization based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy.
[0300] It should be noted that since the dynamic network heterogeneous resource management and task allocation system in this embodiment and the above-mentioned dynamic network heterogeneous resource management and task allocation method are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the system embodiment and will not be described in detail here.
[0301] Reference Figure 3 The embodiment of the present application further provides an electronic device, the electronic device comprising:
[0302] at least one memory;
[0303] at least one processor;
[0304] at least one program;
[0305] The program is stored in the memory, and the processor executes at least one program to implement the above-mentioned dynamic network heterogeneous resource management and task allocation method implemented in the present disclosure.
[0306] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.
[0307] The electronic device according to the embodiment of the present application is described in detail below.
[0308] The processor 1600 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure;
[0309] The memory 1700 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1700, and the processor 1600 calls and executes the dynamic network heterogeneous resource management and task allocation method of the embodiment of the present disclosure.
[0310] Input / output interface 1800, used to implement information input and output;
[0311] Communication interface 1900, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0312] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );
[0313] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .
[0314] The embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned dynamic network heterogeneous resource management and task allocation method.
[0315] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0316] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0317] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present disclosure and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0318] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0319] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0320] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0321] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0322] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0323] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0324] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0325] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs. The above is a detailed description of the embodiments of the present application in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Within the scope of knowledge possessed by ordinary technicians in the relevant technical field, various changes can be made without departing from the purpose of the present application.
Claims
1. A dynamic network heterogeneous resource management and task allocation method, characterized in that: The method comprises: Building multiple constraints that need to be met when managing heterogeneous resources and allocating tasks in a dynamic network; constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption; Based on the first objective function and the plurality of constraints, a static task allocation strategy is obtained by using Lagrangian relaxation solution; Constructing a dynamic task allocation strategy for adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, using a Markov decision process to adjust resources for each time step to obtain a target resource adjustment amount for each time step, wherein the time step is determined according to the total execution time of the task; Constructing a static task update strategy according to the static task allocation strategy and the target resource adjustment amount; Based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy, an alternating optimization is used to obtain a target task allocation strategy.
2. The method for dynamic network heterogeneous resource management and task allocation according to claim 1, characterized in that: The first objective function constructed to maximize the task execution utility and minimize resource consumption and energy consumption includes: ; in, represents the static task allocation strategy matrix, , Indicates the task Assigned to the node , Indicates the task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, Represents the weight coefficient of energy consumption.
3. The method for dynamic network heterogeneous resource management and task allocation according to claim 1, characterized in that: The method of obtaining a static task allocation strategy based on the first objective function and the plurality of constraints by using Lagrangian relaxation solution includes: Constructing an unconstrained objective function according to the first objective function and the plurality of constraints; The unconstrained objective function is solved by Lagrangian relaxation to obtain a static task allocation strategy.
4. The method for dynamic network heterogeneous resource management and task allocation according to claim 3, characterized in that: The step of constructing an unconstrained objective function according to the first objective function and the plurality of constraints comprises: ; in, represents the static task allocation strategy matrix, , Indicates the task Assigned to the node , Indicates the task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Representation Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Representation Node Energy consumption, represents the weight coefficient of energy consumption, Indicates The constraint function of the constraint condition, Indicates The threshold of the constraint condition, Indicates The Lagrange multiplier of the constraints.
5. The method for dynamic network heterogeneous resource management and task allocation according to claim 1, characterized in that: The step of constructing a dynamic task allocation strategy for adjusting resources of the static task allocation strategy, and adjusting resources of each time step by using a Markov decision process based on the dynamic task allocation strategy to obtain a target resource adjustment amount of each time step includes: According to the static task allocation strategy, a dynamic task allocation strategy for adjusting resources in a Markov decision process is constructed; Using the resource adjustment amount in the dynamic task allocation strategy as an action in a Markov decision process; Observe the state of the current time step and make the strategy choose the action corresponding to the current state; Calculate the reward for executing the action corresponding to the current state; According to the reward, the strategy and state of the next time step are updated until the task is completed or the convergence condition of the Markov decision process is reached, and the target resource adjustment amount for each time step is obtained.
6. The method for dynamic network heterogeneous resource management and task allocation according to claim 5, characterized in that: The calculation of the reward when executing the action corresponding to the current state includes: ; in, Indicates reward, Indicates the task At the node The utility of the tasks performed on represents the weight coefficient of task utility, Indicated in Time Node Execute the task resource consumption, represents the weight coefficient of resource consumption, Indicated in Time Node Energy consumption, Represents the weight coefficient of energy consumption.
7. The method for dynamic network heterogeneous resource management and task allocation according to claim 1, characterized in that: The step of constructing a static task update strategy according to the static task allocation strategy and the target resource adjustment amount includes: The target resource adjustment amount of each time step within the total execution time of the task is accumulated and averaged to obtain a first result value; Summing the first result value and the static task allocation strategy to obtain a second result value; The static task allocation strategy is updated using the second result value to construct a static task update strategy.
8. A dynamic network heterogeneous resource management and task allocation system, characterized in that: The system comprises: A constraint construction unit, used to construct multiple constraints that need to be met when performing heterogeneous resource management and task allocation in a dynamic network; An objective function construction unit, for constructing a first objective function for maximizing task execution utility and minimizing resource consumption and energy consumption; An allocation strategy solving unit, configured to obtain a static task allocation strategy by using Lagrangian relaxation solution based on the first objective function and the plurality of constraints; A resource adjustment amount calculation unit is used to construct a dynamic task allocation strategy when adjusting resources for the static task allocation strategy, and based on the dynamic task allocation strategy, use a Markov decision process to adjust the resources of each time step to obtain a target resource adjustment amount for each time step, where the time step is determined according to the total execution time of the task; An update strategy construction unit, configured to construct a static task update strategy according to the static task allocation strategy and the target resource adjustment amount; The target strategy obtaining unit is used to obtain the target task allocation strategy by adopting alternating optimization based on the static task allocation strategy, the dynamic task allocation strategy and the static task update strategy.
9. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the dynamic network heterogeneous resource management and task allocation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the dynamic network heterogeneous resource management and task allocation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for implementing multi-GPU scheduling in virtual distributed heterogeneous environment
CN112612613A
Satellite edge computing task unloading and resource allocation method based on deep reinforcement learning
CN118250750A