Resource allocation method and device based on task execution network, medium and product

By determining node marks and adjusting marks based on task execution effect in the task execution network and building a matching task set, the problem of high computational complexity of resource allocation in complex networks is solved, and efficient resource allocation and user experience are achieved.

CN120407196AActive Publication Date: 2025-08-01SHANDONG HAILIANG INFORMATION TECH RES INST
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510874235.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-08-01
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently allocate resources in complex task execution systems, resulting in high computational complexity, inability to solve complex networks, and poor user experience.

Method used

Through the resource allocation method based on the task execution network, node marks are determined according to the effect of task execution behavior, matching task sets are constructed, and resource allocation is realized by adjusting node marks to meet preset conditions.

Benefits of technology

Maximize the overall benefits of task execution networks in complex networks, ensure that resources are allocated to the most needed places, maximize overall benefits, reduce task resource consumption, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407196A_ABST
    Figure CN120407196A_ABST
Patent Text Reader

Abstract

The invention discloses a resource allocation method and device based on a task execution network, a medium and a product, and relates to the technical field of resource allocation, and the method comprises the steps: determining a corresponding node mark based on the execution effect of a task execution behavior in a current task execution network; target nodes in the current task execution network are updated to be in a matched state, and a current matched task set is constructed according to task execution behaviors of the target nodes; and if the current matching task set does not meet the task execution condition, adjusting the node mark of each node to update the current task execution network until the current matching task set meets the task execution condition, and performing resource allocation in combination with the task consumption resource of each task execution behavior. The target node is determined for matching according to the task execution effect of each execution party, and after the matching task set is constructed according to the matching node, the node marks are continuously adjusted to solve the task execution network to obtain the optimal resource allocation mode, so that the overall benefit of the task execution network can be maximized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of resource allocation, and particularly to a resource allocation method, device, medium, and product based on a task execution network. Background Art

[0002] Currently, there are more and more task executors in the task execution system. How to allocate resources to different task executors to make the final task execution effect of the system the best has become an urgent problem to be solved. However, most of the current solutions to this problem can only be applied to small-scale networks and are only applicable to task execution systems with two task executors. Therefore, how to achieve resource allocation for complex task execution systems is a problem to be solved in this field. Summary of the Invention

[0003] This application provides a resource allocation method, device, medium, and product based on a task execution network to at least solve the problems of high computational complexity and inability to solve complex networks in related technologies, resulting in poor user experience.

[0004] This application provides a resource allocation method based on a task execution network. Nodes in the task execution network represent task executors, and edges between any two nodes in the task execution network represent task execution behaviors between the corresponding two task executors; wherein, the resource allocation method includes:

[0005] Determining node marks corresponding to each node based on the weights of each edge in the current task execution network; wherein, the weight of the edge is a weight determined based on the task execution effect generated by the corresponding task execution behavior;

[0006] Determining target nodes in the current task execution network that meet the first preset task execution condition, updating the node states of the target nodes to be matched, and constructing a current matching task set according to the task execution behaviors corresponding to the target nodes; the first preset task execution condition is that the sum of the node marks of any two nodes is equal to the weight of the corresponding edge;

[0007] If the current matching task set does not meet the second preset task execution condition, then determining a mark adjustment amount based on the node marks of each node, adjusting the node marks of each node according to the mark adjustment amount to obtain an updated current task execution network, and jumping to the step of determining target nodes in the current task execution network that meet the first preset task execution condition, until after the current matching task set meets the second preset task execution condition, performing resource allocation between each task executor based on the current matching task set and the task consumption resources corresponding to each task execution behavior;

[0008] Among them, the second preset task execution condition is that each node in the current matching task set forms a complete path, and there is no node in the current matching task set with an unmatched node state.

[0009] The present application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above resource allocation methods based on a task execution network when executing the computer program.

[0010] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above resource allocation methods based on a task execution network.

[0011] The present application also provides a computer program product including a computer program, which, when executed by a processor, implements the steps of any of the above resource allocation methods based on a task execution network.

[0012] Through the present application, corresponding node markings can be determined based on the execution effects of task execution behaviors in the current task execution network; the target nodes in the current task execution network are updated to the matched state, and the current matching task set is constructed according to the task execution behaviors of the target nodes; if the current matching task set does not meet the task execution conditions, the node markings of each node are adjusted to update the current task execution network until the current matching task set meets the task execution conditions, and then resource allocation is performed in combination with the task consumption resources of each task execution behavior. By determining the target nodes for matching according to the task execution effects of each executor, and then constructing the matching task set according to the matched nodes, and continuously adjusting the node markings to solve the task execution network to obtain the optimal resource allocation method, the overall benefit of the task execution network can be maximized. In this way, first, the target nodes that can perform task matching are determined according to the task execution effects of each task execution behavior in the current task execution network, and then the current matching task set is constructed according to the completed target nodes, and the node markings are continuously adjusted to solve the current task execution network based on the matching task set, and the resource allocation method with the best task execution effect of the current task execution network is obtained for allocation. In a complex computing network, it can also ensure that resources are allocated to the places where they are most needed, maximize the overall benefit, overcome problems such as high computational complexity of existing algorithms, consider the task consumption resources of each task executor at the same time, minimize the task consumption resources while maximizing the resources, and improve the user experience. Description of the Drawings

