Distributed constraint optimization solution method and system based on belief propagation

By introducing fabrication-based distributed constraints to optimize solution methods in the Decimation Max-Sum algorithm, use the pseudo-tree communication structure and faith propagation framework with node contributions to solve the dynamic environment adaptability and task allocation of dynamic environment and task allocation in edge network computing resource scheduling. The problem of efficiency has achieved more efficient computing resource allocation.

CN119356853AActive Publication Date: 2025-01-24CHONGQING UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411381359.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The Decimation Max-Sum algorithm relies on the initial variable selection order and strategy in edge network computing resource scheduling, cannot adapt to the dynamic environment, and is difficult to achieve the optimal allocation of tasks.

Method used

A distributed constraint optimization solution method based on belief propagation is proposed. By constructing a pseudo-tree communication structure based on node contribution priority, combined with the distributed extraction framework of belief propagation, the node status is dynamically adjusted to adapt to environmental changes, and reasonable computing resources are achieved. distribute.

Benefits of technology

This method can alleviate the duplicate calculations of belief transmission on the looping factor diagram, adapt to the dynamic environment, realize the best distribution of tasks, and solve the limitations of the DeCimation Max-Sum algorithm in the calculation resource scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356853A_ABST
    Figure CN119356853A_ABST
Patent Text Reader

Abstract

The invention provides a distributed constraint optimization solution method and system based on belief propagation, which are applied to scheduling of computing resources, and the method comprises the following steps: constructing a pseudo-tree communication structure based on node contribution degree priority based on computing task information of each user equipment and resource conditions of each edge server; according to a pseudo-tree communication structure, an optimal distribution scheme of each calculation task is obtained based on a belief propagation distributed extraction framework; according to the method provided by the invention, the node can determine the belief propagation direction according to the state of the node, the repeated calculation of belief propagation on the loop factor graph is relieved, the state of the node is changed in an iteration mode, the method can adapt to the dynamic change of the environment, the calculation resources are reasonably distributed, and the optimal distribution of tasks is realized; therefore, the problems that when an existing Decimation Max-Sum method achieves computing resource scheduling of the edge network, the method depends on the initial variable selection sequence and strategy, the dynamic environment cannot be adapted, and the optimal task allocation scheme cannot be obtained are solved from the source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computers, and in particular relates to a distributed constraint optimization solving method and system based on belief propagation, which are used for scheduling computing resources. Background Art

[0002] Multi-Agent Systems (MAS) are systems composed of multiple independent agents that can make decisions, perform actions, and interact with the environment and other agents autonomously. Each agent has its own goals, knowledge, and capabilities, and can achieve individual or common goals through communication, collaboration, or competition. Distributed Constraint Optimization Problems (DCOPs) are an important abstraction of multi-agent system collaboration problems. In DCOPs, each agent holds a set of variables, each variable has its own value range, and these variables are restricted by a set of constraints, which can be expressed as constraint cost functions. The goal between agents is to assign a suitable value to all variables to maximize or minimize the global cost function.

[0003] Among the many algorithms for solving the DCOP problem, the approximate reasoning algorithm based on belief propagation is an important class of incomplete algorithms. The Max-Sum algorithm is the approximate reasoning algorithm that belief propagation was first applied to solve the DCOP problem. The Max-Sum algorithm is based on the generalized distributive law (GDL) and realizes the marginalization of the global utility function by propagating and accumulating beliefs on the factor graph. Decimation Max-Sum is a variant based on the Max-Sum algorithm that simplifies the problem by recursively deleting or fixing some variables. Although Decimation Max-Sum can effectively reduce computational complexity and speed up convergence, it also has some disadvantages and limitations. The Decimation Max-Sum algorithm is very sensitive to the initial selection of variable fixing order and strategy, and it is also difficult to adapt to dynamic environments (such as scenarios where variables and constraints change over time). In the computing resource scheduling of edge networks, user devices (such as smartphones, IoT devices, etc.) usually rely on edge servers to process computing tasks. The goal of edge computing is to minimize computing delays and improve the computing efficiency of the system in a distributed manner. Each user device and edge server can be regarded as an intelligent agent, and the goal of the system is to achieve the best allocation of tasks through the Decimation Max-Sum algorithm. However, the standard Decimation Max-Sum may select edge servers for some devices too early, which may lead to subsequent scheduling constraints; in addition, once the allocation is fixed, it is difficult to adapt to dynamic changes in network topology or task requirements.

[0004] Therefore, how to solve the problem that the Decimation Max-Sum algorithm relies on the initial variable selection order and strategy when implementing computing resource scheduling in edge networks and cannot adapt to dynamic environments, and for computing resource scheduling in edge networks, in scenarios where there are multiple user devices and the network topology may change, how the system can reasonably allocate computing resources based on the task requirements of each user device and the resource conditions of the edge server to achieve optimal task allocation is an urgent problem to be solved in this field. Summary of the invention

[0005] The purpose of the present invention is to provide a distributed constraint optimization solution method and system based on belief propagation in view of the defects of the prior art. The present invention is based on the distributed constraint optimization solution method of belief propagation, based on the computing task information of each user device and the resource situation of each edge server, to build a pseudo-tree communication structure based on node contribution priority; according to the pseudo-tree communication structure, based on the distributed extraction framework of belief propagation, the best allocation scheme for each computing task is obtained; the method proposed by the present invention, the node can determine the direction of belief propagation according to its state, alleviate the repeated calculation of belief propagation on the cyclic factor graph, and change the state of the node in an iterative manner, which can adapt to the dynamic changes of the environment, reasonably allocate computing resources, and achieve the best allocation of tasks, thereby fundamentally solving the problem that the existing Decimation Max-Sum method relies on the initial variable selection order and strategy when implementing computing resource scheduling of the edge network, cannot adapt to the dynamic environment, and cannot obtain the best task allocation scheme.

