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

By determining node marks in the task execution network and building matching task sets, and adjusting node marks to meet preset conditions, the resource allocation problem in complex task execution systems is solved, the optimal allocation of resources is achieved, and the user experience and overall benefits are improved.

CN120407196BActive Publication Date: 2025-08-26SHANDONG HAILIANG INFORMATION TECH RES INST
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art cannot effectively solve the resource allocation problem in complex task execution systems, the calculation complexity is high, and the complex network cannot be solved, resulting in poor user experience.

Method used

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

Benefits of technology

In complex computing networks, maximize the overall benefits of the task execution network, 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 CN120407196B_ABST
    Figure CN120407196B_ABST
Patent Text Reader

Abstract

The present application discloses a resource allocation method, device, medium and product based on a task execution network, which relates to the field of resource allocation technology, including: determining corresponding node tags based on the execution effect of the task execution behavior in the current task execution network; updating the target node in the current task execution network to a matched state, and constructing a current matching task set based on the task execution behavior of the target node; if the current matching task set does not meet the task execution conditions, adjusting the node tags of each node to update the current task execution network until the current matching task set meets the task execution conditions, and then performing resource allocation based on the task consumption resources of each task execution behavior. According to the task execution effect of each executor, the target node is determined for matching, and after the matching task set is constructed based on the matching node, the node tags are continuously adjusted to solve the task execution network to obtain the best resource allocation method, which can maximize the overall benefit of the task execution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the increasing number of task execution parties in current task execution systems, allocating resources to these parties to optimize the overall performance of the system has become a pressing issue. However, current solutions to this problem are mostly applicable only to small-scale networks and task execution systems with only two task execution parties. Therefore, how to achieve resource allocation in complex task execution systems remains an unresolved issue in this field. Summary of the Invention

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

[0004] The present application provides a resource allocation method based on a task execution network, wherein 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. The resource allocation method includes:

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

[0006] Determine a target node in the current task execution network that meets a first preset task execution condition, update the node state of the target node to matched, and construct a current matching task set based on the task execution behavior corresponding to the target node; 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;

[0007] If the current matching task set does not meet the second preset task execution condition, a tag adjustment amount is determined based on the node tag of each node, the node tag of each node is adjusted according to the tag adjustment amount, and an updated current task execution network is obtained. The process then jumps to the step of determining a target node in the current task execution network that meets the first preset task execution condition, until the current matching task set meets the second preset task execution condition. Then, based on the current matching task set and the task consumption resources corresponding to each task execution behavior, resources are allocated among the task executors.

[0008] 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 in the current matching task set whose node status is unmatched.

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

[0010] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned resource allocation methods based on the task execution network are implemented.

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

[0012] Through this application, the corresponding node mark can be determined based on the execution effect of the task execution behavior in the current task execution network; the target node in the current task execution network is updated to a matched state, and the current matching task set is constructed according to the task execution behavior of the target node; if the current matching task set does not meet the task execution conditions, the node mark of each node is adjusted to update the current task execution network until the current matching task set meets the task execution conditions, and then the resource consumption resources of each task execution behavior are combined to allocate resources. According to the task execution effect of each executor, the target node is determined for matching, and after the matching task set is constructed based on the matching node, the node mark is continuously adjusted to solve the task execution network to obtain the best resource allocation method, which can maximize the overall benefit of the task execution network. In this way, first, the target nodes for task matching are determined based on the task execution effects of each task execution behavior in the current task execution network. Then, the current matching task set is constructed based on the target nodes that have completed the matching. The node tags are continuously adjusted to solve the current task execution network based on the matching task set, and the resource allocation method that obtains the best task execution effect of the current task execution network is allocated. In complex computing networks, it can also ensure that resources are allocated to where they are most needed, maximize overall benefits, overcome problems such as high computational complexity of existing algorithms, and at the same time consider the task execution resource consumption of each task executor, minimize task consumption resources while maximizing resources, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0014] Figure 1 A flow chart of a resource allocation method based on a task execution network provided in an embodiment of the present application;

[0015] Figure 2 This is an example diagram of the minimum resource consumption stability result provided by the embodiment of the present application;

[0016] Figure 3 Flowchart of the algorithm for optimal performance matching provided in the embodiment of the present application;