[0013] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0014] Figure 1 Flowchart of a resource allocation method based on a task execution network provided by an embodiment of the present application;

[0015] Figure 2 Example diagram of the minimum resource consumption stable result provided by an embodiment of the present application;

[0016] Figure 3 Flowchart of an algorithm for matching the best execution effect provided by an embodiment of the present application;

[0017] Figure 4 Schematic diagram of matching the best execution effect based on a task execution loop provided by an embodiment of the present application;

[0018] Figure 5 Flowchart of a specific resource allocation method based on a task execution network provided by an embodiment of the present application. Detailed implementation manners

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.

[0020] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0021] This application can determine target nodes for matching according to the task execution effects of each executor, and then construct a matching task set based on the matching nodes. Subsequently, it continuously adjusts the node labels to solve the task execution network and obtain the optimal resource allocation method, which can maximize the overall benefit of the task execution network. It should be noted that the resource allocation method based on the task execution network in this application is a specific application of the network bargaining model in the resource allocation scenario. The technical solution in this application is not limited to solving the resource allocation method in the resource allocation scenario, but provides a general algorithm process.

[0022] To enable those skilled in the art of this technical field to better understand the solution of this application, the following further elaborates on this application in conjunction with the accompanying drawings and specific implementation manners.

[0023] Specifically, an embodiment of this application provides a resource allocation method based on a task execution network. Nodes in the task execution network represent task executors, and an edge between any two nodes in the task execution network represents a task execution behavior between the corresponding two task executors. Among them, the resource allocation based on the task execution network includes:

[0024] Step S11: Determine the node label corresponding to each node based on the weights of each edge in the current task execution network. Among them, the weight of an edge is a weight determined based on the task execution effect generated by the corresponding task execution behavior.

[0025] In this embodiment, as Figure 2 shown in an example diagram of the minimum resource consumption stable result, first, the relevant parameters used in the process of obtaining the minimum resource consumption and the best execution effect (for example, the highest execution efficiency or the shortest execution time) based on the task execution network in this embodiment are explained.

[0026] First, it should be noted that the task execution network in this embodiment can be regarded as an undirected graph with non - negative weights. Among them, each node corresponds to a task executor (such as a company, department, or individual), the edge corresponds to a task execution behavior, and the weight of each edge is a weight determined based on the task execution effect generated by the corresponding task execution behavior (for example, a weight determined based on task execution efficiency or task execution time). It can be understood that the larger the weight, the better the task execution effect of the corresponding task executor when performing the task execution behavior. If there is a task execution behavior between two task executors, they are allowed to negotiate how to allocate the corresponding task execution effect weight. In addition, in this embodiment, each task executor is allowed to simultaneously execute multiple task execution behaviors. For example: Given a weighted task execution network , where represents the set of all users, represents the set of all task execution behaviors, Represents a user, Represents a task execution behavior composed of the user and the user constitutes a task execution behavior, Represents the user and the user The task execution effect that can be obtained by executing the task execution behavior. At the same time, when the task execution behavior is completed, the user and the user Need to consume resources , Represents the task execution effect that the user can obtain in the task execution behavior . In addition, in this embodiment, it is preset that each user is a rational individual and has the same task execution ability. And it can be understood that the minimum resource consumption stable result of the given graph solved in this embodiment refers to selecting some edges in a weighted graph such that the nodes connected at both ends of these edges are different, and the sum of the weights on these edges is the largest. And this embodiment is not limited to the resource allocation scenario only, and other scenarios that require multi-party cooperation are applicable. This application only specifically describes the resource allocation scenario. For example, in the field of task allocation, it can help find the optimal personnel and resource allocation plan, allocate personnel to different project tasks to maximize the total efficiency, etc. Secondly, on this basis, make it reach an equilibrium state, so as to obtain an approximation algorithm. And the problem of solving the best execution effect in this embodiment is an NP-hard problem (Non-deterministic Polynomial problem, a non-deterministic problem with polynomial complexity), so only an approximation algorithm is sought in this embodiment.

[0027] Specifically, if a user participates in multiple task execution behaviors and respectively obtains the task execution effects as , then the task execution effect set of this user is , and the total benefit of the user is . The minimum value in the above task execution effect set is called the threshold task execution effect, that is . Particularly, if a user agent only participates in one task execution behavior, then its threshold task execution effect is . Based on this, if the minimum task consumption resource stable result is obtained, then a result is recorded as a binary tuple , where represents all those successful task execution behaviors, represents the set of total task execution effects of each proxy user such that , . At the same time, for those not in For the task execution behavior in , . And if the following conditions are met for the task set: , , then the result is called stable. At the same time, for the edges not in the task set , , . It should be noted that in this embodiment, the task resource consumption in the switching network is particularly considered. The task resource consumption set is defined as the total resource consumption required for all successful task execution behaviors, that is . Based on the above definition, the stable result of the minimum task consumption resource in this embodiment is:

[0028] .

[0029] In a specific embodiment, as shown in Figure 2 , it involves the set of task execution behaviors . For the task execution behavior , and ; similarly, for the task execution behavior , and . At the same time, for the edges not in the current matching task set of success, it can be found that the threshold task execution effect of the node satisfies the stability condition, that is: , , . Therefore, the current matching task set is called stable, and the minimum task resource consumption is .

[0030] Such as Figure 3As shown in the figure, in this embodiment, the original task execution network is first input, and the node labels corresponding to each node are determined based on the weights of the edges in the current task execution network; where the weight of an edge is the task execution effect generated by the corresponding task execution behavior. Then, a task set with the minimum task consumption resources and the optimal task execution effect is obtained from the original task execution network. Specifically, an optimal task execution effect matching algorithm based on a flower structure (task execution loop) is proposed for task execution effect matching. Among them, the task execution loop refers to a loop containing an odd number of nodes in the graph. Through the flower structure, all the nodes in it can be considered as a whole. During the matching discovery process, these nodes can be considered as a whole and regarded as a super node, thus playing a role in simplifying the model. Secondly, in this embodiment, the matching is a specific subset of the edge set, and this subset needs to meet the condition that there are no common nodes between any two edges. And the matching that satisfies the optimal task execution effect is the matching with the largest corresponding task execution effect among all matchings. Finally, the root node of the alternating tree is an unmatched node. The points with an even tree depth are called even points, and the points with an odd tree depth are called odd points. And in the alternating tree, the edges in the odd layers are non-matching edges, and the edges in the even layers are matching edges. Based on the above algorithm, the optimal task execution effect matching problem in a general graph can be solved, and by combining techniques such as top label adjustment, alternating tree expansion, odd cycle (task execution loop) contraction and expansion, the optimal task execution effect matching can be found efficiently.

[0031] Specifically, first, the node states of each node in the current task execution network can be set to unmatched, and the weights corresponding to the edges connected to each node in the current task execution network are determined. Then, the maximum value among the weights is determined, and half of the maximum value is used as the node label corresponding to the node. That is, in this embodiment, the node states of each node in the current task execution network can be set to unmatched, and the task execution effects corresponding to the edges connected to each node in the current task execution network are determined. Then, the optimal value among the task execution effects is determined, and half of it is used as the node label corresponding to the node. For example, in this embodiment, a task execution network with weights (including task execution effects and their task consumption resources) is input , and the optimal task execution effect matching set is output . The specific process is as follows: First, initialize the current task execution network, mark all nodes as unmatched, that is, initialize the matching . Then for each node , set the vertex label to half of the optimal task execution effect of all the edges connected to the node , that is:

[0032] ;

[0033] Among them denotes the set of all nodes (i.e., the neighbor set) connected to .

[0034] Step S12: Determine the target nodes in the current task execution network that meet the first preset task execution condition, update the node status of the target nodes to matched, and construct the current matching task set according to the task execution behaviors corresponding to the target nodes; the first preset task execution condition is that the sum of the node labels of any two nodes is equal to the weight of the corresponding edge.

[0035] In this embodiment, the target nodes in the current task execution network that meet the first preset task execution condition can be determined, the node status of the target nodes can be updated to matched, and then the current matching task set can be constructed according to the task execution behaviors corresponding to the target nodes; among them, the first preset task execution condition is that the sum of the node labels of any two nodes is equal to the weight of the corresponding edge. By screening out the specific task execution behaviors that meet the matching conditions from the task execution network and then expanding them in the whole network, the comprehensiveness and integrity in calculating the best task execution effect are improved. The above-mentioned current matching task set is the auxiliary subgraph in this embodiment. Specifically, in this embodiment, an auxiliary subgraph can be constructed based on the current task execution network , where the vertex set remains unchanged, is defined as follows:

[0036] ;

[0037] After that, the edges in are added to , and the alternating tree set is initialized for augmenting path search.

[0038] That is to say, after constructing the current matching task set according to the task execution behaviors corresponding to the target nodes, the edges between the target nodes can be used as matching edges, and the edges in the current task execution network other than the matching edges can be used as non-matching edges. Then, the nodes with the unmatched node state are used as the root nodes of the alternating tree, and the path of the alternating tree is extended based on the root nodes through the matching edges and non-matching edges in sequence to obtain the extended path. If the path end point of the extended path is a node with the unmatched node state, the current matching task set is adjusted based on the extended path. And when adjusting the current matching task set based on the extended path, the nodes with the unmatched node state in the alternating tree can be used as even nodes, the target nodes can be used as odd nodes, and the levels of each even node and odd node in the alternating tree are determined; if the edge between the path end points of two extended paths is a non-matching edge and the levels of each path end point are the same, a task execution loop is constructed based on the extended path, and the current matching task set is adjusted based on the task execution loop. That is, in this embodiment, an augmenting path can be found based on the alternating tree. Specifically, it is a path starting from an unmatched node and passing through an alternating path (alternately appearing matching edges and non-matching edges) to reach another unmatched node. In this way, by using the nodes with the unmatched node state as the root nodes of the alternating tree and extending the path of the alternating tree through the matching edges and non-matching edges in sequence, it can be checked whether there are missing nodes that have not been added to the matching currently, further ensuring the effectiveness of the result. Specifically, when there are unmatched points At this time, taking the node as the tree root (even node, level 0), a breadth-first search (BFS, Breadth-First Search) is used to construct an alternating tree; among them, the even nodes are extended through non-matching edges, and the odd nodes are extended through matching edges. After that, if an unmatched point is encountered and is an even node (that is, an augmenting path is found), it is successful; when encountering an edge between even nodes at the same level (that is, forming an odd cycle), a task execution loop is constructed by contraction; if it cannot be extended and there is no odd cycle (constructing a task execution loop), the tree construction fails.