[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:

[0007] The present invention proposes a distributed constraint optimization solution method based on belief propagation, which is applied to the scheduling of computing resources, comprising the steps of:

[0008] S1. Obtain computing task information of each user device and resource status of each edge server;

[0009] S2. Based on the computing task information of each user device and the resource status of each edge server, a pseudo-tree communication structure based on node contribution priority is constructed; the specific steps are:

[0010] User equipment a i Controlled computing tasks i The node contribution is c i , c i The edge server calculates this through the load function. The specific formula is as follows:

[0011]

[0012] Where |D i |Represents the value range size of the task status, N i is a i The set of neighbor servers, T k \t i Indicates that t i The external task set, F k (d i ) represents the load function F k The associated task t i The state value is d i ;

[0013] Based on the node contribution, a pseudo-tree communication structure is constructed; specifically, in the process of constructing the pseudo-tree, each node needs to calculate its own node contribution and broadcast it to neighboring nodes for sorting. The node with a larger node contribution is closer to the root node on the pseudo-tree finally formed;

[0014] S3, according to the pseudo-tree communication structure, based on the distributed extraction framework of belief propagation, obtaining the allocation scheme of each computing task;

[0015] In the distributed extraction framework based on belief propagation, variable nodes have three states, namely, running state run, extraction state decimation and termination state stop; in the framework, there are eight types of messages transmitted, namely, query message QueryMessage and response message ResponseMessage in the belief propagation stage; in the decimation stage, the Ask message sent by the candidate node to the parent node, the response message sent by the parent node to the candidate node, the wakeup message sent by the decimation node to the pseudo-parent node, the accept or reject message returned by the pseudo-parent node, and the decimation message sent by the decimation node to the child node; in the stop stage, the stop message broadcast by the node to the upper-level node;

[0016] In the framework described above, each iteration will go through three stages, the specific process is as follows:

[0017] S31, belief diffusion stage;

[0018] In the belief propagation stage, there are three sub-stages: query stage, response stage and decision stage;

[0019] The query phase: transmitting QueryMessage messages on the connected subgraph composed of nodes in the same state;

[0020] In the response phase, the ResponseMessage message is transmitted on the connected subgraph composed of nodes in the same state;

[0021] The decision stage: nodes in the decimation state: accumulate the ResponseMessage messages of all neighbors in the decimation state, select the assignment that can make the marginal belief optimal as the assignment of this round, and send the assignment to all pseudo-parent nodes in the run state; nodes in the run state: accumulate the ResponseMessage messages of all neighbors in the run state and the value messages of all AC nodes in the decimation state, and select the assignment that can make the marginal belief optimal as the assignment of this round. The formula is as follows:

[0022]

[0023] Where S k Indicates the set of edge servers whose associated user device nodes are in the running state; S j Indicates a i a set of edge servers between the user device and the pseudo-parent user device;

[0024] S32, decimation stage;

[0025] The decimation phase determines the nodes that need to be transferred from the run state to the decimation state, including determining candidate nodes, sending Ask messages, receiving response messages, and sending decimation messages;

[0026] S33, stop stage;

[0027] In the stop phase, the node determines its final assignment, obtains the allocation plan for each computing task, and sends a stop message to all pseudo-parent nodes and parent nodes. Specifically, there are two situations in which a node enters the stop phase: one is that the node is a leaf node and its state is decimation; the other is that the node is a non-leaf node and has received stop messages from all child nodes and pseudo-child nodes.

[0028] Finally, determine whether the convergence or termination conditions are met. If the conditions are met, the process ends. If not, the process returns to the belief propagation stage and starts the next round of iteration.

[0029] The query message QueryMessage is specifically: during the belief propagation process, the user device sends a query message to the edge server, which includes the belief value of the user device. The specific calculation formula is as follows:

[0030]

[0031] Among them, α ij is a regularization factor to prevent the message from increasing without limit in the factor graph, S i \sj Represents the target server s j External user equipment a i All neighbor servers of Indicates the message sent by the server to the user device.

[0032] The response message ResponseMessage is specifically: during the belief propagation process, the edge server sends a response message to the user device, which includes the load corresponding to each value of the task state of the target user device under the current belief and the local load function. The specific calculation formula is as follows:

[0033]

[0034] Among them, A j \a i Except a i Edge servers other than j The set of neighboring user devices.

[0035] The Ask message is as follows: In the decimation phase, all nodes whose parent nodes are in the decimation state are called candidate nodes. In this phase, the candidate nodes send Ask messages to their parent nodes to ask whether they can enter the decimation state. There are two types of Ask messages. If all pseudo-parent nodes of the candidate node are in the run state, the Ask message contains the node contribution c of the current node. i , if the state of any pseudo-parent node of the candidate node is decimation, the Ask message contains the sum of the node contributions of the pseudo-parent nodes of the current node in the decimation state minus the node contribution of the current node, that is,

[0036] The response message is sent from the parent node to the child node. If the child node can enter the decimation state, the message is True, otherwise it is False. When the candidate node receives the response message sent by the parent node as True, and the candidate node has a pseudo-parent node in the decimation state, the candidate node sends a wakeup message to all pseudo-parent nodes in the decimation state. When the node receives the wakeup message, it determines whether it has received the Ask message of the child node. If it has, it returns a reject message to the message sender, otherwise it returns an accept message.

[0037] The decimation message is used by the node to broadcast its own decimation state. If a node receives a wakeup message and a decimation message from the same node, the node will change its state to run. The stop message contains the node assignment of the message sender.

[0038] S32, decimation stage includes:

[0039] S321, determine candidate nodes

[0040] Each node determines whether it is a candidate node based on its own status and the status of its neighboring nodes. Specifically, the conditions that a candidate node must meet are as follows:

[0041]

[0042] where s i Represents node x i The state, s parent Represents x i The state of the parent node;

[0043] S322, Send Ask message

[0044] After determining the candidate nodes, each candidate node will further determine the type and content of the Ask message to be sent to the parent node according to the status of AP and AC, where AP represents the pseudo-parent node device and parent node device of the user device in the pseudo-tree, and AC represents the child node device and pseudo-child node device of the user device in the pseudo-tree; if all AP nodes of the candidate node except the parent node are in the run state, the candidate node sends Ask(1,c i ), where 1 is the Ask message type, c i is the node contribution of the candidate node; if the candidate node has an AP node in the decimation state, the candidate node sends Among them, 2 is the Ask message type, It is the sum of the node contributions of all pseudo-parent nodes of the candidate node that are in the decimation state;

[0045] S323, receiving a response message;

[0046] After receiving the Ask messages from all the child nodes in the run state, the parent node will select the Ask message type 1 and c i The largest node is the winning node. If there is no Ask message type 1, the node with type 2 is selected. The smallest node is the winner. Then, the parent node sends a response message to all child nodes that sent Ask messages. The response message received by the winning node is True, and that received by other nodes is False.

[0047] If a node with a pseudo-parent node in the decimation state receives True, the node will send a wakeup message to all pseudo-parent nodes in the decimation state. After receiving the wakeup message, the pseudo-parent node checks whether it has received the Ask message in this round. If it has, it sends a reject message to the node to indicate that it refuses this state transfer. If not, it sends an accept message to indicate that it accepts this state transfer and changes its own node state from decimation to run.

[0048] S324, sending a decimation message;

[0049] The node that receives the accept message changes its state to decimation and sends a decimation message to all neighboring nodes. After receiving the decimation message, the neighboring nodes store the node's state information.

[0050] The present invention also proposes a distributed constraint optimization solution method based on belief propagation, which is applied to the scheduling of computing resources and is characterized in that it includes the steps of:

[0051] S1. Calculate the node contribution of the computing task controlled by the user device;

[0052] S2. Based on the node contribution, construct a pseudo-tree communication structure based on node contribution priority;

[0053] S3, based on the pseudo-tree communication structure, enter the belief propagation stage; the belief propagation stage includes three sub-stages: query stage, response stage and decision stage; wherein, in the query stage, a query message is sent to its neighbor server; after the belief propagation stage, the assignment of each node in this round and the response message to be used in the next round of iteration are obtained;

[0054] S4, enter the decimation stage, determine whether the decimation conditions are met, and if so, send an Ask message; specifically, in the decimation stage, all nodes whose parent nodes are in the decimation state are called candidate nodes. In this stage, the candidate node sends an Ask message to the parent node to ask the parent node whether it can enter the decimation state;

[0055] S5, the parent node receives the Ask message and determines the winning node, and the parent node sends a response message to all child nodes that sent the Ask message;

[0056] S6, determine whether the response message is True, if so, proceed to step S7, otherwise return to step S3; wherein, the response message received by the winning node is True, and the response message received by other nodes is False;

[0057] S7, determine whether there is a pseudo parent node in the decimation state, if so, the candidate node sends a wakeup message to all pseudo parent nodes in the decimation state, otherwise return to step S3;

[0058] S8, the pseudo-parent node receives the wakeup message and determines whether it has received the Ask message from the child node. If so, it returns a reject message to the message sender, otherwise it returns an accept message;

[0059] S9, the node receives the message and determines whether the received message is the accept message. If so, the node changes its own state to decimation and sends decimation messages to all neighboring nodes. Otherwise, it returns to step S3;

[0060] S10, determine whether the stop condition is met. If the condition is met, the process ends. If not, the process returns to the belief propagation phase of step S3 to start the next round of iteration. In the stop phase, the node determines its final assignment, obtains the allocation plan for each computing task, and sends a stop message to all pseudo-parent nodes and parent nodes.

[0061] The present invention also proposes a distributed constraint optimization solution system based on belief propagation, which is used for scheduling computing resources, and is characterized in that the distributed constraint optimization solution system executes the distributed constraint optimization solution method based on belief propagation, including: a data acquisition module, a pseudo-tree communication structure construction module and a distributed constraint optimization solution module;

[0062] The data acquisition module acquires computing task information of each user device and resource status of each edge server;

[0063] The pseudo-tree communication structure construction module constructs a pseudo-tree communication structure based on node contribution priority based on the computing task information of each user device and the resource status of each edge server;

[0064] The distributed constraint optimization solving module obtains the allocation scheme of each computing task according to the pseudo-tree communication structure and based on the distributed extraction framework of belief propagation.

[0065] The present invention further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.

[0066] Compared with the prior art, it has the following beneficial effects:

[0067] The distributed constraint optimization solving method based on belief propagation proposed in the present invention constructs a pseudo-tree communication structure based on node contribution priority based on the computing task information of each user device and the resource status of each edge server; according to the pseudo-tree communication structure, the optimal allocation scheme for each computing task is obtained based on the distributed extraction framework based on belief propagation; the distributed constraint optimization solving method based on belief propagation proposed in the present invention, the node can determine the direction of belief propagation according to its state, alleviate the repeated calculation of belief propagation on the cyclic factor graph, and change the state of the node in an iterative manner, which can adapt to the dynamic changes of the environment, reasonably allocate computing resources, and achieve the optimal allocation of tasks.

[0068] The distributed constraint optimization solving method based on belief propagation proposed in the present invention establishes a pseudo-tree communication structure based on node contribution priority according to the computing task information of each user device and the resource conditions of each edge server, and dynamically adjusts the status of some nodes in the iterative process of belief propagation to form connected subgraphs in different states; through the decimation stage, the effectiveness of the extraction operation is guaranteed; through the stop stage, the fixed nodes are assigned from the leaf nodes to the upper nodes to accelerate the convergence process, so as to obtain the optimal task allocation plan more accurately and efficiently. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0070] Figure 1 A schematic diagram of a distributed constraint optimization solution method based on belief propagation provided in an embodiment of the present invention.