[0017] Figure 4 A schematic diagram of the best execution effect matching based on the task execution loop provided in an embodiment of the present application;

[0018] Figure 5 A flowchart of a specific resource allocation method based on a task execution network provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

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

[0021] This application can determine the target nodes for matching based on the task execution results of each executor, and then build a matching task set based on the matching nodes, and continuously adjust the node labels to solve the task execution network to obtain the best resource allocation method, which can maximize the overall benefits of the task execution network. It should be pointed out 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 of the resource allocation scenario, but provides a general algorithm process.

[0022] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0023] Specifically, an embodiment of the present application provides a resource allocation method based on a task execution network, wherein 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 resource allocation based on the task execution network includes:

[0024] Step S11: determining the node label corresponding to each node based on the weight of each edge in the current task execution network; wherein the edge weight is a weight determined based on the task execution effect generated by the corresponding task execution behavior.

[0025] In this embodiment, Figure 2 An example diagram of a minimum resource consumption stabilization result is shown. First, the relevant parameters used in the process of obtaining the minimum resource consumption based on the task execution network in this embodiment and considering the execution effect to be the best (for example, the highest execution efficiency or the shortest execution time) are explained.

[0026] First of all, it should be pointed out that the task execution network in this embodiment can be regarded as a non-negatively weighted undirected graph, in which each node corresponds to a task executor (such as a company, department or individual), and the edge corresponds to the task execution behavior. 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 when the corresponding task executor performs 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 weights. In addition, this embodiment allows each task executor to perform multiple task execution behaviors at the same time. For example: given a weighted task execution network ,in represents the set of all users, Represents the set of all task execution behaviors, Represents a user, Indicates that the user and users A task execution behavior is constituted. Represents a user and users The task execution effect that can be achieved by executing the task execution behavior, and the user and users Requires resources , Indicates the task execution behavior Medium users The task execution effect that can be achieved. In addition, in this embodiment, it is pre-set that each user is a rational individual and has the same task execution ability. And it can be understood that the stable result of the minimum resource consumption of a given graph solved in this embodiment refers to selecting some edges in a weighted graph so that the nodes connected to the two ends of these edges are different and the sum of the weights on these edges is maximized. And this embodiment is not limited to resource allocation scenarios, but can be applied to other scenarios that require multi-party cooperation. 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, assign personnel to different project tasks to maximize overall efficiency, etc. Secondly, on this basis, it can reach a balanced state, thereby obtaining an approximate 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 of polynomial complexity), so this embodiment only seeks an approximate algorithm.

[0027] Specifically, if a user Participated in multiple task execution behaviors And the task execution effects are obtained as , then the task execution effect set of the user is , and the user The total revenue is , the minimum value in the above task execution effect set is called the threshold task execution effect, that is In particular, if a user agent only participates in one task execution behavior, then its threshold task execution effect is Based on this, if the stable result of the minimum task resource consumption is obtained, a result is recorded as a two-tuple ,in represents all successful task execution behaviors, Represents the total task execution effect set of each agent user such that , At the same time, for those who are not The task execution behavior in the user agent is 0, that is, , . And if the following conditions are met for the task set: , , then the result is called stable. At the same time, for edge , It should be noted that this embodiment specifically considers the task resource consumption in the switching network, where the task resource consumption set is defined as the sum of the resources consumed by all successful task execution behaviors, that is, Based on the above definition, the minimum task resource consumption stability result in this embodiment is:

[0028] .

[0029] In a specific embodiment, Figure 2 As shown, the set of task execution behaviors involved For task execution behavior , and Similarly, for task execution behavior , and At the same time, for tasks that are not currently matched successfully , we can find that the threshold task execution effect of the node meets the stability condition, namely: , , Therefore, the current matching task set is called is stable, and the minimum task resource consumption is .