[0039] During the process of adjusting the current matching task set based on the task execution loop, when contracting to construct the task execution loop, the task execution loop can be used as a virtual node, and the edges between the nodes in the task execution loop and the nodes outside the task execution loop are adjusted to the edges between the virtual node and the nodes outside the task execution loop. Then, the maximum weight corresponding to the edges in the task execution loop is determined, and the maximum weight is used as the weight of the edges between the virtual node and the nodes outside the task execution loop. For example: identifying an odd cycle: the path and the path meet at the edge (the node is an even node at the same level), then contraction is performed. First, the loop base , that is, the node with the smallest depth in the ring, and create a super vertex (i.e., a virtual node), replace all nodes in the ring, and then update the edges corresponding to the odd ring, that is, move all the edges connected to the ring to , and record the ring structure (the vertex order and matching relationship of the odd ring). In this way, when expanding the path through the alternating tree, multiple nodes can be constructed into a task execution loop (i.e., a flower structure), and the task execution behavior can be regarded as a whole for matching, effectively reducing the complexity of the algorithm, so that the present application can be extended to complex networks and improve the calculation efficiency.

[0040] Step S13: If the current matching task set does not meet the second preset task execution condition, determine the marking adjustment amount based on the node markings of each node, adjust the node markings of each node according to the marking adjustment amount to obtain the updated current task execution network, and jump to the step of determining the target node that meets the first preset task execution condition in the current task execution network, until the current matching task set meets the second preset task execution condition, and then perform resource allocation among the task executors based on the current matching task set and the task consumption resources corresponding to each task execution behavior; wherein, the second preset task execution condition is that the nodes in the current matching task set form a complete path, and there is no node with an unmatched state in the current matching task set.

[0041] In this embodiment, if the current matching task set does not meet the second preset task execution condition, determine the marking adjustment amount based on the node markings of each node, adjust the node markings of each node according to the marking adjustment amount to obtain the updated current task execution network, and then jump to the step of determining the target node that meets the first preset task execution condition in the current task execution network, until the current matching task set meets the second preset task execution condition, and then perform resource allocation among the task executors based on the current matching task set and the task consumption resources corresponding to each task execution behavior; wherein, the second preset task execution condition is that the nodes in the current matching task set form a complete path, and there is no node with an unmatched state in the current matching task set.

[0042] Specifically, first, the difference between the sum of the node markings of any two nodes and the weight of the corresponding edge can be determined, and the difference is used as the initial adjustment amount. If one of the nodes of the current edge is an even node and the other node does not exist in the alternating tree, directly use the minimum value in the initial adjustment amount as the marking adjustment amount (relaxation amount); if both nodes corresponding to the current edge are even nodes, use half of the minimum value in the initial adjustment amount as the marking adjustment amount (relaxation amount). The specific calculation process is as follows:

[0043] ;

[0044] ;

[0045] Correspondingly, if the current node is an even node, then decrease the node label corresponding to the current node by the label adjustment amount; if the current node is an odd node, then increase the node label corresponding to the current node by the label adjustment amount. The specific calculation process is as follows:

[0046] The top label adjustment scheme for even nodes is: ;

[0047] The vertex adjustment scheme for odd nodes is: .

[0048] After that, it is necessary to expand the task execution loop. Specifically, if the extended path passes through a virtual node, then restore the virtual node to the task execution loop again, and determine the root node in the task execution loop, and continue to expand the path of the alternating tree based on the root node. That is to say, the trigger condition for expanding the task execution loop in this embodiment is that the augmenting path passes through the super vertex. The specific steps are: restore the loop structure, and then start constructing a matching from the flower root (the node with the smallest number of layers in the task execution loop): that is, retain the matching edge of the flower root and alternately select the matching edges on the loop. After that, when continuing to perform the matching, if there is no unmatched point or is infinity, then output the final matching and its maximum weight. In this way, by solving the optimal task execution effect matching in the graph, combining techniques such as top label adjustment, alternating tree expansion, odd cycle contraction and expansion, etc., the maximum weight matching can be found in polynomial time, which has high practical value, and the algorithm logic is simple, the operation is easy, and the computational complexity is low. Compared with other methods, the algorithm has strong scalability and can be applied to large-scale switching networks. For example, in the task execution network in this embodiment, the target nodes that can perform task matching can be determined according to the task execution effects of each task execution behavior in the current task execution network, and then after constructing the current matching task set according to the target nodes that have completed the matching, continuously adjust the node labels to solve the current task execution network based on the matching task set, and obtain the resource allocation method with the best task execution effect of the current task execution network for allocation. In a complex computing network, it can also ensure that resources are allocated to the places where they are most needed, maximize the overall benefit, overcome the problems of high computational complexity of existing algorithms, and at the same time consider the resource consumption of each task execution party for task execution, minimize the task consumption resources while maximizing the resources, and improve the user experience.