[0071] Figure 2 A flow chart of a distributed constraint optimization solution method based on belief propagation provided in an embodiment of the present invention.

[0072] Figure 3 A schematic diagram of an edge network example provided by an embodiment of the present invention.

[0073] Figure 4 A schematic diagram of a pseudo-tree communication structure provided by an embodiment of the present invention.

[0074] Figure 5 A schematic diagram of a distributed constraint optimization solving system based on belief propagation provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0075] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0076] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, components and / or combinations thereof.

[0077] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments, but is not intended to be limiting of the present invention. It should also be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0078] The character descriptions are shown in the following table:

[0079]

[0080] The present invention proposes a distributed constraint optimization solution method based on belief propagation, which is applied to the scheduling of computing resources. Figure 1 As shown, the distributed constraint optimization solution method based on belief propagation includes the following steps S1 to S3.

[0081] The present invention proposes a distributed constraint optimization solution method based on belief propagation, which is applied to the scheduling of computing resources, comprising the steps of:

[0082] S1. Obtain computing task information of each user device and resource status of each edge server.

[0083] S2. Based on the computing task information of each user device and the resource status of each edge server, a pseudo-tree communication structure based on node contribution priority is constructed; the specific steps are:

[0084] User equipment a i Controlled computing tasks i The node contribution is c i , c iThe edge server calculates this through the load function. The specific formula is as follows:

[0085]

[0086] The node is the user device, |D i |Represents the value range size of the task status, N i is a i The set of neighbor servers, T k \t i Indicates that t i The external task set, F k (d i ) represents the load function F k The associated task t i The state value is d i ;

[0087] Based on the node contribution, a pseudo-tree communication structure is constructed; specifically, in the process of constructing the pseudo-tree, each node needs to calculate its own node contribution and broadcast it to neighboring nodes for sorting. The node with a larger node contribution is closer to the root node on the pseudo-tree finally formed.

[0088] By constructing a pseudo-tree based on node contribution priority, a basis is provided for guiding the operation of the extraction framework. The node contribution reflects the average influence of the node on the final cost. The higher the average influence, the later its value should be determined in the iteration process.

[0089] S3, according to the pseudo-tree communication structure, based on the distributed extraction framework of belief propagation, obtaining the allocation scheme of each computing task;

[0090] In the distributed extraction framework based on belief propagation, variable nodes have three states, namely, running state run, extraction state decimation and termination state stop; in the framework, there are eight types of messages transmitted, namely, query message QueryMessage and response message ResponseMessage in the belief propagation stage; in the decimation stage, the Ask message sent by the candidate node to the parent node, the response message sent by the parent node to the candidate node, the wakeup message sent by the decimation node to the pseudo-parent node, the accept or reject message returned by the pseudo-parent node, and the decimation message sent by the decimation node to the child node; in the stop stage, the stop message broadcast by the node to the upper-level node;

[0091] Furthermore, the query message QueryMessage is specifically: during the belief propagation process, the user device sends a query message to the edge server, including the belief value of the user device, and the specific calculation formula is as follows:

[0092]

[0093] Among them, α ij is a regularization factor to prevent the message from increasing without limit in the factor graph, S i \s j Represents the target server s j External user equipment a i All neighbor servers of Indicates the message sent by the server to the user device.

[0094] The response message ResponseMessage is specifically: during the belief propagation process, the edge server sends a response message to the user device, which includes the load corresponding to each value of the task state of the target user device under the current belief and the local load function. The specific calculation formula is as follows:

[0095]

[0096] Among them, A j \a i Except a i Edge servers other than j The set of neighboring user devices.

[0097] The Ask message is as follows: In the decimation phase, all nodes whose parent nodes are in the decimation state are called candidate nodes. In this phase, the candidate nodes send Ask messages to their parent nodes to ask whether they can enter the decimation state. There are two types of Ask messages. If all pseudo-parent nodes of the candidate node are in the run state, the Ask message contains the node contribution c of the current node. i , if the state of any pseudo-parent node of the candidate node is decimation, the Ask message contains the sum of the node contributions of the pseudo-parent nodes of the current node in the decimation state minus the node contribution of the current node, that is,