[0030] like Figure 3As shown, 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 each edge in the current task execution network. The edge weights represent the task execution effects generated by the corresponding task execution behaviors. Next, a task set that minimizes task resource consumption and achieves the best task execution effects 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. A task execution loop is a ring in a graph containing an odd number of nodes. The flower structure allows all nodes within it to be considered as a whole. During the match discovery process, these nodes can be considered as a whole and can be treated as a supernode, thereby simplifying the model. Secondly, in this embodiment, a match is a specific subset of an edge set. This subset must satisfy the condition that no two edges share common nodes. The optimal task execution effect match is the match with the highest corresponding task execution effect among all matches. Finally, the root node of the interleaved tree is an unmatched node. Points with even tree depths are called even points, while points with odd tree depths are called odd points. Furthermore, in the interleaved tree, edges at odd levels are unmatched edges, while edges at even levels are matched edges. Based on the above algorithm, the optimal task execution performance matching problem can be solved in general graphs. By combining techniques such as top-index adjustment, interleaved tree expansion, and contraction and expansion of odd-numbered rings (task execution loops), the optimal task execution performance matching can be efficiently found.

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

[0032] ;

[0033] in Represents The set of all connected nodes (i.e., the neighbor set).

[0034] Step S12: determine the target node in the current task execution network that meets the first preset task execution condition, update the node state of the target node to matched, and construct the current matching task set based on the task execution behavior corresponding to the target node; 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 node that meets the first preset task execution condition in the current task execution network can be determined, and the node status of the target node can be updated to matched, and then the current matching task set can be constructed based on the task execution behavior corresponding to the target node; wherein, 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 specific task execution behaviors that meet the matching conditions from the task execution network, and then expanding them in the entire network based on this task execution behavior, the comprehensiveness and completeness of the calculation of the optimal 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 remain unchanged, The definition of is as follows:

[0036] ;

[0037] Afterwards The edges in and initialize the alternating tree set , used for augmenting path search.

[0038] That is, after constructing the current matching task set based on the task execution behavior corresponding to the target node, 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 node with the node status of non-matching can be used as the root node of the interlaced tree, and based on the root node, the path of the interlaced tree is extended through the matching edges and non-matching edges in sequence to obtain an extended path. If the path end point of the extended path is a node with the node status of non-matching, the current matching task set is adjusted based on the extended path. When adjusting the current matching task set based on the extended path, the node with the node status of non-matching in the interlaced tree can be used as an even point, the target node as an odd point, and the number of layers of each even point and odd point in the interlaced tree is determined; if the edge between the path end points of two extended paths is a non-matching edge, and the number of layers of each path end point is the same, then 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 augmented path can be found based on the interlaced tree. Specifically, it is a path that starts from an unmatched node and reaches another unmatched node through an interlaced path (matched edges and unmatched edges appear alternately). In this way, by using the node with the unmatched status as the root node of the interlaced tree and extending the path of the interlaced tree through matching edges and unmatched edges in sequence, it is possible to check whether there are currently missing nodes that are not included in the matching, further ensuring the validity of the results. Specifically, when there is an unmatched node When the node For the root (even point, level 0), a breadth-first search (BFS) is used to construct an alternating tree; even points are expanded through non-matching edges, and odd points are expanded through matching edges. and If the tree is an even point (i.e., an augmenting path is found), it succeeds; if an edge between even points on the same layer is encountered (i.e., an odd cycle is formed), the task execution loop is contracted; if it cannot be expanded and there is no odd cycle (constructing the task execution loop), the tree construction fails.

[0039] In the process of adjusting the current matching task set based on the task execution loop, when shrinking and constructing 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 can be adjusted to the edges between the virtual node and the nodes outside the task execution loop. Then, the maximum weight corresponding to the edge in the task execution loop is determined, and the maximum weight is used as the weight of the edge between the virtual node and the node outside the task execution loop. For example: Identify an odd loop: Path and path On the side Intersection (node is an even point on the same layer), then shrink and first find the ring base , which is the node with the smallest depth in the ring, and creates a super vertex (i.e. virtual nodes), replace all nodes in the ring, and then update the edges corresponding to the odd ring, that is, move all edges connected to the ring to , and records the ring structure (the vertex order and matching relationship of the odd ring). This way, when expanding paths through the interleaved tree, multiple nodes can be constructed into a task execution loop (i.e., a flower structure), and the task execution behaviors can be treated as a whole for matching. This effectively reduces the complexity of the algorithm, allowing this application to be expanded to complex networks and improve computational efficiency.

[0040] Step S13: If the current matching task set does not meet the second preset task execution condition, determine the mark adjustment amount based on the node mark of each node, adjust the node mark of each node according to the mark adjustment amount, 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 allocate resources 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 each node in the current matching task set constitutes a complete path, and there is no node in the current matching task set whose node status is unmatched.