[0049] In a specific embodiment, assume there is a weighted graph with 4 nodes in the graph, and the adjacency matrix of the edges is as Figure 4 shown, then the solution process for the best task execution effect is as follows:

[0050] Step 1. Initialization:

[0051] ① Initialize vertex mark, for each node , set vertex mark For Half of the maximum weight of the connected edge (task execution effect), that is:

[0052] ;

[0053] ;

[0054] ;

[0055] ;

[0056] ②Build auxiliary subgraph , where the vertex set remain unchanged, ;

[0057] After judgment , so the The edge (A, C) in is added to the matching , then the unmatched node is and nodes .

[0058] Step 2: Search for augmenting paths:

[0059] Table 1 Slave nodes Schematic diagram of starting (even point) search for augmenting paths

[0060]

[0061] Conclusion: The augmenting path cannot be expanded, and the interleaved tree only contains nodes , that is, tree T_B={B}.

[0062] Table 2 Slave nodes Schematic diagram of starting (even point) search for augmenting paths

[0063]

[0064] Conclusion: The augmenting path cannot be expanded, and the interleaved tree only contains nodes , that is, tree T_D={D}.

[0065] In summary, as of now, the auxiliary subgraph Contains only Edge, Node 、 It is not possible to link to any node via an edge in the auxiliary subgraph.

[0066] Step 3: Top mark adjustment:

[0067] 1. Amount of slack Calculation:

[0068] Table 3 Schematic diagram of relaxation calculation results

[0069]

[0070] Therefore is the minimum value in the above table, ;

[0071] 2. Update the top label:

[0072] Table 4 Schematic diagram of top mark update results

[0073]

[0074] 3. Update the auxiliary subgraph :

[0075] Table 5 Schematic diagram of auxiliary subgraph update results

[0076]

[0077] In summary, as of now, the auxiliary subgraph Contains only side, side.

[0078] Step 4: Re-search the augmenting path:

[0079] 1. Slave node Start (even point, layer 0):

[0080] Table 6 Node Schematic table of search results for augmented paths

[0081]

[0082] ① From (Singularity) to expand:

[0083] Table 7 Node Schematic table of augmented path expansion results

[0084]

[0085] ② From (Even point) to expand:

[0086] Table 8 Node Schematic table of augmented path expansion results

[0087]

[0088] 2. Slave Node Start (even vertex):

[0089] Table 9 Nodes Schematic table of the result of searching for an augmenting path

[0090]

[0091] In summary, no augmenting path has been generated so far. The reason is the alternating tree of has not matched node D. Therefore, it is necessary to continue the secondary adjustment of the vertex label.

[0092] Step Five: Secondary adjustment of vertex labels:

[0093] 1. Calculate the slack : (Only node D is not covered, so only consider the following one edge):

[0094] Table 10 Schematic table of the secondary calculation result of the slack

[0095]

[0096] 2. Secondary update of vertex labels:

[0097] Table 11 Schematic table of the secondary update result of vertex labels

[0098]

[0099] 3. Update the auxiliary subgraph :

[0100] Table 12 Auxiliary sub Figure 2 Schematic table of the secondary update result

[0101]

[0102] In summary, up to now, the auxiliary subgraph only contains edge, , edge.

[0103] Step Six: Discover an augmenting path:

[0104] 1. Start from (even vertex):

[0105] ① to is a non-matching edge, and is an odd vertex;

[0106] ② to is a matching edge, and is an even vertex;

[0107] ③ to is a non-matching edge, and is an unmatched point.

[0108] Therefore, if an unmatched point is reached through a non-matching edge, then is an augmenting path.

[0109] 2. Augmenting operation:

[0110] ①Original matching: ;

[0111] ②Path edges: (non-matching), (matching);

[0112] ③New matching: ;

[0113] ④Edge has a weight of 3, and edge has a weight of 2. Therefore, the best task execution effect is 3 + 2 = 5.

[0114] Therefore, the final maximum weight matching value is 5.

[0115] Based on the previous embodiment, it can be known that the present application can determine the target nodes that can perform task matching according to the task execution effects of each task execution behavior in the current task execution network, and then construct the current matching task set according to the target nodes that have completed the matching, and continuously adjust the node labels to solve the current task execution network to obtain the resource allocation method with the best task execution effect. Next, in this embodiment, the process of adjusting the node labels to solve the current task execution network will be elaborated in detail. Refer to Figure 5 As shown, an embodiment of the present application provides a specific resource allocation method based on a task execution network, including:

[0116] Step S21, construct a first task set according to the task execution network constructed for the first time, and construct a second task set according to the matching edges in the current matching task set that meet the second preset task execution conditions; construct a third task set according to the non-matching edges in the current matching task set that meet the second preset task execution conditions.

[0117] In this embodiment, considering that the currently obtained task execution effect maximization set may not necessarily meet the stability condition, the network and the preset parameter To the stable result adjustment strategy model, convert it into an approximate minimum task-consuming resource stable result. Specifically, in this embodiment, in addition to the best task execution effect result, the resource consumption of each task execution behavior is also considered. For example, for each edge on the network with two parameters and of, is the task execution effect of the task execution behavior, is the task-consuming resource for completing the task execution behavior, and it is necessary to determine whether there is a stable result with the minimum task resource consumption in the given network. In the specific scenario of this embodiment, the current task execution network has multiple task execution nodes, each node needs to execute the corresponding task, and each task is jointly executed by two task executors and consumes a certain amount of resources respectively. Therefore, the goal of solving the task execution network in this embodiment is to achieve the fastest execution method for all tasks in the current system with the least resource consumption. Correspondingly, in another specific application scenario, for example, a company has multiple departments and needs to complete corresponding projects. Each project must be completed by two departments in cooperation. If the two departments reach a consensus, the task execution effect is allocated and the task-consuming resources are paid. Correspondingly, for the company, the goal is to make all departments reach a consensus with the minimum total task-consuming resources.

[0118] Specifically, first, a first task set can be constructed according to the initially constructed task execution network, and a second task set can be constructed according to the matching edges in the current matching task set that meet the second preset task execution condition. Then, a third task set can be constructed according to the non-matching edges in the current matching task set that meet the second preset task execution condition. That is, the first task set in the previous embodiment: ; The second task set: (matching); The third task set: (non-matching).

[0119] Step S22, after removing the task execution behaviors in the second task set from the first task set, use the union of the updated first task set and the third task set as the task set to be executed, and based on the task set to be executed and the task-consuming resources corresponding to each task execution behavior in the task set to be executed, perform resource allocation among the task executors.

[0120] In this embodiment, after removing the task execution behaviors in the second task set from the first task set, use the union of the updated first task set and the third task set as the task set to be executed, and based on the task set to be executed and the task-consuming resources corresponding to each task execution behavior in the task set to be executed, perform resource allocation among the task executors. Specifically, the process of obtaining the task set to be executed is as follows: .

[0121] Specifically, in this embodiment, to obtain a stable and balanced result, an approximation method for stable results is proposed based on the best task execution effect matching to adjust the task execution effect and task consumption resources of each task execution behavior in the original network. First, the task execution behaviors in the set of tasks to be executed are regarded as tasks to be executed, and the weights corresponding to the tasks to be executed are updated based on twice the weights corresponding to the tasks to be executed, and the task consumption resources corresponding to the tasks to be executed are updated based on twice the task consumption resources corresponding to the tasks to be executed; based on the updated weights and updated task consumption resources, the target execution effect and target resources corresponding to the tasks to be executed are determined, and resource allocation is performed among the task executors according to the target execution effect and target resources. Correspondingly, in the task execution network, in this embodiment, each task execution behavior (edge) obtained in the previous embodiment needs to be adjusted: for each edge in the task set , the task execution effect is doubled, and the increased task execution effect is denoted as ; for each edge , its task consumption resource is doubled, and the increased task consumption resource is denoted as .

[0122] Correspondingly, the node label of the node corresponding to the task to be executed can be adjusted to the updated weight, and the node labels of the nodes corresponding to the non-matching edges in the third task set can be adjusted to zero, and then the target execution effect and target resources corresponding to the tasks to be executed are determined based on the adjusted node labels of each node. That is to say, in this embodiment, based on the changed weight and the obtained set of best task execution effect matches, the actual final task execution effect obtained by each agent can be adjusted. Specifically, for the two agents of each task execution behavior : the task execution effect of agent , the task execution effect of agent . And for each conditional edge in the non-matching, the task execution effect obtained by each corresponding agent is set to 0; then the benefits and the sum of weights of the current best task execution effect match are counted, which are respectively:

[0123] , .

[0124] It should be noted that during the process of allocating resources among the task executors, the number of nodes that are not currently participating in the task execution behavior can be determined; if the number of nodes is greater than the preset number, a preset number of nodes are randomly determined from the nodes that are not currently participating in the task execution behavior, and the to-be-executed tasks between the preset number of nodes and the nodes in the to-be-executed task set are constructed, and then based on the target execution effect and target resources, the task execution effect and task consumption resources corresponding to the to-be-executed tasks are updated. For example, if the number of nodes participating in the task execution is greater than the parameter , randomly select of them and the nodes in the executed task set to form a task execution behavior and make the two parties of the task execution behavior evenly divide the corresponding task execution effect, and at the same time update the corresponding task resource consumption. That is to say, after determining the number of nodes that are not currently participating in the task execution, if the number of nodes is greater than the preset number, a preset number of nodes are randomly determined from the nodes that are not currently participating in the task execution behavior, and the to-be-executed tasks between the preset number of nodes and the nodes in the to-be-executed task set are constructed, and then based on the target execution effect and target resources, the task execution effect and task consumption resources corresponding to the to-be-executed tasks are updated.