[0098] The response message is sent from the parent node to the child node. If the child node can enter the decimation state, the message is True, otherwise it is False.

[0099] The wakeup message: when the candidate node receives a response message sent by the parent node that is True, and the candidate node has a pseudo-parent node in the decimation state, the candidate node sends a wakeup message to all pseudo-parent nodes in the decimation state.

[0100] The accept or reject message: When a node receives a wakeup message, it determines whether it has received an Ask message from a child node. If so, it returns a reject message to the message sender, otherwise it returns an accept message.

[0101] The decimation message is used by a node to broadcast its own decimation status. If a node receives a wakeup message and a decimation message from the same node, the node changes its own status to run.

[0102] The stop message contains the node assignment of the message sender.

[0103] In the framework described above, each iteration will go through three stages, the specific process is as follows:

[0104] S31, belief diffusion stage;

[0105] In the belief propagation stage, there are three sub-stages: query stage, response stage and decision stage;

[0106] The query phase: transmitting QueryMessage messages on the connected subgraph composed of nodes in the same state;

[0107] In the response phase, the ResponseMessage message is transmitted on the connected subgraph composed of nodes in the same state;

[0108] The decision stage: nodes in the decimation state: accumulate the ResponseMessage messages of all neighbors in the decimation state, select the assignment that can make the marginal belief optimal as the assignment of this round, and send the assignment to all pseudo-parent nodes in the run state; nodes in the run state: accumulate the ResponseMessage messages of all neighbors in the run state and the value messages of all AC nodes in the decimation state, and select the assignment that can make the marginal belief optimal as the assignment of this round. The formula is as follows:

[0109]

[0110] Where S k Indicates the set of edge servers whose associated user device nodes are in the running state; S jIndicates a i a set of edge servers between the user device and the pseudo-parent user device;

[0111] S32, decimation stage;

[0112] The decimation phase determines the nodes that need to be transferred from the run state to the decimation state, including determining candidate nodes, sending Ask messages, receiving response messages, and sending decimation messages;

[0113] S321, determine candidate nodes

[0114] Each node determines whether it is a candidate node based on its own status and the status of its neighboring nodes. Specifically, the conditions that a candidate node must meet are as follows:

[0115]

[0116] where s i Represents node x i The state, s parent Represents x i The state of the parent node;

[0117] S322, Send Ask message

[0118] After determining the candidate nodes, each candidate node will further determine the type and content of the Ask message to be sent to the parent node according to the status of AP and AC, where AP represents the pseudo-parent node device and parent node device of the user device in the pseudo-tree, and AC represents the child node device and pseudo-child node device of the user device in the pseudo-tree; if all AP nodes of the candidate node except the parent node are in the run state, the candidate node sends Ask(1,c i ), where 1 is the Ask message type, c i is the node contribution of the candidate node; if the candidate node has an AP node in the decimation state, the candidate node sends Among them, 2 is the Ask message type, It is the sum of the node contributions of all pseudo-parent nodes of the candidate node that are in the decimation state;

[0119] S323, receiving a response message;

[0120] After receiving the Ask messages from all the child nodes in the run state, the parent node will select the Ask message type 1 and c i The largest node is the winning node. If there is no Ask message type 1, the node with type 2 is selected. The smallest node is the winner. Then, the parent node sends a response message to all child nodes that sent Ask messages. The response message received by the winning node is True, and that received by other nodes is False.

[0121] If a node with a pseudo-parent node in the decimation state receives True, the node will send a wakeup message to all pseudo-parent nodes in the decimation state. After receiving the wakeup message, the pseudo-parent node checks whether it has received the Ask message in this round. If it has, it sends a reject message to the node to indicate that it refuses this state transfer. If not, it sends an accept message to indicate that it accepts this state transfer and changes its own node state from decimation to run.

[0122] S324, sending a decimation message;

[0123] The node that receives the accept message changes its state to decimation and sends a decimation message to all neighboring nodes. After receiving the decimation message, the neighboring nodes store the node's state information for use in the belief propagation process.

[0124] S33, stop stage;

[0125] In the stop phase, the node determines its final assignment, obtains the allocation plan for each computing task, and sends a stop message to all pseudo-parent nodes and parent nodes. Specifically, there are two situations in which a node enters the stop phase: one is that the node is a leaf node and its state is decimation; the other is that the node is a non-leaf node and has received stop messages from all child nodes and pseudo-child nodes.

[0126] Finally, determine whether the convergence or termination conditions are met. If the conditions are met, the process ends. If not, the process returns to the belief propagation stage and starts the next round of iteration.

[0127] The convergence or termination condition is that a preset maximum number of iterations is reached, or all nodes are in a stop state.

[0128] The present invention also proposes a distributed constraint optimization solution method based on belief propagation, which is applied to the scheduling of computing resources, such as Figure 2 As shown, the steps include:

[0129] S1. Calculate the node contribution of the computing task controlled by the user device;

[0130] S2. Based on the node contribution, construct a pseudo-tree communication structure based on node contribution priority;

[0131] S3, based on the pseudo-tree communication structure, enter the belief propagation stage; the belief propagation stage includes three sub-stages: query stage, response stage and decision stage; wherein, in the query stage, a query message is sent to its neighbor server; after the belief propagation stage, the assignment of each node in this round and the response message to be used in the next round of iteration are obtained;