[0041] In this embodiment, if the current matching task set does not meet the second preset task execution condition, the mark adjustment amount is determined based on the node mark of each node, and the node mark of each node is adjusted according to the mark adjustment amount to obtain an updated current task execution network, and then the process jumps 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 the resources are allocated 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 each node in the current matching task set constitutes a complete path, and there is no node in the current matching task set whose node status is unmatched.

[0042] Specifically, we first determine the difference between the sum of the node labels of any two nodes and the weight of the corresponding edge, and use the difference as the initial adjustment. If one of the nodes of the current edge is an even node and the other node does not exist in the interleaving tree, then the minimum value of the initial adjustment is directly used as the label adjustment (slack); if both nodes corresponding to the current edge are even nodes, then half of the minimum value of the initial adjustment is used as the label adjustment (slack). The specific calculation process is as follows:

[0043] ;

[0044] ;

[0045] Correspondingly, if the current node is an even point, the node mark corresponding to the current node is reduced by the mark adjustment amount; if the current node is an odd point, the node mark corresponding to the current node is increased by the mark adjustment amount. The specific calculation process is as follows:

[0046] The top mark adjustment scheme for even points is: ;

[0047] The vertex adjustment scheme of the singularity is: .

[0048] After that, the task execution loop needs to be expanded. Specifically, if the extended path passes through a virtual node, the virtual node is restored to the task execution loop, and the root node in the task execution loop is determined. The path expansion of the interleaved tree is continued based on the root node. In other words, the triggering condition for the expansion of the task execution loop in this embodiment is that the augmented path passes through the super vertex. The specific steps are: restore the ring structure, and then (The node with the smallest number of layers in the task execution loop) starts to construct the match: that is, retain the flower root matching edge and alternately select the matching edge on the loop. When continuing to match, if there is no unmatched point or If it is infinite, the output will be the final match. and its maximum weight. In this way, by solving the optimal task execution effect match in the graph, techniques such as top-mark adjustment, staggered tree expansion, and odd-numbered ring contraction and expansion can be combined to find the maximum weight match in polynomial time. This method has high practical value, simple algorithm logic, easy operation, and low computational complexity. Compared to other methods, the algorithm is highly scalable and can be applied to large-scale switching networks. For example, in the task execution network of this embodiment, the target nodes for task matching can be determined based on the task execution effects of each task execution behavior in the current task execution network. After constructing the current matching task set based on the target nodes that have completed the matching, the node labels are continuously adjusted to solve the current task execution network based on the matching task set. The resource allocation method that obtains the optimal task execution effect of the current task execution network is then allocated. In complex computing networks, this method can also ensure that resources are allocated to where they are most needed, maximizing overall benefits and overcoming the high computational complexity of existing algorithms. At the same time, the task execution resource consumption of each task executor is considered, minimizing task consumption while maximizing resources, thereby improving user experience.

[0049] In a specific embodiment, suppose there is a weighted graph with 4 nodes and the edge adjacency matrix is ​​as follows: Figure 4 As shown in , the specific process of solving the optimal 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 point):

[0089] Table 9 Node Schematic table of search results for augmented paths

[0090]

[0091] In summary, no augmenting path has been generated so far, because Alternation tree Node D is not matched. Therefore, it is necessary to adjust the vertex labels again.

[0092] Step 5: Secondary adjustment of vertex marks:

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

[0094] Table 10 Schematic diagram of relaxation secondary calculation results

[0095]

[0096] 2. Update vertex mark twice:

[0097] Table 11 Schematic table of vertex mark secondary update results

[0098]

[0099] 3. Update the auxiliary subgraph :

[0100] Table 12 Auxiliary Figure 2 Update result table

[0101]

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

[0103] Step 6: Find the augmenting path:

[0104] 1. From Start (even point):

[0105] ① arrive is a non-matching edge, and For the singularity;

[0106] ② arrive is a matching edge, and is an even point;

[0107] ③ arrive is a non-matching edge, and Unmatched points.

[0108] Therefore, the unmatched point is reached through the unmatched edge, then To expand the path.

[0109] 2. Augmentation operation:

[0110] ①Original match: ;

[0111] ②Path edge: (non-match), (match);

[0112] ③New Matching: ;

[0113] ④Edge The weight is 3, the edge The weight is 2, so 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 seen that this application can determine the target node for task matching based on the task execution effect of each task execution behavior in the current task execution network, and then build the current matching task set based on the target node that has completed the matching, and continuously adjust the node mark to solve the current task execution network and obtain the resource allocation method with the best task execution effect. Next, this embodiment will explain in detail the process of adjusting the node mark to solve the current task execution network. Figure 5 As shown, the 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 based on the task execution network constructed for the first time, and construct a second task set based on the matching edges in the current matching task set that meet the second preset task execution condition; construct a third task set based on the non-matching edges in the current matching task set that meet the second preset task execution condition.

[0117] In this embodiment, considering that the currently obtained task execution effect maximization set may not necessarily meet the stability condition, the network can be input and preset parameters To the stable result adjustment strategy model, it is converted into an approximate minimum task consumption resource stable result. Specifically, in addition to the best task execution effect result, this embodiment also considers the resource consumption of each task execution behavior. For example, for each network with two parameters and The edge, is the task execution effect of the task execution behavior, In order to complete the task consumption resources of the task execution behavior, it is necessary to determine whether there is a stable result with the minimum task resource consumption in a given network. In the specific scenario of this embodiment, there are multiple task execution nodes in the current task execution network, each node needs to execute the corresponding task, and each task is jointly executed by two task executors, and each consumes a certain amount of resources. 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 while consuming the least resources. Correspondingly, in another specific application scenario, for example, a company has multiple departments that need 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 consumption resources are paid. Accordingly, for the company, the goal is to use the minimum total task consumption resources to make all departments reach a consensus.

[0118] Specifically, a first task set can be constructed based on the task execution network constructed for the first time, and a second task set can be constructed based on 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 based on 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: ; Second task set: (matching); the third task set: (non-match).

[0119] Step S22: After removing the task execution behaviors in the second task set from the first task set, the union of the updated first task set and the third task set is used as the task set to be executed, and based on the task set to be executed and the task consumption resources corresponding to each task execution behavior in the task set to be executed, resources are allocated among the task executors.

[0120] In this embodiment, after removing the task execution behaviors in the second task set from the first task set, the updated union of the first task set and the third task set is used as the set of tasks to be executed. Based on the set of tasks to be executed and the task consumption resources corresponding to the task execution behaviors in the set of tasks to be executed, resources are allocated among the task executors. Specifically, the process of obtaining the set of tasks to be executed is as follows: .

[0121] Specifically, in order to obtain a stable equilibrium result, this embodiment proposes an approximate method for stable results 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 taken 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 effects and target resources corresponding to the tasks to be executed are determined, and resources are allocated among the task executors according to the target execution effects and target resources. Accordingly, in the task execution network, this embodiment needs to adjust each task execution behavior (edge) in the best task execution effect matching obtained in the previous embodiment: for the task set Each edge in , the task execution effect Doubled, the task execution effect after the increase is recorded as ; Each edge , its tasks consume resources Doubled, the increased task consumption resources are recorded as .

[0122] Accordingly, the node mark of the node corresponding to the task to be executed can be adjusted to the updated weight, and the node mark of the node corresponding to the non-matching edge in the third task set can be adjusted to zero, and then the target execution effect and target resource corresponding to the task to be executed can be determined based on the node mark of each node after adjustment. That is to say, in this embodiment, the actual final task execution effect of each agent can be adjusted based on the changed weight and the obtained best task execution effect matching set. Specifically, each task execution behavior Two agents: Agent Task execution effect ,acting Task execution effect For each conditional edge in the non-matching, set the task execution effect obtained by each corresponding agent to 0; then calculate the sum of the benefits and weights of the current best task execution effect match, which are:

[0123] , .