[0125] Through the above technical solutions, this embodiment solves the problems of high current computational complexity and large response latency, and brings significant beneficial effects in aspects such as resource allocation, network traffic optimization, and system performance improvement. Thus, it not only improves the overall efficiency and performance of the system, but also enhances the reliability and user experience of the system. In this way, by reasonably utilizing the maximum weight matching algorithm, optimal utilization of resources can be achieved in various practical application scenarios, thereby bringing significant economic and social benefits. For example: in the task assignment scenario, there is a weight between each task and each agent, representing the efficiency or benefit of the agent to complete the task. Through the maximum weight matching algorithm, an optimal assignment scheme can be found to maximize the total efficiency or total benefit, while minimizing the task consumption of resources while maximizing resources; in the field of computer networks and communications, the maximum weight matching algorithm can be used to optimize the allocation of network traffic. For example, in multi-path routing, each path has a weight representing its bandwidth, latency, or other performance metrics. Through maximum weight matching, an optimal path allocation scheme can be found to maximize the overall performance of the network. And through maximum weight matching, traffic is allocated to the most efficient paths, thereby improving the overall throughput of the network. In this way, the optimal path allocation can reduce the latency of data transmission and improve the user experience. At the same time, by reasonably allocating traffic, certain paths can be prevented from being overloaded, thereby enhancing the reliability and stability of the network; in system design and optimization, the maximum weight matching algorithm can be used to optimize the connection and interaction between components. For example, in a distributed system, there is a weight between each node and each task, representing the ability of the node to process the task or the resources consumed by the task. Through maximum weight matching, an optimal task assignment scheme can be found to maximize the overall performance of the system.

[0126] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0127] The embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the resource allocation method based on the task execution network.

[0128] The embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the resource allocation method based on the task execution network when running.

[0129] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs, such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disks, magnetic disks, or optical discs.

[0130] The embodiments of the present application also provide a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the resource allocation method based on a task execution network.

[0131] The embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the resource allocation method based on a task execution network.

[0132] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0133] The above has introduced in detail a resource allocation method, device, medium, and program product based on a task execution network provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.

Claims

1. A resource allocation method based on a task execution network, characterized in that, Nodes in the task execution network represent task executors, and edges between any two nodes in the task execution network represent task execution behaviors between the corresponding two task executors; wherein, the method includes: Determine node labels corresponding to each node based on the weights of each edge in the current task execution network; wherein, the weight of the edge is a weight determined based on the task execution effect generated by the corresponding task execution behavior; Determine target nodes in the current task execution network that meet the first preset task execution condition, update the node status of the target nodes to matched, and construct a current matching task set according to the task execution behaviors corresponding to the target nodes; the first preset task execution condition is that the sum of the node labels of any two nodes is equal to the weight of the corresponding edge; If the current matching task set does not meet the second preset task execution condition, determine a label adjustment amount based on the node labels of each node, adjust the node labels of each node according to the label adjustment amount to obtain an updated current task execution network, and jump to the step of determining target nodes in the current task execution network that meet the first preset task execution condition, until the current matching task set meets the second preset task execution condition, and then perform resource allocation between each task executor based on the current matching task set and the task consumption resources corresponding to each task execution behavior; Wherein, the second preset task execution condition is that the nodes in the current matching task set form a complete path, and there are no nodes with an unmatched node status in the current matching task set.

2. The resource allocation method based on a task execution network according to claim 1, wherein The determining node labels corresponding to each node based on the weights of each edge in the current task execution network includes: Set the node status of each node in the current task execution network to unmatched, and determine the weights corresponding to each edge connected to each node in the current task execution network; Determine the maximum value among the weights, and use half of the maximum value as the node label of the corresponding node.

3. The resource allocation method based on a task execution network according to claim 2, wherein After constructing the current matching task set according to the task execution behaviors corresponding to the target nodes, it further includes: Regard the edges between the target nodes as matching edges, and regard the edges in the current task execution network other than the matching edges as non-matching edges; Regard the nodes with an unmatched node status as the root nodes of the alternating tree, and expand the path of the alternating tree based on the root nodes through the matching edges and non-matching edges in sequence to obtain an expanded path; If the path end point of the expanded path is a node with an unmatched node status, adjust the current matching task set based on the expanded path.