[0132] S4, enter the decimation stage, determine whether the decimation conditions are met, and if so, send an Ask message; specifically, in the decimation stage, all nodes whose parent nodes are in the decimation state are called candidate nodes. In this stage, the candidate node sends an Ask message to the parent node to ask the parent node whether it can enter the decimation state;

[0133] S5, the parent node receives the Ask message and determines the winning node, and the parent node sends a response message to all child nodes that sent the Ask message;

[0134] S6, determine whether the response message is True, if so, proceed to step S7, otherwise return to step S3; wherein, the response message received by the winning node is True, and the response message received by other nodes is False;

[0135] S7, determine whether there is a pseudo parent node in the decimation state, if so, the candidate node sends a wakeup message to all pseudo parent nodes in the decimation state, otherwise return to step S3;

[0136] S8, the pseudo-parent node receives the wakeup message and determines whether it has received the Ask message from the child node. If so, it returns a reject message to the message sender, otherwise it returns an accept message;

[0137] S9, the node receives the message and determines whether the received message is the accept message. If so, the node changes its own state to decimation and sends decimation messages to all neighboring nodes. Otherwise, it returns to step S3;

[0138] S10, determine whether the stop condition is met. If the condition is met, the process ends. If not, the process returns to the belief propagation phase of step S3 to start the next round of iteration. In the stop phase, the node determines its final assignment, obtains the allocation plan for each computing task, and sends a stop message to all pseudo-parent nodes and parent nodes.

[0139] The distributed constraint optimization solving method based on belief propagation proposed in the present invention constructs a pseudo-tree communication structure based on node contribution priority based on the computing task information of each user device and the resource status of each edge server; according to the pseudo-tree communication structure, the optimal allocation scheme for each computing task is obtained based on the distributed extraction framework based on belief propagation; the distributed constraint optimization solving method based on belief propagation proposed in the present invention, the node can determine the direction of belief propagation according to its state, alleviate the repeated calculation of belief propagation on the cyclic factor graph, and change the state of the node in an iterative manner, which can adapt to the dynamic changes of the environment, reasonably allocate computing resources, and achieve the optimal allocation of tasks.

[0140] The distributed constraint optimization solving method based on belief propagation proposed in the present invention establishes a pseudo-tree communication structure based on node contribution priority according to the computing task information of each user device and the resource conditions of each edge server, and dynamically adjusts the status of some nodes in the iterative process of belief propagation to form connected subgraphs in different states; through the decimation stage, the effectiveness of the extraction operation is guaranteed; through the stop stage, the fixed nodes are assigned from the leaf nodes to the upper nodes to accelerate the convergence process, so as to obtain the optimal task allocation plan more accurately and efficiently.

[0141] In a specific implementation, Figure 3 In the edge network example shown, the following steps are included:

[0142] 1. First, a pseudo-tree communication structure is constructed based on the size of the node contribution. Taking user device a4 as an example, the node contribution value of a4 is Similarly, we can calculate the contribution of other nodes as c1=6, c2=6.5, c3=8. According to the size of the node contribution, we can construct the following Figure 4 The pseudo-tree communication structure shown, where the dotted lines represent pseudo edges and the solid lines represent tree edges.

[0143] 2. Then, belief propagation is run. Taking a3 as an example, in the query phase, a3 sends query messages to its neighbor servers s1, s2, and s4. Since this is the first iteration, the query message is initialized to all zeros.

[0144] 3. In the response phase, s1, s2, and s4 calculate the response message through the formula and send the response message to a3.

[0145] 4. In the decision-making stage, after a3 receives the response message, it accumulates the response messages and selects the assignment that minimizes the belief as its own assignment for this round.

[0146] 5. Decimation stage: Since a3 is the root node, it can perform the decimation operation. a3 has no parent node, so it skips the Ask message and response message process and directly changes its state to decimation. It also broadcasts its state to neighboring nodes.

[0147] 6. In the stop phase, if the stop condition is met at this time, the variable node will execute the stop operation and broadcast its value to the upper node.

[0148] 7. Determine whether the loop termination condition is met. If the condition is met, the loop ends; otherwise, return to step 2 to continue execution.

[0149] Figure 5 The embodiment of the present invention provides a distributed constraint optimization solution system based on belief propagation. Figure 5 As shown, the distributed constraint optimization solution system based on belief propagation includes: a data acquisition module, a pseudo-tree communication structure construction module and a distributed constraint optimization solution module;

[0150] The data acquisition module acquires computing task information of each user device and resource status of each edge server;

[0151] The pseudo-tree communication structure construction module constructs a pseudo-tree communication structure based on node contribution priority based on the computing task information of each user device and the resource status of each edge server;

[0152] The distributed constraint optimization solving module obtains the allocation scheme of each computing task according to the pseudo-tree communication structure and based on the distributed extraction framework of belief propagation.

[0153] The above-mentioned distributed constraint optimization solving system based on belief propagation can be implemented in the form of a computer program, and the computer program can be run on a computer device.

[0154] The computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0155] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute a distributed constraint optimization solution method based on belief propagation.

[0156] The processor is used to provide computing and control capabilities to support the operation of the entire computer equipment.

[0157] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium. When the computer program is executed by a processor, the processor can execute a distributed constraint optimization solution method based on belief propagation.

[0158] The network interface is used to communicate with other devices over the network. Those skilled in the art will appreciate that the above-mentioned computer device structure is only a partial structure related to the present application solution, and does not constitute a limitation on the computer device to which the present application solution is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0159] The processor is used to run a computer program stored in the memory, and the program implements the distributed constraint optimization solution method based on belief propagation described in Example 1.