[0124] It should be pointed out that in the process of allocating resources between 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 tasks to be executed are constructed between the preset number of nodes and the nodes in the set of tasks to be executed. Then, based on the target execution effect and target resources, the task execution effect and task consumption resources corresponding to the task to be executed are updated. For example, if the number of nodes participating in the task execution is greater than the parameter , randomly select one of Nodes and executed tasks The nodes in the task execution behavior constitute a task execution behavior and make the corresponding task execution effect evenly shared by both parties in the task execution behavior, while updating the corresponding task resource consumption. In other words, after determining the number of nodes currently not participating in task execution, if the number of nodes is greater than a preset number, a preset number of nodes are randomly determined from the nodes currently not participating in task execution, and tasks to be executed are constructed between the preset number of nodes and the nodes in the set of tasks to be executed. Then, based on the target execution effect and target resources, the task execution effect and task consumption resources corresponding to the tasks to be executed are updated.

[0125] Through the above technical solution, this embodiment solves the current problems of high computational complexity and large response delays, bringing significant benefits in resource allocation, network traffic optimization, and system performance improvement. This not only improves the overall efficiency and performance of the system, but also enhances system reliability and user experience. Thus, by rationally utilizing the maximum weight matching algorithm, optimal resource utilization can be achieved in a variety of practical application scenarios, resulting in significant economic and social benefits. For example, in task allocation scenarios, each task and each agent has a weight representing the efficiency or benefit of the agent completing the task. Using the maximum weight matching algorithm, the optimal allocation scheme can be found to maximize the overall efficiency or total benefit while minimizing task resource consumption while maximizing resources. In computer networks and communications, the maximum weight matching algorithm can be used to optimize the distribution of network traffic. For example, in multipath routing, each path has a weight representing its bandwidth, latency, or other performance indicators. Using maximum weight matching, the optimal path allocation scheme can be found to maximize the overall performance of the network. Furthermore, through maximum weight matching, traffic is allocated to the most efficient path, thereby improving the overall network throughput. In this way, optimal path allocation can reduce data transmission delays and improve user experience. At the same time, by properly allocating traffic, overload of certain paths can be avoided, thereby enhancing network reliability and stability. In system design and optimization, the maximum weight matching algorithm can be used to optimize the connections and interactions between components. For example, in a distributed system, each node and each task has a weight representing the node's ability to process tasks or the task's resource consumption. Using maximum weight matching, the optimal task allocation scheme can be found to maximize the overall performance of the system.

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

[0127] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the resource allocation method based on the task execution network.

[0128] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned embodiments of the resource allocation method based on the task execution network when running.

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

[0130] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned resource allocation method embodiments based on a task execution network are implemented.

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

[0132] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0133] The above is a detailed introduction to the resource allocation method, device, medium and program product based on the task execution network provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A resource allocation method based on a task execution network, characterized in that: The nodes in the task execution network represent task executors, and the edges between any two nodes in the task execution network represent task execution behaviors between the corresponding two task executors; wherein the method includes: Determining the node label corresponding to each node based on the weight 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 a target node in the current task execution network that meets a first preset task execution condition, update the node state of the target node to matched, and construct a current matching task set based on the task execution behavior corresponding to the target node; 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, a tag adjustment amount is determined based on the node tag of each node, the node tag of each node is adjusted according to the tag adjustment amount to obtain an updated current task execution network, and the process jumps to the step of determining a target node in the current task execution network that meets the first preset task execution condition, until the current matching task set meets the second preset task execution condition, and then resources are allocated among the task executors based on the current matching task set and the task consumption resources corresponding to each task execution behavior; 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 a node status of unmatched.

2. The resource allocation method based on the task execution network according to claim 1, characterized in that: The determining of the node labels corresponding to the nodes based on the weights of the edges in the current task execution network includes: Setting the node status of each node in the current task execution network to unmatched, and determining the weight corresponding to each edge connected to each node in the current task execution network; The maximum value among the weights is determined, and half of the maximum value is used as the node label of the corresponding node.

3. The resource allocation method based on the task execution network according to claim 2, characterized in that: After the current matching task set is constructed according to the task execution behavior corresponding to the target node, the method further includes: The edges between the target nodes are regarded as matching edges, and the edges other than the matching edges in the current task execution network are regarded as non-matching edges; The node with the node status being unmatched is used as the root node of the interleaving tree, and based on the root node, a path of the interleaving tree is extended sequentially through the matching edge and the non-matching edge to obtain an extended path; If the end point of the extended path is a node whose node status is unmatched, the current matching task set is adjusted based on the extended path.

