Method and device for allocating resources of cross-community service nodes based on hierarchical evolutionary game
By constructing a two-layer network of hierarchical evolutionary game theory, the resource allocation strategies between and within communities are optimized, solving the problems of coordination difficulties and poor dynamic adaptability in resource allocation in community-characteristic networks, and achieving stable equilibrium and efficient utilization of network resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2025-06-09
- Publication Date
- 2026-04-28
AI Technical Summary
In service networks with community characteristics, traditional methods are difficult to effectively coordinate the allocation of resources among different communities, especially when communication is limited. This results in low overall network efficiency and poor adaptability to dynamic changes, making it impossible to adjust strategies in a timely manner.
A hierarchical evolutionary game approach is adopted to construct a two-layer network, including inter-community and intra-community networks. Resource allocation strategies are optimized through an evolutionary game model. The inter-community network is constructed using dominant nodes and dynamic edges. By combining network benefit functions and fitness functions, global and local resource optimization is achieved.
It improves the stability and overall efficiency of network resource allocation, and can balance global optimization and local resource allocation efficiency when the network topology changes, avoiding local imbalance and achieving efficient global optimization and stable local balance.
Smart Images

Figure CN120639605B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network resource allocation technology, and more specifically, to a method and apparatus for cross-community service node resource allocation based on hierarchical evolutionary game theory. Background Technology
[0002] Service networks (such as power grids, logistics networks, and industrial networks) contain many heterogeneous nodes. These nodes usually form "clans" or "communities" based on geographical location, functional characteristics, or other factors. For example, in urban environments, due to higher population density, service nodes such as power resources and hospitals are distributed more densely, resulting in denser communication between nodes and relatively lower costs.
[0003] However, in this community-based network structure, resource allocation among service nodes faces two major challenges:
[0004] 1. Difficulty in cross-community coordination: Traditional methods are difficult to effectively coordinate the allocation of resources between different communities, especially when communication between nodes is limited. They cannot obtain a stable and balanced allocation strategy among communities, resulting in low overall network efficiency.
[0005] 2. Poor adaptability to dynamic changes: When the network topology changes (such as the addition of new nodes or communication interruption), traditional methods often cannot adjust strategies in a timely manner.
[0006] Therefore, for service networks with community characteristics, how to optimize resource allocation in a dynamic topology environment with limited communication has become an urgent problem to be solved. Summary of the Invention
[0007] In view of this, the purpose of the present invention is to provide a method and apparatus for cross-community service node resource allocation based on hierarchical evolutionary game theory, so as to improve the stability and balance of network resource allocation and network efficiency.
[0008] Firstly, a cross-community service node resource allocation method based on hierarchical evolutionary game theory is provided, applicable to service networks with community characteristics. The method includes:
[0009] A two-layer network is constructed based on the service network topology graph. The two-layer network includes an inter-club network and an intra-club network. The inter-club network is a cross-club network. The intra-club network is the internal network of each club.
[0010] An initial allocation strategy among communities is randomly generated based on the current total resources of the service network.
[0011] The initial allocation strategy among communities is subjected to evolutionary game theory based on a pre-constructed evolutionary game model. The network benefits among communities under the allocation strategy are calculated based on the pre-constructed network benefit function, until the network benefits among communities are maximized, thus obtaining the optimal allocation strategy among communities and the total amount of resources allocated to each community under the optimal allocation strategy.
[0012] The initial allocation strategy within each community is randomly generated based on the total resources of each community.
[0013] Based on a pre-constructed evolutionary game model, evolutionary games are played on the initial allocation strategies within each community. The internal network benefits of each community are calculated based on a pre-constructed network benefit function, until the internal network benefits of each community are maximized, thus obtaining the optimal internal allocation strategy for each community.
[0014] Optionally, the process of building an inter-community network includes:
[0015] Identify the key nodes for each community group;
[0016] Dynamic edges are constructed between dominant nodes based on dynamic service requirements;
[0017] The community network is constructed based on the dominant node, dynamic edges, and fixed edges between the dominant nodes.
[0018] Optionally, the dominant nodes for each community can be determined as follows:
[0019] For each node within each community, calculate the centrality index separately. The centrality index includes at least the following: degree centrality, proximity centrality, and mesocentric centrality.
[0020] The expression for degree centrality is:
[0021]
[0022] In the formula, x ij This represents the weight of the edge between node i and node j; it is 1 if the graph is unweighted, the weight value if the graph is weighted, and 0 if there is no edge; n is the number of nodes in each community; v i This represents the set of nodes in each community;
[0023] The expression for proximity centrality is:
[0024]
[0025] In the formula: |V| represents the number of nodes in the node set V of the community, d ji This represents the distance between node j and node i;
[0026] The expression for median centrality is:
[0027]
[0028] Where: δ st (v i () represents the shortest path from the starting node s to the ending node t, passing through node v. i The number of shortest paths, δ st This represents the number of all shortest paths from node s to node t;
[0029] The overall importance of each node is calculated based on its centrality index.
[0030] The node with the highest overall importance will be identified as the leading node of the community.
[0031] Optionally, an evolutionary game is performed on the initial allocation strategy among communities based on a pre-built evolutionary game model; and the network benefits among communities under the allocation strategy obtained in each evolutionary game are calculated based on a pre-built network benefit function, until the network benefits among communities are maximized, including:
[0032] Calculate the inter-community network benefits under the initial inter-community allocation strategy based on a pre-constructed network benefit function;
[0033] The marginal contribution of the initial inter-community allocation strategy of each dominant node to the inter-community network benefits is calculated based on a pre-constructed fitness function, and this contribution is called fitness.
[0034] The fitness of each dominant node and the fitness of its neighboring dominant nodes are input into a pre-built evolutionary game model to adjust the initial allocation strategy among communities. The adjustment process is as follows: if the fitness of one of the dominant nodes is greater than the fitness of its neighboring dominant nodes, the allocation strategy of the dominant node is adjusted to acquire the resources of the neighboring dominant node; otherwise, the allocation strategy of the dominant node is adjusted to provide resources to the neighboring dominant node.
[0035] The fitness of each dominant node and its neighboring dominant nodes is recalculated based on the adjusted inter-community allocation strategy.
[0036] The recalculated fitness of each dominant node and its neighboring dominant nodes is input into the pre-constructed evolutionary game model to readjust the inter-community allocation strategy.
[0037] Repeat the above process of calculating fitness and evolutionary game until an equilibrium state is reached in the inter-community network. The equilibrium state is when the dominant node adjusts its community allocation strategy alone without increasing the inter-community network benefit. At this point, the inter-community network benefit is maximized.
[0038] Optionally, the network benefit function consists of profit, resource transportation costs, and resource storage costs, and the expression for the network benefit function is:
[0039]
[0040] In the formula: This represents the impact coefficient of different benefits within the service network; Indicates profit; This represents the cost of transporting resources between nodes; This represents the resource storage cost of a node; k = 1, 2, where k = 1 represents the inter-community network and k = 2 represents the intra-community network.
[0041] Optionally, the evolutionary game model adopts a distributed Smith dynamics model under graphical constraints, the expression of which is:
[0042]
[0043] In the formula: x i x represents the resource quantity of node i; j Let j be the resource quantity of node j; F represents the rate of change of the allocation strategy. i (x) represents the fitness of node i; F j (x) represents the fitness of node j; N i (t) is the set of neighboring nodes of node i.
[0044] Optionally, the equilibrium state of the network among communities is a generalized Nash equilibrium.
[0045] Secondly, a cross-community service node resource allocation device based on hierarchical evolutionary game theory is provided, applicable to service networks with community characteristics. The device includes:
[0046] The building unit is used to construct a two-layer network based on the service network topology graph. The two-layer network includes an inter-club network and an intra-club network; the inter-club network is a cross-club network; the intra-club network is the internal network of each club.
[0047] The first generation unit is used to randomly generate an initial allocation strategy between communities based on the current total resources of the service network.
[0048] The first evolutionary game unit is used to perform evolutionary game on the initial allocation strategy between communities based on a pre-constructed evolutionary game model; and to calculate the network benefits between communities under the allocation strategy obtained in each evolutionary game based on the pre-constructed network benefit function, until the network benefits between communities are maximized, thereby obtaining the optimal allocation strategy between communities and the total amount of resources allocated to each community under the optimal allocation strategy.
[0049] The second generation unit is used to randomly generate the initial allocation strategy within each community based on the total resources of each community.
[0050] The second evolutionary game unit is used to perform evolutionary games on the initial allocation strategies within each community based on a pre-constructed evolutionary game model; and to calculate the internal network benefits of each community under the allocation strategy obtained in each evolutionary game based on a pre-constructed network benefit function, until the internal network benefits of each community are maximized, thus obtaining the optimal internal allocation strategy for each community.
[0051] Thirdly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0052] The memory is used to store computer programs;
[0053] When the processor executes a program stored in the memory, it implements any of the steps of the method described in the first aspect.
[0054] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect.
[0055] This invention provides a method and apparatus for cross-community service node resource allocation based on hierarchical evolutionary game theory. The method constructs a two-layer network based on the service network topology; randomly generates initial allocation strategies between communities based on the current total resource volume of the service network; performs evolutionary game theory on the initial allocation strategies based on a pre-built evolutionary game model; and calculates the inter-community network efficiency under each allocation strategy obtained from the evolutionary game based on a pre-built network efficiency function, until the inter-community network efficiency is maximized; randomly generates initial allocation strategies within each community based on the total resource volume of each community; performs evolutionary game theory on the initial allocation strategies within each community based on the pre-built evolutionary game model; and calculates the internal network efficiency of each community under each allocation strategy obtained from the evolutionary game based on a pre-built network efficiency function, until the internal network efficiency of each community is maximized, thus obtaining the optimal internal allocation strategy for each community. This invention considers the hierarchical and community characteristics of the service network. By reconstructing a two-layer network, it adopts a phased allocation approach during resource allocation, employing hierarchical game theory at both the global and local levels. When the network topology changes, such as in communication-constrained scenarios like adding nodes or communication interruptions, it can balance global optimization with local resource allocation efficiency, avoiding falling into local equilibrium. This enables efficient and stable balance between global optimization and local resource allocation, thereby improving overall network efficiency.
[0056] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0057] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 The flowchart illustrates a cross-community service node resource allocation method based on hierarchical evolutionary game theory provided by an embodiment of the present invention.
[0059] Figure 2 A schematic diagram illustrating the network payoff determined by the traditional single-layer game theory method is shown.
[0060] Figure 3 A schematic diagram illustrating the network payoff determined by the two-layer game method according to an embodiment of the present invention is shown;
[0061] Figure 4 This diagram illustrates the structure of a cross-community service node resource allocation device based on hierarchical evolutionary game theory, as provided in an embodiment of the present invention.
[0062] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0064] A service resource cluster network is a type of network that encompasses various heterogeneous service resource nodes and user nodes in real-world scenarios. Heterogeneous service resource networks can cover a wide range of fields and application scenarios, such as power networks, industrial networks, and logistics networks. Taking a power network as an example, service resource nodes may include power plants, substations, and distribution facilities, while user nodes include electricity-consuming terminals such as homes, factories, and commercial buildings. Because service nodes and user nodes often form relatively concentrated groups or clusters based on geographical, functional, or other factors, service networks typically exhibit community clustering characteristics. For example, in urban environments, due to higher population density, service nodes such as power resources and hospitals are correspondingly more densely distributed, resulting in more intensive communication between nodes and relatively lower costs. In a service network, communication and resource transportation between service nodes and user nodes must adhere to the constraints of the network topology, determining the flow paths and efficiency of data and resources within the network.
[0065] Considering the current network structure with community characteristics, resource allocation among service nodes faces two major challenges:
[0066] 1. Difficulty in cross-community coordination: Traditional methods are difficult to effectively coordinate the allocation of resources between different communities, especially when communication between nodes is limited. They cannot obtain a stable and balanced allocation strategy among communities, resulting in low overall network efficiency.
[0067] 2. Poor adaptability to dynamic changes: When the network topology changes (such as the addition of new nodes or communication interruption), traditional methods often cannot adjust strategies in a timely manner.
[0068] Based on this, embodiments of the present invention provide a method and apparatus for cross-community service node resource allocation based on hierarchical evolutionary game theory, which will be described below through embodiments.
[0069] This invention provides a method for cross-community service node resource allocation based on hierarchical evolutionary game theory, applicable to service networks with community characteristics, such as... Figure 1 As shown, the method includes the following steps:
[0070] Step S101: Construct a two-layer network based on the service network topology graph. The two-layer network includes an inter-community network and an intra-community network.
[0071] In this embodiment of the invention, the service network can be a network in various fields that requires resource allocation, such as a logistics and warehousing network, where various warehouses need to coordinate cargo resources; or a power network, where power plants need to transmit and distribute electricity to various substations.
[0072] Taking a logistics and warehousing network as an example, the topology of this service network is an original topology consisting of warehouses as nodes and interactions or service dependencies between warehouses as edges. This original topology has community characteristics; for example, provinces A, B, and C are each a community, and the nodes within a community are the warehouses in each city. This step involves reconstructing the original network topology of the logistics and warehousing network, constructing a two-layer network. One layer is the inter-community network, which is a cross-community network responsible for global resource allocation across communities. The other layer is the intra-community network, which is the internal network of each community responsible for local resource allocation within each community.
[0073] In a specific example, the original topology of the service network can be represented as G = (V, E), where it is assumed that there are n communities P1, P2, ..., P in graph G. n Then the inter-community network can be represented as G. p =(V p E p ); where V p E represents the set of nodes in an inter-community network. P The set of edges in the inter-club network; the intra-club network can be represented as in For club P i The set of nodes in For club P i The set of internal edges; therefore, the overall network of the two-layer network can be represented as
[0074] This embodiment of the invention, through this layered design, can better adapt to the hierarchical and community characteristics of the service network, and allocate resources from both global and local levels, thereby improving the balance of resource allocation and thus improving the overall network efficiency.
[0075] Step S102: Randomly generate an initial allocation strategy among communities based on the current total resources of the service network.
[0076] In this step, the current total resources of the service network are first obtained to determine the total amount of resources that can be allocated. Then, a certain amount of resources is randomly allocated to each community. For example, if a logistics center has a batch of goods to be allocated, a certain amount of goods is randomly allocated to each community. The allocatable resources for each node satisfy the following conditions:
[0077]
[0078] In the formula, x i Let N be the amount of resources that can be allocated to node i, and N be the total number of nodes in the service network; 1 indicates the current total amount of resources in the service network.
[0079] Step S103: Perform evolutionary game theory on the initial allocation strategy between communities based on the pre-constructed evolutionary game model; and calculate the network benefits between communities under the allocation strategy obtained in each evolutionary game based on the pre-constructed network benefit function, until the network benefits between communities are maximized, thereby obtaining the optimal allocation strategy between communities and the total amount of resources allocated to each community under the optimal allocation strategy.
[0080] Evolutionary Game Theory (EGT) is an analytical framework that combines traditional game theory with principles of evolutionary biology to simulate the dynamic changes of strategies within a population. It primarily focuses on how interactions between individuals influence the distribution of strategies over time, and considers how these strategies evolve in the face of environmental pressures and intrapopulation competition.
[0081] This application uses an evolutionary game model to progressively evolve the initial allocation strategy among communities. After each evolutionary game, the strategy is adjusted to obtain a new allocation strategy among communities. This process is iterated and evolved until the service network reaches a stable equilibrium state. In this stable state, the strategy no longer changes, and the network payoff among communities is maximized. This network payoff reflects the global network payoff.
[0082] Step S104: Randomly generate the initial allocation strategy within each community based on the total resources of each community.
[0083] In this step, the amount of resources allocated to each community is taken as the total amount of resources available for allocation within that community. The amount of resources allocated to each node within a community also satisfies the conditions in Equation 1 above.
[0084] Step S105: Based on the pre-constructed evolutionary game model, perform evolutionary game on the initial allocation strategy within each community; and calculate the internal network benefit of the community under the allocation strategy obtained in each evolutionary game based on the pre-constructed network benefit function, until the internal network benefit of each community is maximized, and obtain the optimal internal allocation strategy of each community.
[0085] In this step, also based on the evolutionary game model, the allocation strategy between various nodes in the community is gradually evolved and played until the equilibrium state of the network within the community is reached. In the equilibrium state of the network within the community, the network payoff within the community is maximized, and the network payoff within the community reflects the local network payoff.
[0086] As can be seen from the above embodiments, the present invention considers the hierarchical and community characteristics of the service network. By reconstructing the service network into a two-layer network, a phased allocation method is adopted during resource allocation. The hierarchical game is performed from both global and local levels. When the network topology changes, such as when adding nodes or communication is interrupted, the efficiency of global optimization and local resource allocation can be balanced, avoiding falling into local equilibrium. This enables efficient and stable balance between global optimization and local resource allocation, thereby improving the overall network efficiency.
[0087] Based on the above embodiments, the process of constructing an inter-community network includes:
[0088] Step S101A: Determine the leading node for each community.
[0089] In this embodiment of the invention, the dominant node is the key service node in the community.
[0090] In a feasible implementation, the node with the highest centrality can be used as the dominant node. Specifically, determining the dominant node for each community includes:
[0091] Step 1: Calculate the centrality index for each node within each community. The centrality index should include at least the following: degree centrality, proximity centrality, and mesocentric centrality.
[0092] The expression for degree centrality is:
[0093]
[0094] In the formula, x ij This represents the weight of the edge between node i and node j; it is 1 if the graph is unweighted, the weight value if the graph is weighted, and 0 if there is no edge; n is the number of nodes in each community; v i This represents the set of nodes in each community;
[0095] The expression for proximity centrality is:
[0096]
[0097] In the formula: |V| represents the number of nodes in the node set V of the community, d ji This represents the distance between node j and node i;
[0098] The expression for median centrality is:
[0099]
[0100] Where: δ st (v i() represents the shortest path from the starting node s to the ending node t, passing through node v. i The number of shortest paths, δ st This represents the number of all shortest paths from node s to node t.
[0101] The shortest path from node s to node t can be calculated using the Floyd-Warshall algorithm.
[0102] Step 2: Calculate the overall importance of each node based on the centrality indicators.
[0103] In this step, the overall importance B(v) is considered. i The expression for ) is:
[0104] B(v i )=k d C d (v i )+k a C a (v i )+k b C b (v i (5);
[0105] In the formula, k d For degree centrality C d (v i The weighting coefficients of k; a For proximal centrality C a (v i The weighting coefficients of k; b For mesocentricity C b (v i The weighting coefficients of ).
[0106] Step 3: Identify the node with the highest overall importance as the leading node of the community.
[0107] In this step, the overall importance of all nodes within each community is ranked, and the node ranked first is designated as the dominant node.
[0108] In one example, if there are three nodes in community A, namely node 1, node 2 and node 3, and their overall importance is ranked from largest to smallest as node 2, node 1, node 3, then node 2 will be the dominant node of community A.
[0109] In another feasible approach, when a tie occurs, i.e., two or more nodes have the same overall importance, the node with the higher degree centrality can be selected as the dominant node.
[0110] Step S101B: Construct dynamic edges between dominant nodes based on dynamic service requirements.
[0111] In real-world applications, service requirements are constantly changing. Therefore, in order to adapt to these dynamic changes, the connections between the dominant nodes also change accordingly, thereby meeting the resource allocation needs of dynamic topology networks.
[0112] Taking logistics warehouse resource allocation as an example, if community A and community B are close to each other and need to frequently allocate resources between them, then a fixed edge is established between community A and community B. However, community A and community C are far apart and there is no interactive relationship between them. But when the resources in the provinces surrounding community C are insufficient, resources need to be allocated from community A to community C. At this time, based on this temporary change in service demand, a temporary edge will be established between community A and community B. This temporary edge is called a dynamic edge.
[0113] However, in laboratory simulations, the adaptive adjustment rule for the connectivity of the dominant node can be used: p(t) = p0 + (1-p0)(1-e -λt Temporary edges are randomly generated to simulate dynamic topology changes. Here, p(t) represents the probability of communication via randomly generated temporary edges, and p0 is a preset minimum threshold for the probability of temporary edge communication; e -λt This is a decay term that decreases as t increases, causing the entire expression 1-e to... -λt It grows over time until it approaches 1; λ is a positive parameter that determines the rate of growth.
[0114] Through this adaptive connectivity adjustment rule, this mechanism ensures that even when network communication is limited, it can still approach the potential game equilibrium solution under fully connected graphs, avoiding falling into local equilibrium, thereby guaranteeing the stable equilibrium of the service network during the simulation process.
[0115] Step S101C: Construct an inter-community network based on the dominant node, dynamic edges, and fixed edges between the dominant nodes.
[0116] In this embodiment of the invention, a fixed edge between dominant nodes means that the dominant nodes always have a connection relationship regardless of the time period.
[0117] Following the previous example, the inter-association network G p =(V p E p ), in Where P ij This indicates that the club P i j is the dominant node.
[0118] Based on the above embodiments, an evolutionary game is performed on the initial allocation strategy among communities based on a pre-constructed evolutionary game model; and the network benefits among communities under the allocation strategy obtained in each evolutionary game are calculated based on a pre-constructed network benefit function, until the network benefits among communities are maximized, including:
[0119] Step S103A: Calculate the inter-community network benefits under the initial inter-community allocation strategy based on the pre-constructed network benefit function.
[0120] The network benefit function can be constructed according to specific application scenarios and fields. For example, when constructing the network benefit function for logistics resource allocation scenarios, it is necessary to consider the transportation costs and warehousing costs between nodes.
[0121] Therefore, in a feasible implementation, the network benefit function consists of profit, resource transportation costs, and resource storage costs, and the expression for the network benefit function is:
[0122]
[0123] In the formula: This represents the impact coefficient of different benefits within the service network; Indicates profit; This represents the cost of transporting resources between nodes; This represents the resource storage cost of a node; k = 1, 2, where k = 1 represents the inter-community network and k = 2 represents the intra-community network.
[0124] Therefore, the network benefit function of inter-community networks can be specifically expressed as:
[0125]
[0126] The network benefit function of the intranet can be specifically expressed as:
[0127]
[0128] The expressions for each term in the network benefit function of inter-community networks are as follows:
[0129] profit The model is as follows:
[0130]
[0131] In the formula: a i >0 indicates the profit coefficient of node i, x i V represents the resource quantity of node i. P The set of nodes that is the dominant node.
[0132] The network benefit function, by modeling the profit term, takes into account the marginal effect brought about by the amount of resources available to the nodes.
[0133] Transportation costs The model is as follows:
[0134]
[0135] Where: transportation cost coefficient a ij From the transportation cost matrix A = (a ij This reflects the unit resource transportation cost from node i to node j. j ,x i These represent the resource quantities of nodes j and i, respectively.
[0136] The network benefit function takes into account the differences in resources between different nodes by modeling the transportation cost term.
[0137] Storage costs The model is as follows:
[0138]
[0139] In the formula, β i Storage coefficient, storage cost With resource state quantity x i It satisfies the characteristics of the sigmoid function, that is, it is monotonically increasing but the growth rate gradually slows down.
[0140] The network benefit function models the storage cost term, taking into account the storage cost of service nodes.
[0141] The modeling models for each term of the network benefit function within a community are the same as those for each term of the network benefit function between communities, and will not be repeated here.
[0142] Step S103B: Calculate the marginal contribution of the initial inter-community allocation strategy of each dominant node to the inter-community network benefits based on the pre-constructed fitness function, which is called fitness.
[0143] The fitness function measures a node's performance or efficiency in its current state (based on its allocation strategy). High fitness means that the node can utilize or contribute its resources more effectively.
[0144] In one example, the fitness function is as follows:
[0145]
[0146] Among them, F i(x) represents the fitness of node i in the current policy state, and g(x) represents the network benefit, which is the inter-community network benefit when playing in an inter-community network and the intra-community network benefit when playing in an intra-community network; x i This represents the resource quantity of node i under the current policy state.
[0147] By calculating the fitness of all dominant nodes, the corresponding total game matrix F = [F1, F2, ..., F] can be obtained. M ].
[0148] Step S103C: Input the fitness of each dominant node and the fitness of its neighboring dominant nodes into the pre-constructed evolutionary game model to adjust the initial allocation strategy among communities.
[0149] Since communication in the service resource network is subject to graph constraints, in a feasible implementation, the evolutionary game model adopts a distributed Smith dynamics model under graph constraints, the expression of which is:
[0150]
[0151] In the formula: x i x represents the resource quantity of node i; j Let j be the resource quantity of node j; F represents the rate of change of the allocation strategy. i (x) represents the fitness of node i; F j (x) represents the fitness of node j; N i (t) is the set of neighboring nodes of node i.
[0152] The first part of the model, x j [F i (x)-F j (x)] + This indicates the extent to which node i can obtain resources from its neighbor node j; if F i (x) is greater than F j Let (x) represent the fitness of node i being greater than that of its neighbor node j. The allocation strategy then tends to adjust so that node i can obtain resources from its neighbor node j. Therefore, x... j reduce.
[0153] The second part of the model, This indicates the extent to which node i provides resources to its neighbor node j; if F i (x) is less than F j Let (x) represent the relationship where the fitness of node i is less than that of its neighbor node j. The allocation strategy then tends to adjust the resource allocation to make node i provide resources to its neighbor node j. Therefore, x... i reduce.
[0154] By continuously comparing the fitness of neighboring nodes, the resource allocation strategy and resource quantity of each node are dynamically adjusted, thereby optimizing the resource distribution and utilization efficiency of the entire network.
[0155] The strategy adjustment process using this evolutionary game model is as follows: if the fitness of one of the dominant nodes is greater than that of its neighboring dominant nodes, then the allocation strategy of the dominant node is adjusted to acquire the resources of its neighboring dominant node; otherwise, the allocation strategy of the dominant node is adjusted to provide resources to its neighboring dominant node.
[0156] Step S103D: Recalculate the fitness of each dominant node and its neighboring dominant nodes based on the adjusted inter-community allocation strategy.
[0157] In this step, the network benefits of the inter-community network are first calculated using Equation 7 above, and then the fitness of each dominant node is calculated using Equation 12.
[0158] Step S103E: Input the recalculated fitness of each dominant node and its neighboring dominant nodes into the pre-constructed evolutionary game model to readjust the inter-community allocation strategy.
[0159] Step S103F: Repeat steps S103D and S103E until a balanced state is reached in the inter-community network. The balanced state is when the dominant node adjusts its community allocation strategy alone, without increasing the inter-community network benefits. At this point, the inter-community network benefits are maximized.
[0160] In this embodiment of the invention, the equilibrium state of the inter-community network is a generalized Nash equilibrium. That is, by simulating the dynamic change process of the strategy through an evolutionary game model, the allocation strategy is continuously adjusted with the goal of achieving a generalized Nash equilibrium for each dominant node in the inter-community network. When this goal is achieved, the game stops.
[0161] In one example, the generalized Nash equilibrium model can be represented as:
[0162]
[0163] In the formula, F represents the fitness set, i.e., the total game matrix; G represents the service network; Δ is the policy set, x is the allocation policy; V is the set of nodes in the service network; N i For neighboring nodes; x i >0 indicates that node i is actively participating in the strategy evolution game.
[0164] This generalized Nash equilibrium model defines a fitness F such that if the policy of a node i is greater than 0, then its fitness F... i (x) must be greater than or equal to the fitness F of any of its neighboring nodes j. j(x). This ensures that, in equilibrium, no node can increase its network gains by unilaterally changing its strategy.
[0165] The evolutionary game process within the community network can be referred to in steps S103A-S103F above, and will not be repeated here.
[0166] To verify the effectiveness of the embodiments of the present invention, a simulation was performed, such as... Figure 2 The diagram shown illustrates the network efficiency under a traditional single-layer game; as shown... Figure 3 The diagram shows the network benefits under the two-layer game with a two-layer network structure in this embodiment. By comparison, it can be found that the network benefits achieved by the two-layer game method of this invention are relatively stable and balanced, while the network benefits of the traditional single-layer game method are not stable.
[0167] Based on the same inventive concept, a cross-community service node resource allocation device based on hierarchical evolutionary game theory is provided, applicable to service networks with community characteristics, such as... Figure 4 As shown, the device includes:
[0168] Building unit 401 is used to construct a two-layer network based on the topology graph of the service network. The two-layer network includes an inter-community network and an intra-community network. The inter-community network is a cross-community network. The intra-community network is the internal network of each community.
[0169] The first generation unit 402 is used to randomly generate an initial allocation strategy between communities based on the current total resources of the service network.
[0170] The first evolutionary game unit 403 is used to perform evolutionary game on the initial allocation strategy between communities based on a pre-constructed evolutionary game model; and to calculate the network benefits between communities under the allocation strategy obtained in each evolutionary game based on the pre-constructed network benefit function, until the network benefits between communities are maximized, thereby obtaining the optimal allocation strategy between communities and the total amount of resources allocated to each community under the optimal allocation strategy.
[0171] The second generation unit 404 is used to randomly generate the initial allocation strategy within each community based on the total resources of each community.
[0172] The second evolutionary game unit 405 is used to perform evolutionary games on the initial allocation strategies within each community based on a pre-constructed evolutionary game model; and to calculate the internal network benefits of the community under the allocation strategies obtained in each evolutionary game based on a pre-constructed network benefit function, until the internal network benefits of each community are maximized, thus obtaining the optimal internal allocation strategy for each community.
[0173] In one feasible embodiment, the process of constructing an inter-community network includes:
[0174] Identify the leading nodes for each community group.
[0175] In one feasible implementation, determining the dominant node for each community includes:
[0176] For each node within each community, calculate the centrality index separately. The centrality index includes at least the following: degree centrality, proximity centrality, and mesocentric centrality.
[0177] The expression for degree centrality is:
[0178]
[0179] In the formula, x ij This represents the weight of the edge between node i and node j; it is 1 if the graph is unweighted, the weight value if the graph is weighted, and 0 if there is no edge; n is the number of nodes in each community; v i This represents the set of nodes in each community;
[0180] The expression for proximity centrality is:
[0181]
[0182] In the formula: |V| represents the number of nodes in the node set V of the community, d ji This represents the distance between node j and node i;
[0183] The expression for median centrality is:
[0184]
[0185] Where: δ st (v i () represents the shortest path from the starting node s to the ending node t, passing through node v. i The number of shortest paths, δ st This represents the number of all shortest paths from node s to node t;
[0186] The overall importance of each node is calculated based on its centrality index.
[0187] The node with the highest overall importance will be identified as the leading node of the community.
[0188] Dynamic edges are constructed between dominant nodes based on dynamic service requirements;
[0189] The community network is constructed based on the dominant node, dynamic edges, and fixed edges between the dominant nodes.
[0190] In one feasible embodiment, the first evolutionary game unit is specifically used for:
[0191] Calculate the inter-community network benefits under the initial inter-community allocation strategy based on a pre-constructed network benefit function.
[0192] The network benefit function consists of profit, resource transportation costs, and resource storage costs. The expression for the network benefit function is:
[0193]
[0194] In the formula: This represents the impact coefficient of different benefits within the service network; Indicates profit; This represents the cost of transporting resources between nodes; This represents the resource storage cost of a node; k = 1, 2, where k = 1 represents the inter-community network and k = 2 represents the intra-community network.
[0195] The marginal contribution of the initial inter-community allocation strategy of each dominant node to the inter-community network benefits is calculated based on a pre-constructed fitness function, and this contribution is called fitness.
[0196] The fitness of each dominant node and the fitness of its neighboring dominant nodes are input into a pre-built evolutionary game model to adjust the initial allocation strategy among communities. The adjustment process is as follows: if the fitness of one of the dominant nodes is greater than the fitness of its neighboring dominant nodes, the allocation strategy of the dominant node is adjusted to acquire the resources of the neighboring dominant node; otherwise, the allocation strategy of the dominant node is adjusted to provide resources to the neighboring dominant node.
[0197] The fitness of each dominant node and its neighboring dominant nodes is recalculated based on the adjusted inter-community allocation strategy.
[0198] The recalculated fitness of each dominant node and its neighboring dominant nodes is input into the pre-constructed evolutionary game model to readjust the inter-community allocation strategy.
[0199] The evolutionary game model employs a distributed Smith dynamics model under graphical constraints, whose expression is:
[0200]
[0201] In the formula: x i x represents the resource quantity of node i; j Let j be the resource quantity of node j; F represents the rate of change of the allocation strategy. i ( ) represents the fitness of node i; F j (x) represents the fitness of node j; N i (t) is the set of neighboring nodes of node i.
[0202] Repeat the above process of calculating fitness and evolutionary game until an equilibrium state is reached in the inter-community network. The equilibrium state is when the dominant node adjusts its community allocation strategy alone without increasing the inter-community network benefit. At this point, the inter-community network benefit is maximized.
[0203] The equilibrium state of the network among communities is the generalized Nash equilibrium state.
[0204] Based on the same technical concept, embodiments of the present invention also provide an electronic device, such as... Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0205] Memory 503 is used to store computer programs;
[0206] When the processor 501 executes the program stored in the memory 503, it implements the steps of a cross-community service node resource allocation method based on hierarchical evolutionary game theory.
[0207] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0208] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0209] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0210] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0211] The computer program product for the method of cross-community service node resource allocation based on hierarchical evolutionary game provided in this invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0212] The apparatus for the cross-community service node resource allocation method based on hierarchical evolutionary game theory provided in this invention embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the apparatus provided in this invention embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the apparatus embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, apparatuses, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0213] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0214] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0215] In addition, the functional units in the embodiments provided by 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.
[0216] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0217] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0218] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A cross-community service node resource allocation method based on hierarchical evolutionary game theory, characterized in that, The method is applied to service networks with community characteristics, wherein the service networks include at least power grids, logistics networks, and industrial networks; the method includes: A two-layer network is constructed based on the topology of the service network. The two-layer network includes an inter-community network and an intra-community network. The inter-community network is a cross-community network. The intra-community network is the internal network of each community. Each community in the inter-community network includes a dominant node. An initial allocation strategy between communities is randomly generated based on the current total resources of the service network. The initial allocation strategy among the communities is subjected to evolutionary game theory based on a pre-constructed evolutionary game model; and the network efficiency among the communities under the allocation strategy obtained in each evolutionary game is calculated based on a pre-constructed network efficiency function until the network efficiency among the communities is maximized, thereby obtaining the optimal allocation strategy among the communities and the total amount of resources allocated to each community under the optimal allocation strategy. An initial allocation strategy within each community is randomly generated based on the total resources of each community. Calculate the inter-community network benefits under the initial inter-community allocation strategy based on a pre-constructed network benefit function; The marginal contribution of the initial inter-community allocation strategy of each dominant node to the inter-community network benefits is calculated based on a pre-constructed fitness function, and this contribution is called fitness. The fitness of each dominant node and the fitness of its neighboring dominant nodes are input into a pre-constructed evolutionary game model to adjust the initial allocation strategy among the communities. The adjustment process is as follows: if the fitness of one of the dominant nodes is greater than the fitness of its neighboring dominant nodes, the allocation strategy of the dominant node is adjusted to obtain the resources of the neighboring dominant node; otherwise, the allocation strategy of the dominant node is adjusted to provide resources to the neighboring dominant node. The fitness of each dominant node and its neighboring dominant nodes is recalculated based on the adjusted inter-community allocation strategy. The recalculated fitness of each dominant node and its neighboring dominant nodes is input into the pre-constructed evolutionary game model to readjust the inter-community allocation strategy. Repeat the above process of calculating fitness and evolutionary game until an equilibrium state is reached in the inter-community network. The equilibrium state is when the dominant node adjusts its community allocation strategy alone without increasing the inter-community network benefit, and the inter-community network benefit is maximized. The optimal intra-community allocation strategy for each community is obtained.
2. The method according to claim 1, characterized in that, The process of building the inter-community network includes: Identify the key leaders for each community group; Dynamic edges are constructed between the dominant nodes based on dynamic service requirements; An inter-community network is constructed based on the dominant node, the dynamic edge, and the fixed edge between the dominant nodes.
3. The method according to claim 2, characterized in that, The key nodes for determining the dominant nodes of each community include: For each node within each community, a centrality index is calculated, which includes at least: degree centrality, proximity centrality, and mesocentric centrality. The expression for the degree centrality is: In the formula, Represents a node and nodes The weight of the edge between nodes is 1 if the graph is unweighted, the weight value if the graph is weighted, and 0 if there is no edge; n is the number of nodes in each community. This represents the set of nodes in each community; The expression for the proximal centrality is: In the formula: Represents the set of nodes in the community The number of nodes, Represents a node With nodes The distance between them; The expression for the median centrality is: In the formula: Indicates starting from the node To the terminal node In the shortest path, the nodes are... The number of shortest paths, Represents a node The number of all shortest paths; The overall importance of each node is calculated based on its centrality index. The node with the highest overall importance is identified as the dominant node of its respective community.
4. The method according to claim 1, characterized in that, The network benefit function consists of profit, resource transportation costs, and resource storage costs, and its expression is as follows: In the formula: This represents the impact coefficient of different benefits within the service network; Indicates profit; This represents the cost of transporting resources between nodes; This represents the resource storage cost of the node; , It refers to the network between communities. This refers to the network within the community.
5. The method according to claim 1, characterized in that, The evolutionary game model adopts a distributed Smith dynamics model under graphical constraints, and its expression is: In the formula: For nodes The amount of resources; For nodes The amount of resources; The rate of change of the allocation strategy; For nodes The fitness of; For nodes The fitness of; For nodes The set of neighboring nodes.
6. The method according to claim 1, characterized in that, The equilibrium state of the network among the communities is a generalized Nash equilibrium.
7. A cross-community service node resource allocation device based on hierarchical evolutionary game theory, characterized in that, Applied to service networks with community characteristics, the service networks including at least power grids, logistics networks, and industrial networks; the device includes: A construction unit is used to construct a two-layer network based on the topology of the service network. The two-layer network includes an inter-community network and an intra-community network. The inter-community network is a cross-community network. The intra-community network is the internal network of each community. Each community in the inter-community network includes a dominant node. The first generation unit is used to randomly generate an initial allocation strategy between communities based on the current total resources of the service network. The first evolutionary game unit is used to perform evolutionary game on the initial allocation strategy between communities based on a pre-constructed evolutionary game model; and to calculate the network benefits between communities under the allocation strategy obtained in each evolutionary game based on a pre-constructed network benefit function, until the network benefits between communities are maximized, thereby obtaining the optimal allocation strategy between communities and the total amount of resources allocated to each community under the optimal allocation strategy between communities. The second generation unit is used to randomly generate the initial allocation strategy within each community based on the total resources of each community. The second evolutionary game unit is used to calculate the inter-community network benefits under the initial inter-community allocation strategy based on the pre-constructed network benefit function; The marginal contribution of the initial inter-community allocation strategy of each dominant node to the inter-community network benefits is calculated based on a pre-constructed fitness function, and this contribution is called fitness. The fitness of each dominant node and the fitness of its neighboring dominant nodes are input into a pre-constructed evolutionary game model to adjust the initial allocation strategy among the communities. The adjustment process is as follows: if the fitness of one of the dominant nodes is greater than the fitness of its neighboring dominant nodes, the allocation strategy of the dominant node is adjusted to obtain the resources of the neighboring dominant node; otherwise, the allocation strategy of the dominant node is adjusted to provide resources to the neighboring dominant node. The fitness of each dominant node and its neighboring dominant nodes is recalculated based on the adjusted inter-community allocation strategy. The recalculated fitness of each dominant node and its neighboring dominant nodes is input into the pre-constructed evolutionary game model to readjust the inter-community allocation strategy. Repeat the above process of calculating fitness and evolutionary game until an equilibrium state is reached in the inter-community network. The equilibrium state is when the dominant node adjusts its community allocation strategy alone without increasing the inter-community network benefit. At this point, the inter-community network benefit is maximized, and the optimal intra-community allocation strategy for each community is obtained.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes the program stored in the memory, it implements the steps of the method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-6.