4. The resource allocation method based on a task execution network according to claim 3, wherein The adjusting the current matching task set based on the expanded path includes: Regard the nodes with an unmatched node status in the alternating tree as even nodes, the target nodes as odd nodes, and determine the levels of each even node and odd node in the alternating tree; If there is an edge between the path end points of two expanded paths that is a non-matching edge, and the levels of each path end point are the same, construct a task execution loop based on the expanded path, and adjust the current matching task set based on the task execution loop.

5. The resource allocation method based on a task execution network according to claim 4, wherein In the process of adjusting the current matching task set based on the task execution loop, the following steps are further included: Regarding the task execution loop as a virtual node, and adjusting the edges between the nodes in the task execution loop and the nodes outside the task execution loop to be the edges between the virtual node and the nodes outside the task execution loop; Determining the maximum weight corresponding to the edges in the task execution loop, and using the maximum weight as the weight of the edges between the virtual node and the nodes outside the task execution loop.

6. The resource allocation method based on a task execution network according to claim 5, wherein, In the process of adjusting the current matching task set based on the task execution loop, the following steps are further included: If the extended path passes through the virtual node, then restore the virtual node to the task execution loop again; Determining the root node in the task execution loop, and continuing to expand the path of the interleaved tree based on the root node.

7. The resource allocation method based on a task execution network according to claim 4, wherein The determination of the marking adjustment amount based on the node markings of each node includes: Determining the difference between the sum of the node markings of any two nodes and the weight of the corresponding edge, and using the difference as the initial adjustment amount; If one of the nodes of the current edge is an even node and the other node does not exist in the interleaved tree, then directly use the minimum value in the initial adjustment amount as the marking adjustment amount; If both nodes corresponding to the current edge are even nodes, then use half of the minimum value in the initial adjustment amount as the marking adjustment amount.

8. The resource allocation method based on a task execution network according to claim 7, wherein The adjustment of the node markings of each node according to the marking adjustment amount includes: If the current node is an even node, then reduce the node marking corresponding to the current node by the marking adjustment amount; If the current node is an odd node, then increase the node marking corresponding to the current node by the marking adjustment amount.

9. The resource allocation method based on a task execution network according to claim 8, wherein The resource allocation among the task executors based on the current matching task set and the task-consuming resources corresponding to each task execution behavior includes: Constructing a first task set according to the initially constructed task execution network, and constructing a second task set according to the matching edges in the current matching task set that meet the second preset task execution condition; Constructing a third task set according to the non-matching edges in the current matching task set that meet the second preset task execution condition; After removing the task execution behaviors in the second task set from the first task set, taking the union of the updated first task set and the third task set as the to-be-executed task set, and performing resource allocation among the task executors based on the to-be-executed task set and the task-consuming resources corresponding to each task execution behavior in the to-be-executed task set.

10. The resource allocation method based on a task execution network according to claim 9, wherein The resource allocation among the task executors based on the to-be-executed task set and the task-consuming resources corresponding to each task execution behavior in the to-be-executed task set includes: Regarding the task execution behaviors in the to-be-executed task set as to-be-executed tasks, and updating the weight corresponding to the to-be-executed task based on twice the weight corresponding to the to-be-executed task, and updating the task-consuming resources corresponding to the to-be-executed task based on twice the task-consuming resources corresponding to the to-be-executed task; Based on the updated weights and the updated task resource consumption, determine the target execution effect and target resources corresponding to the to-be-executed task, and perform resource allocation among the task executors according to the target execution effect and the target resources.

11. The resource allocation method based on a task execution network according to claim 10, wherein The determination of the target execution effect and target resources corresponding to the to-be-executed task includes: Adjust the node label of the node corresponding to the to-be-executed task to the updated weight, and adjust the node labels of the nodes corresponding to the non-matching edges in the third task set to zero; Based on the adjusted node labels of each of the nodes, determine the target execution effect and the target resources corresponding to the to-be-executed task.

12. The resource allocation method based on a task execution network according to claim 11, wherein During the process of performing resource allocation among the task executors, it further includes: Determine the number of nodes that have not participated in task execution currently; If the number of nodes is greater than the preset number, randomly determine a preset number of nodes from the nodes that have not participated in task execution currently, and construct to-be-executed tasks between the preset number of nodes and the nodes in the to-be-executed task set; Based on the target execution effect and the target resources, update the task execution effect and task resource consumption corresponding to the to-be-executed task.

13. An electronic device, characterized in that, It includes: A memory for storing a computer program; A processor for implementing the steps of the resource allocation method based on a task execution network according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the resource allocation method based on a task execution network according to any one of claims 1 to 12 when executed by a processor.

15. A computer program product, comprising a computer program, characterized in that, The computer program implements the steps of the resource allocation method based on a task execution network according to any one of claims 1 to 12 when executed by a processor.

Citation Information

Patent Citations

  • Task distributed scheduling method and system based on resource weight calculation

    CN113608878A

  • Industrial edge computing service time-sensitive control method considering task execution uncertainty

    CN115586965A

  • Optimization method and system based on distributed implementation of edge computing

    CN117579626A

  • Task allocation method and system and computer storage medium

    CN118394487A

  • Data processing method and apparatus, and computer device, storage medium and program product

    WO2022148283A1