[0160] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0161] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0162] The present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes a distributed constraint optimization solution method based on belief propagation described in Embodiment 1.

[0163] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, or any other computer-readable storage medium that can store program codes.

[0164] Those of ordinary skill in the art will 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 composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0165] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0166] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0168] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A distributed constraint optimization solution method based on belief propagation, applied to the scheduling of computing resources, characterized in that: Includes steps: S1. Obtain computing task information of each user device and resource status of each edge server; S2. Based on the computing task information of each user device and the resource status of each edge server, a pseudo-tree communication structure based on node contribution priority is constructed; the specific steps are: User equipment a i Controlled computing tasks i The node contribution is c i , c i The edge server calculates this through the load function. The specific formula is as follows: Wherein, node represents user equipment; |D i |Represents the value range size of the task status, N i is a i The set of neighbor servers, T k \t i Indicates that t i The external task set, F k (d i ) represents the load function F k The associated task t i The state value is d i ; Based on the node contribution, a pseudo-tree communication structure is constructed; specifically, in the process of constructing the pseudo-tree, each node needs to calculate its own node contribution and broadcast it to neighboring nodes for sorting. The node with a larger node contribution is closer to the root node on the pseudo-tree finally formed; S3, according to the pseudo-tree communication structure, based on the distributed extraction framework of belief propagation, obtaining the allocation scheme of each computing task; In the distributed extraction framework based on belief propagation, variable nodes have three states, namely, running state run, extraction state decimation and termination state stop; in the framework, there are eight types of messages transmitted, namely, query message QueryMessage and response message ResponseMessage in the belief propagation stage; in the decimation stage, the Ask message sent by the candidate node to the parent node, the response message sent by the parent node to the candidate node, the wakeup message sent by the decimation node to the pseudo-parent node, the accept or reject message returned by the pseudo-parent node, and the decimation message sent by the decimation node to the child node; in the stop stage, the stop message broadcast by the node to the upper-level node; In the framework described above, each iteration will go through three stages, the specific process is as follows: S31, belief diffusion stage; In the belief propagation stage, there are three sub-stages: query stage, response stage and decision stage; The query phase: transmitting QueryMessage messages on the connected subgraph composed of nodes in the same state; In the response phase, the ResponseMessage message is transmitted on the connected subgraph composed of nodes in the same state; The decision stage: nodes in the decimation state: accumulate the ResponseMessage messages of all neighbors in the decimation state, select the assignment that can make the marginal belief optimal as the assignment of this round, and send the assignment to all pseudo-parent nodes in the run state; nodes in the run state: accumulate the ResponseMessage messages of all neighbors in the run state and the value messages of all AC nodes in the decimation state, and select the assignment that can make the marginal belief optimal as the assignment of this round. The formula is as follows: Where S k Indicates the set of edge servers whose associated user device nodes are in the running state; S j Indicates a i a set of edge servers between the user device and the pseudo-parent user device; Indicates the message sent by the server to the user device; S32, decimation stage; The decimation phase determines the nodes that need to be transferred from the run state to the decimation state, including determining candidate nodes, sending Ask messages, receiving response messages, and sending decimation messages; S33, stop stage; In the stop phase, the node determines its final assignment, obtains the allocation plan for each computing task, and sends a stop message to all pseudo-parent nodes and parent nodes. Specifically, there are two situations in which a node enters the stop phase: one is that the node is a leaf node and its state is decimation; the other is that the node is a non-leaf node and has received stop messages from all child nodes and pseudo-child nodes. Finally, determine whether the convergence or termination conditions are met. If the conditions are met, the process ends. If not, the process returns to the belief propagation stage and starts the next round of iteration.

2. The method according to claim 1, characterized in that: The query message QueryMessage is specifically: during the belief propagation process, the user device sends a query message to the edge server, including the belief value of the user device, and the specific calculation formula is as follows: Among them, α ij is a regularization factor to prevent the message from increasing without limit in the factor graph, S i \s j Represents the target server s j External user equipment a i All neighbor servers of Indicates the message sent by the server to the user device.

3. The method according to claim 1, characterized in that The response message ResponseMessage is specifically: during the belief propagation process, the edge server sends a response message to the user device, which includes the load corresponding to each value of the task state of the target user device under the current belief and the local load function; the specific calculation formula is as follows: Among them, A j \a i Except a i Edge servers other than j The set of neighboring user devices.

4. The method according to claim 1, characterized in that: The Ask message is as follows: In the decimation phase, all nodes whose parent nodes are in the decimation state are called candidate nodes. In this phase, the candidate nodes send Ask messages to their parent nodes to ask whether they can enter the decimation state. There are two types of Ask messages. If all pseudo-parent nodes of the candidate node are in the run state, the Ask message contains the node contribution c of the current node. i , if the state of any pseudo-parent node of the candidate node is decimation, the Ask message contains the sum of the node contributions of the pseudo-parent nodes of the current node in the decimation state minus the node contribution of the current node, that is, 5. The method according to claim 1, characterized in that The response message is sent from the parent node to the child node. If the child node can enter the decimation state, the message is True, otherwise it is False. When the candidate node receives the response message sent by the parent node as True, and the candidate node has a pseudo-parent node in the decimation state, the candidate node sends a wakeup message to all pseudo-parent nodes in the decimation state. When the node receives the wakeup message, it determines whether it has received the Ask message of the child node. If it has, it returns a reject message to the message sender, otherwise it returns an accept message.