4. The resource allocation method based on the task execution network according to claim 3, characterized in that: The adjusting the current matching task set based on the extended path includes: Nodes in the interleaved tree with an unmatched node status are regarded as even points, and the target node is regarded as an odd point, and the number of layers of each of the even point and the odd point in the interleaved tree is determined; If the edge between the path endpoints of two of the extended paths is a non-matching edge, and the number of layers of the path endpoints is 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.

5. The resource allocation method based on the task execution network according to claim 4, characterized in that: The process of adjusting the current matching task set based on the task execution loop further includes: The task execution loop is used as a virtual node, and edges between nodes in the task execution loop and nodes outside the task execution loop are adjusted to edges between the virtual node and nodes outside the task execution loop; The maximum weight corresponding to the edge in the task execution loop is determined, and the maximum weight is used as the weight of the edge between the virtual node and the node outside the task execution loop.

6. The resource allocation method based on the task execution network according to claim 5, characterized in that: The process of adjusting the current matching task set based on the task execution loop further includes: If the extended path passes through the virtual node, restoring the virtual node to the task execution loop; A root node in the task execution loop is determined, and the path of the interleaving tree is continued to be expanded based on the root node.

7. The resource allocation method based on the task execution network according to claim 4, characterized in that: The determining of the label adjustment amount based on the node label of each node includes: Determine the difference between the sum of the node labels of any two nodes and the weight of the corresponding edge, and use the difference as an 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 the minimum value of the initial adjustment amounts is directly used as the mark adjustment amount; If both nodes corresponding to the current edge are even points, half of the minimum value of the initial adjustment amounts is used as the mark adjustment amount.

8. The resource allocation method based on the task execution network according to claim 7, characterized in that: The adjusting the node mark of each node according to the mark adjustment amount includes: If the current node is an even node, the node mark corresponding to the current node is reduced by the mark adjustment amount; If the current node is a singular point, the node mark corresponding to the current node is increased by the mark adjustment amount.

9. The resource allocation method based on the task execution network according to claim 8, characterized in that: The allocating resources among the task executors based on the current matching task set and the task consumption resources corresponding to the task execution behaviors includes: Constructing a first task set according to the task execution network constructed for the first time, 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 based on the non-matching edges in the current matching task set that meets the second preset task execution condition; After removing the task execution behaviors in the second task set from the first task set, the union of the updated first task set and the third task set is used as the task set to be executed, and resources are allocated among the task executors based on the task set to be executed and the task consumption resources corresponding to each task execution behavior in the task set to be executed.

10. The resource allocation method based on the task execution network according to claim 9, characterized in that: The allocating resources among the task executors based on the set of tasks to be executed and the task consumption resources corresponding to the execution behaviors of the tasks in the set of tasks to be executed includes: Taking the task execution behavior in the set of tasks to be executed as the task to be executed, and updating the weight corresponding to the task to be executed based on twice the weight corresponding to the task to be executed, and updating the task consumption resources corresponding to the task to be executed based on twice the task consumption resources corresponding to the task to be executed; Based on the updated weights and the updated task consumption resources, the target execution effect and target resources corresponding to the task to be executed are determined, and resources are allocated among the task executors according to the target execution effect and the target resources.

11. The resource allocation method based on the task execution network according to claim 10, characterized in that: Determining the target execution effect and target resources corresponding to the task to be executed includes: Adjusting the node mark of the node corresponding to the to-be-executed task to the updated weight, and adjusting the node mark of the node corresponding to the non-matching edge in the third task set to zero; The target execution effect and the target resource corresponding to the task to be executed are determined based on the adjusted node mark of each node.

12. The resource allocation method based on the task execution network according to claim 11, characterized in that: The process of allocating resources among the task executors further includes: Determine the number of nodes that are not currently participating in task execution; If the number of nodes is greater than a preset number, randomly determining a preset number of nodes from the nodes that are not currently participating in task execution, and constructing tasks to be executed between the preset number of nodes and the nodes in the set of tasks to be executed; Based on the target execution effect and the target resources, the task execution effect and task consumption resources corresponding to the task to be executed are updated.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the resource allocation method based on a task execution network as claimed in any one of claims 1 to 12 when executing the computer program.

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

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the resource allocation method based on the task execution network as claimed in any one of claims 1 to 12 are implemented.

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