6. The method according to claim 1, characterized in that The decimation message is used by the node to broadcast its own decimation status. If a node receives a wakeup message and a decimation message from the same node, the node will change its status to run; the stop message contains the node assignment of the message sender.

7. The method according to claim 1, characterized in that Step S32, the decimation stage includes: S321, determine candidate nodes Each node determines whether it is a candidate node based on its own status and the status of its neighboring nodes. Specifically, the conditions that a candidate node must meet are as follows: where s i Represents node x i The state, s parent Represents x i The state of the parent node; S322, Send Ask message After determining the candidate nodes, each candidate node will further determine the type and content of the Ask message to be sent to the parent node according to the status of AP and AC, where AP represents the pseudo-parent node device and parent node device of the user device in the pseudo-tree, and AC represents the child node device and pseudo-child node device of the user device in the pseudo-tree; if all AP nodes of the candidate node except the parent node are in the run state, the candidate node sends Ask(1,c i ), where 1 is the Ask message type, c i is the node contribution of the candidate node; if the candidate node has an AP node in the decimation state, the candidate node sends Among them, 2 is the Ask message type, It is the sum of the node contributions of all pseudo-parent nodes of the candidate node that are in the decimation state; S323, receiving a response message; After receiving the Ask messages from all the child nodes in the run state, the parent node will select the Ask message type 1 and c i The largest node is the winning node. If there is no Ask message type 1, the node with type 2 is selected. The smallest node is the winner. Then, the parent node sends a response message to all child nodes that sent Ask messages. The response message received by the winning node is True, and that received by other nodes is False. If a node with a pseudo-parent node in the decimation state receives True, the node will send a wakeup message to all pseudo-parent nodes in the decimation state. After receiving the wakeup message, the pseudo-parent node checks whether it has received the Ask message in this round. If it has, it sends a reject message to the node to indicate that it refuses this state transfer. If not, it sends an accept message to indicate that it accepts this state transfer and changes its own node state from decimation to run. S324, sending a decimation message; The node that receives the accept message changes its state to decimation and sends a decimation message to all neighboring nodes. After receiving the decimation message, the neighboring nodes store the node's state information.

8. A distributed constraint optimization solution method based on belief propagation, applied to the scheduling of computing resources, characterized in that: Includes steps: S1. Calculate the node contribution of the computing task controlled by the user device; S2. Based on the node contribution, construct a pseudo-tree communication structure based on node contribution priority; S3, based on the pseudo-tree communication structure, enter the belief propagation stage; the belief propagation stage includes three sub-stages: query stage, response stage and decision stage; wherein, in the query stage, a query message is sent to its neighbor server; after the belief propagation stage, the assignment of each node in this round and the response message to be used in the next round of iteration are obtained; S4, enter the decimation stage, determine whether the decimation conditions are met, and if so, send an Ask message; specifically, in the decimation stage, all nodes whose parent nodes are in the decimation state are called candidate nodes. In this stage, the candidate node sends an Ask message to the parent node to ask the parent node whether it can enter the decimation state; S5, the parent node receives the Ask message and determines the winning node, and the parent node sends a response message to all child nodes that sent the Ask message; S6, determine whether the response message is True, if so, proceed to step S7, otherwise return to step S3; wherein, the response message received by the winning node is True, and the response message received by other nodes is False; S7, determine whether there is a pseudo parent node in the decimation state, if so, the candidate node sends a wakeup message to all pseudo parent nodes in the decimation state, otherwise return to step S3; S8, the pseudo-parent node receives the wakeup message and determines whether it has received the Ask message from the child node. If so, it returns a reject message to the message sender, otherwise it returns an accept message; S9, the node receives the message and determines whether the received message is the accept message. If so, the node changes its own state to decimation and sends decimation messages to all neighboring nodes. Otherwise, it returns to step S3; S10, determine whether the stop condition is met. If the condition is met, the process ends. If not, the process returns to the belief propagation phase of step S3 to start the next round of iteration. In the stop phase, the node determines its final assignment, obtains the allocation plan for each computing task, and sends a stop message to all pseudo-parent nodes and parent nodes.

9. A distributed constraint optimization solving system based on belief propagation for scheduling computing resources, characterized in that: The distributed constraint optimization solving system executes the distributed constraint optimization solving method based on belief propagation as claimed in claim 1, comprising: a data acquisition module, a pseudo-tree communication structure construction module and a distributed constraint optimization solving module; The data acquisition module acquires computing task information of each user device and resource status of each edge server; The pseudo-tree communication structure construction module constructs a pseudo-tree communication structure based on node contribution priority based on the computing task information of each user device and the resource status of each edge server; The distributed constraint optimization solving module obtains the allocation scheme of each computing task according to the pseudo-tree communication structure and based on the distributed extraction framework of belief propagation.

10. A computer device, characterized in that: The device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Asymmetric distributed constrained optimization method for multi-Agent system

    CN103995750A

  • Asymmetric distributed type constraint optimization algorithm and system for large multi-Agent system

    CN104376382A

  • A method for solving task assignment of an AGV scheduling system by a distributed constrained optimization model

    CN109190900A

  • Continuous distributed constraint optimization problem solving method based on distribution estimation algorithm

    CN115099033A

  • Systems, methods, and articles of manufacture to provide cloud resource orchestration

    US20130111033A1