Resource configuration method, device, electronic device, storage medium and program product

By obtaining the target topological network in the network resource allocation system, the node plays games with all nodes 1 hop away from itself, and combined with the self-game gains, solves the problem of low accuracy of resource allocation in the existing technology, and achieves a more accurate and reasonable resource allocation.

CN115473905BActive Publication Date: 2024-10-01AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211203295.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2024-10-01
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Existing resource allocation methods have low accuracy in network resource allocation systems, mainly because nodes only play games with neighbor nodes within a 2-5 hop range and do not consider the impact of the node's own self-interaction on resource allocation.

Method used

By obtaining the target topological network, the node plays a game with all network nodes one hop away from itself, combines the game strategy and self-game income, determines the resource allocation method, and considers the impact of the node's own self-interaction on system resource allocation.

Benefits of technology

It improves the accuracy of resource configuration and the rationality of system resource allocation, saves resource sharing paths, and is more in line with the actual resource sharing needs of the target system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115473905B_ABST
    Figure CN115473905B_ABST
Patent Text Reader

Abstract

The present application provides a resource configuration method, device, electronic device, storage medium and program product. The method includes: obtaining a target topology network; the network nodes of the target topology network correspond one-to-one with each first node in the target system; the first node is a node in the target system to be resource configured; for any first node, according to the target topology network and the game strategy corresponding to the first node, the first node is controlled to play a game with the second node to obtain the game benefit of the first node; the second node includes: the first node, and all first nodes that are 1 hop away from the first node in the target topology network; according to the game benefit of the first node, the resource configuration method of each first node in the target system is determined. The present application improves the accuracy of resource configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, and in particular to a resource configuration method, device, electronic device, storage medium and program product. Background Art

[0002] A system may include multiple nodes, and the multiple nodes may share the same resource. Taking a network resource configuration system as an example, the base stations, mobile phones and other nodes in the network resource configuration system may share network resources. However, how to reasonably configure resources is an urgent problem to be solved.

[0003] At present, the existing resource configuration method mainly includes: modeling multiple nodes in a system into a game model, and running the model through an electronic device equipped with the game model, so that the nodes play a game. Then, the resource configuration of each node is determined according to the game result. However, the above existing resource configuration method has the problem of low accuracy. Summary of the invention

[0004] The present application provides a resource configuration method, device, electronic device, storage medium and program product to improve the accuracy of resource configuration.

[0005] In a first aspect, the present application provides a resource configuration method, the method comprising:

[0006] Acquire a target topology network; the network nodes of the target topology network correspond one-to-one to each first node in the target system; the first node is a node in the target system to be resource configured;

[0007] For any of the first nodes, according to the target topology network and the game strategy corresponding to the first node, control the first node to play a game with the second node to obtain the game benefit of the first node; the second node includes: the first node, and all network nodes in the target topology network that are 1 hop away from the first node

[0008] According to the game income of the first node, a resource configuration mode of each first node in the target system is determined.

[0009] Optionally, controlling the first node to play a game with the second node according to the target topology network and the game strategy corresponding to the first node to obtain the game gain of the first node includes:

[0010] According to the target topology network and the game strategy corresponding to the first node, the first node is controlled to play a game with the second nodes corresponding to all network nodes in the target topology network that are 1 hop away from the first node, to obtain an initial game gain;

[0011] Obtaining a self-game benefit of the first node according to the game strategy corresponding to the first node;

[0012] The game profit of the first node is obtained according to the initial game profit and the self-game profit.

[0013] Optionally, obtaining the self-game benefit of the first node according to the game strategy corresponding to the first node includes:

[0014] The self-game benefit of the first node is determined according to the game strategy corresponding to the first node and the pre-stored mapping relationship between the game strategy and the self-game benefit.

[0015] Optionally, obtaining the self-game benefit of the first node according to the game strategy corresponding to the first node includes:

[0016] If it is determined that the game strategy corresponding to the first node is a cooperative strategy, a random number greater than or equal to a first preset value and less than or equal to a second preset value is generated, and the random number is used as the self-game profit of the first node.

[0017] Optionally, if the game strategy corresponding to the first node is a betrayal strategy, the self-game benefit is less than or equal to 0.

[0018] Optionally, the target system is a network resource configuration system; after determining the resource configuration mode of each first node in the target system according to the game gain of the first node, the method further includes:

[0019] The resource configuration mode is sent to the network resource allocation node in the target system, so that the network resource allocation node performs network resource configuration on each first node according to the resource configuration mode.

[0020] In a second aspect, the present application provides a resource configuration device, the device comprising:

[0021] An acquisition module, used for acquiring a target topology network; the network nodes of the target topology network correspond one-to-one to each first node in the target system; the first node is a node in the target system to be resource configured;

[0022] A processing module is used to control any of the first nodes to play game with a second node according to the target topology network and the game strategy corresponding to the first node to obtain the game benefit of the first node; determine the resource configuration method of each first node in the target system according to the game benefit of the first node; wherein the second node includes: the first node, and all network nodes that are 1 hop away from the first node in the target topology network.

[0023] In a third aspect, the present application provides an electronic device, the electronic device comprising a memory and a processor;

[0024] The memory stores a computer program;

[0025] The processor is configured to execute the method according to any one of the first aspects through the computer program.

[0026] In a fourth aspect, the present application provides a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the method described in any one of the first aspects is implemented.

[0027] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in any one of the first aspects when executed by a processor.

[0028] The resource configuration method, device, electronic device, storage medium and program product provided in the present application realize modeling the target system in the target topology network by corresponding each first node in the target system to the network node in the target topology network. When the electronic device obtains the target topology network, it can control the first node to play a game with the second node including "the first node, and all network nodes that are 1 hop away from the first node in the target topology network" based on the game strategy of the target topology network and each first node. According to the game income of the first node, the resource configuration mode of each first node can be obtained. Through the above game, not only the game between the first node and other nodes can be realized, but also the self-game of the first node can be realized. Therefore, the above method takes into account the influence of the self-interaction of the first node itself on the allocation of system resources, thereby improving the accuracy of resource configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0030] Figure 1 A flowchart of an existing method for determining resource allocation based on game theory;

[0031] Figure 2 A schematic diagram of a resource configuration method provided for this application;

[0032] Figure 3 A schematic diagram of a topological network structure provided for this application;

[0033] Figure 4 A flowchart of another resource allocation method provided for this application;

[0034] Figure 5 A cooperation ratio ρ provided for this application c Schematic diagram of the change with parameter b;

[0035] Figure 6 Another cooperation ratio ρ provided for this application c Schematic diagram of the change with parameter b;

[0036] Figure 7 A schematic diagram of a game strategy of each first node in a target system at the end of a game provided by the present application;

[0037] Figure 8 A schematic diagram of the structure of a resource configuration device provided in this application;

[0038] Fig. 9 A schematic diagram of the structure of an electronic device provided in this application.

[0039] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0041] The following first explains some of the noun concepts involved in this application:

[0042] Strategy: Each node in the system can provide resources to other nodes (that is, resource sharing), or it can not provide resources to other nodes. The above behavior of whether to provide resources to other nodes is the strategy of the node. Among them, the strategy of providing resources to other nodes can be called a cooperation strategy. The strategy of not providing resources to other nodes can be called a betrayal strategy.

[0043] Game: Under certain rules, multiple nodes in the system each choose to implement their own strategies and obtain corresponding benefits. In the game process, if the strategies of the nodes are finite, it is called "finite game"; if the strategies of the nodes are infinite, it is called "infinite game".

[0044] Profit: The profit that a node gets from a cooperation strategy or a betrayal strategy during the game. The meanings represented by the profits of corresponding nodes in different systems may be different. For example, if the above system is a network resource configuration system, the profit of the above node can be used to represent the amount of network resources that the node can obtain. If the above system is an electric power resource configuration system, the profit of the above node can be used to represent the amount of electric power resources that the node can obtain.

[0045] Regular topological network: A regular topological network can refer to a translational symmetric lattice (the number of neighbors of any lattice point in a translational symmetric lattice is the same).

[0046] Neighborhood: In a topological network, the set of nodes surrounding any network node can be called the neighborhood of the network node.

[0047] Prisoner's dilemma game (PDG): PDG is a representative game mode in non-zero-sum game in game theory.

[0048] Monte-Carlo Simulation (MCS): MCS is a random simulation method based on probability and statistical theory. The problem to be solved is associated with a certain probability model, and statistical simulation or sampling is performed through electronic equipment to obtain an approximate solution to the problem.

[0049] Nash equilibrium: also known as non-cooperative game equilibrium. During the game, no matter what strategy other nodes choose, this node will choose a certain strategy, and this strategy can be called a dominant strategy. If the strategy chosen by any node is optimal when the strategies of other nodes are determined, then this combination can be defined as a Nash equilibrium.

[0050] A system may include multiple nodes, and the multiple nodes may share the same resource. Taking a network resource configuration system as an example, the base stations, mobile phones and other nodes in the network resource configuration system may share network resources. However, how to reasonably configure resources is an urgent problem to be solved.

[0051] At present, the existing resource configuration method mainly includes: modeling multiple nodes in a system into a game model, and running the model through an electronic device equipped with the game model, so that the nodes play a game. Then, the resource configuration of each node is determined based on the game result. The following is a detailed description of the existing method for determining the resource configuration of each node in the system based on game:

[0052] Figure 1 The following is a flowchart of the existing game-based resource allocation method. Figure 1 As shown, the existing method for determining resource allocation based on game theory can mainly include the following steps:

[0053] Step 1: Model the interaction activities of each node in the target system into the prisoner's dilemma game.

[0054] Step 2: Place the above nodes on a network node of a topological network, and randomly initialize the strategy of each node (for example, the strategy can be a cooperation strategy or a betrayal strategy), and clear the game gain of each node to 0.

[0055] Step 3: For any node, at the beginning of each generation of game, the game income of the node is cleared to 0. Then the electronic device can control the node through the above prisoner's dilemma game model and the above topological network to play games with all neighboring nodes within 2-5 hops of the node.

[0056] Step 4: Calculate the payoff matrix parameters of the node by playing a game between all the nodes connected to each other once.

[0057] Step 5: According to the game gains of the neighbors within 2-5 hops of the node, adjust the strategy (cooperation or betrayal) of the node in the next generation game, and record the cooperation ratio of the system.

[0058] Among them, the agent adjustment strategy is specifically carried out according to one of the following two rules:

[0059] 1. Unconditional learning rule: After a round of game, let the agent learn the strategy adopted by the neighbor with the highest benefit among its neighbors;

[0060] 2. Replicator dynamic rules: After a round of game, agent a will randomly select a neighbor agent b. If a's payoff is greater than the payoff of its randomly selected neighbor b, then a will still stick to its own strategy and not learn the strategy of neighbor b. If b's payoff is greater than a's, then agent a will learn b's strategy with a certain probability.

[0061] Step 6: Repeat the above steps 3 to 5 until the game for the system is determined to be over according to the cooperation ratio, and obtain the game income of each node of the system at the end of the game.

[0062] Step 7: Determine the resource allocation method of each node in the system based on the game benefits of each node.

[0063] The inventors have found through research that in real-world scenarios, the self-examination and strategies of individuals (that is, any node in the above system) will also have an impact on the resource allocation of the system. However, when using the existing game-based resource allocation method, each node in the system only plays games with neighboring nodes within 2-5 hops of the node. Therefore, the existing resource allocation method has the problem of poor accuracy.

[0064] Considering that the existing resource configuration methods have the problem of poor accuracy because any node only plays games with neighboring nodes within 2-5 hops of the node, the present application proposes a method for determining the resource configuration mode of the system through node-based self-game. Through the above method, any node can not only play games with other nodes in the system, but also interact with itself (that is, self-game), taking into account the impact of individual self-examination and strategy on system resource allocation, thereby improving the accuracy of resource configuration.

[0065] It should be understood that the execution subject of the resource configuration method provided in the present application can be any electronic device with processing functions, such as a terminal and a server. In addition, it should be understood that the present application does not limit the application scenario of the resource configuration method. Exemplarily, the resource configuration method can be applied to any system that requires reasonable resource allocation, such as a network resource configuration system, a power resource configuration system, a computing resource configuration system, etc.

[0066] The technical solution of the present application is described in detail below in conjunction with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0067] Figure 2 A schematic diagram of a resource configuration method provided in this application. Figure 2 As shown, the method may include the following steps:

[0068] S101, obtaining a target topology network, wherein the network nodes of the target topology network correspond one-to-one to each first node in the target system.

[0069] It should be understood that the present application does not limit the type of the above topological network. The above topological network may be, for example, the above regular topological network. Figure 3 This is a schematic diagram of a topology network structure provided by this application. Figure 3 The white circles, black squares, and black circles shown in the figure are all network nodes of the topological network.

[0070] The first node is a node in the target system for which resource configuration is to be performed. Optionally, all nodes in the target system may be first nodes, or some nodes in the target system may be first nodes.

[0071] Optionally, the electronic device used to execute the resource configuration method provided in the present application may belong to the above-mentioned target system or may not belong to the above-mentioned target system.

[0072] Exemplarily, the electronic device may obtain the target topology network by, for example, responding to a user-triggered operation of modeling each node of the target system into the target topology network. Alternatively, the electronic device may also receive the target topology network input by the user through an application programming interface (API) or a graphical user interface (GUI).

[0073] S102. For any first node, according to the target topology network and the game strategy corresponding to the first node, control the first node to play a game with all the second nodes to obtain the game income of the first node.

[0074] The second node may include: the first node, and all first nodes in the target topology network that are 1 hop away from the first node. Figure 3 For example, assuming that the first node is a black circular network node, all network nodes in the target topology network that are 1 hop away from the first node include: Figure 3 The four black square nodes shown in .

[0075] Optionally, the game strategy corresponding to the first node may be a cooperation strategy or a betrayal strategy.

[0076] It should be understood that the present application does not limit how the electronic device controls the first node and the second node to play the game. Exemplarily, the electronic device can input the above-mentioned target topology network and the game strategy corresponding to each first node into a preset game model, so as to enable the first node and the second node to play the game through the game model. Among them, the game model can be any existing game model, such as PDG, Snowdrift game model (Snowdrift game, SDG) and any other existing game model.

[0077] Taking the target system as a network resource configuration system as an example, the gaming gain of the first node can be used to characterize the amount of network resources (such as bandwidth, signal strength, etc.) that the first node can obtain, or the priority level of the first node in obtaining network resources, etc. Taking the target system as an electric resource configuration system as an example, the gaming gain of the first node can be used to characterize the amount of electric power resources that the first node can obtain.

[0078] S103: Determine a resource configuration method for each first node in the target system according to the game benefits of the first nodes.

[0079] Optionally, the electronic device can perform a multi-round game according to the method described in step S102 above, and the strategy of the first node can be updated in each round of the game until the electronic device determines that the game for the target system is completed. Then, the electronic device can obtain the game income of each first node in the target system when the game for the target system is completed, and determine the resource configuration method of each first node in the target system based on the amount of resources represented by the game income of each first node.

[0080] It should be understood that this application does not limit how the electronic device determines the resource configuration mode of each first node in the target system according to the gaming income of the first node. Optionally, any existing method for determining the resource configuration mode of each node in the system according to the gaming income of the node can be referred to, and this application will not elaborate on it here.

[0081] In this embodiment, by corresponding each first node in the target system to a network node in the target topology network, the target system is modeled in the target topology network. When the electronic device obtains the target topology network, it can control the first node to play with the first node itself, as well as all the first nodes that are 1 hop away from the first node in the target topology network based on the game strategy of the target topology network and each first node. According to the game income of the first node, the resource allocation method of each first node can be obtained. Through the above game, not only the game between the first node and other nodes can be realized, but also the self-game of the first node can be realized. Therefore, the above method takes into account the influence of the self-interaction of the first node itself on the allocation of system resources, thereby improving the accuracy of resource allocation.

[0082] In addition, through the above method, the electronic device can play games with the first node and all first nodes that are no more than 1 hop away from the first node. Compared with the method of playing games with nodes of only 2-5 hops in the prior art (high learning cost and large limitations), the resource allocation method provided in the present application also saves the path of resource sharing and is more in line with the actual target system for resource sharing.

[0083] The following is a detailed description of how the electronic device controls the first node to play a game with the second node according to the target topology network and the game strategy corresponding to the first node to obtain the game benefit of the first node:

[0084] As a possible implementation method, the electronic device can first control the first node according to the target topology network and the game strategy corresponding to the first node, and play a game with the second nodes corresponding to all network nodes that are one hop away from the first node in the target topology network to obtain an initial game profit.

[0085] Optionally, the electronic device, for example, inputs the above-mentioned target topology network and the game strategies corresponding to each first node into a preset game model, so that the first node can play game with the second nodes corresponding to all network nodes that are one hop away from the first node in the target topology network through the game model.

[0086] Exemplarily, the electronic device may determine, for example, with the same probability, whether the initial strategy of each first node is a cooperation strategy or a betrayal strategy. The cooperation strategy may be represented by a state vector s x ={0, 1}. The betrayal strategy can be represented as the state vector s x ={1,0}. Exemplarily, the form of the above initial game gain can be shown in the following formula (1):

[0087]

[0088] in, is the state vector s x The transpose of Ω x Represents the interacting neighborhood in the Von-Neumann and Moore neighborhoods (that is, the neighborhood range corresponding to the second node corresponding to all network nodes that are less than or equal to 1 hop away from the first node in the target topology network). y The state vector of the second node corresponding to all network nodes that are 1 hop away from the first node in the target topology network can be used to characterize whether the strategy of the second node is a cooperation strategy or a betrayal strategy. x represents the initial game profit. Q represents the game profit matrix. Taking the above game model as PDG as an example, the game profit matrix can be shown as the following formula (2):

[0089]

[0090] Among them, 1 in the matrix means that when the cooperation strategy is selected, a reward R (Reward) is obtained. Among them, R can be equal to 1. The upper right corner of the matrix indicates that if the two parties choose different game strategies, the node that chooses the cooperation strategy will obtain a deceived S (Sucker) benefit, such as 0, and the node that chooses the betrayal strategy will obtain a temptation T (Temptation) benefit, such as b in the above matrix. b can represent the amount that needs to be deducted from the node's benefit when the node strategy is the betrayal strategy in the PDG (that is, the cost of choosing the betrayal strategy). Optionally, 1≤b≤2. The 0 in the lower right corner of the matrix means that when the betrayal strategy is selected, both will be punished P (Punishment), for example, P can be equal to 0.

[0091] After obtaining the above-mentioned initial game gain, the electronic device can obtain the self-game gain of the first node according to the game strategy corresponding to the first node.

[0092] In some embodiments, the electronic device may determine the self-game benefit of the first node, for example, based on the game strategy corresponding to the first node and the pre-stored mapping relationship between the game strategy and the self-game benefit. Exemplarily, the mapping relationship between the game strategy and the self-game benefit may be pre-stored in the electronic device by the user. In some embodiments, the electronic device may also receive the mapping relationship between the game strategy and the self-game benefit input by the user before obtaining the self-game benefit of the first node according to the game strategy corresponding to the first node.

[0093] Exemplarily, the mapping relationship between the game strategy and the self-game benefit may be as shown in the following Table 1:

[0094] Table 1

[0095] Game strategy Self-gaming benefits Cooperation strategy Betrayal Strategy P

[0096] Taking the mapping relationship shown in Table 1 as an example, assuming that the game strategy corresponding to the first node is a cooperation strategy, the electronic device can determine that the self-game benefit of the first node is δ. Exemplarily, the δ can be any value greater than or equal to 0 and less than or equal to 1. Assuming that the game strategy corresponding to the first node is a betrayal strategy, the electronic device can determine that the self-game benefit of the first node is P. Wherein, P can be less than or equal to 0, for example.

[0097] Alternatively, in some embodiments, if the electronic device determines that the game strategy corresponding to the first node is a cooperative strategy, the electronic device may also generate a random number that is greater than or equal to a first preset value and less than or equal to a second preset value, and use the random number as the self-game benefit of the first node.

[0098] The first preset value and the second preset value may both be pre-stored in the electronic device by the user. In some embodiments, the first preset value and the second preset value may both be integers greater than or equal to 0, and the first preset value is less than the second preset value.

[0099] When the game strategy corresponding to the first node is a cooperative strategy, by using the above random number as the self-game benefit of the first node, a reward for the first node selecting the cooperative strategy is achieved, thereby promoting the realization of resource sharing in the target system.

[0100] Optionally, in some embodiments, if the game strategy corresponding to the first node is a betrayal strategy, the self-game benefit of the first node may be less than or equal to 0. By setting the self-game benefit of the first node to be less than or equal to 0 when the game strategy corresponding to the first node is a betrayal strategy, the punishment of the first node for selecting a betrayal strategy is implemented.

[0101] After obtaining the initial game income of the first node and the self-game income, the electronic device can obtain the game income of the first node according to the sum of the initial game income and the self-game income. Exemplarily, the electronic device can directly use the sum of the initial game income of the first node and the self-game income as the game income of the first node.

[0102] In this embodiment, the electronic device may first obtain the first node, and play a game with the second node corresponding to all network nodes that are 1 hop away from the first node in the target topology network to obtain an initial game gain. Then, the self-game gain of the first node determined according to the game strategy corresponding to the first node is obtained. Then, the electronic device may obtain the game gain of the first node determined based on the self-game gain and the initial game gain. By adding the self-game gain to the game gain of the first node, the influence of the self-interaction of the first node itself on the allocation of system resources is taken into account, group cooperation behavior is encouraged, and the accuracy of resource allocation is improved.

[0103] As another possible implementation, before obtaining the game gain of the first node according to the initial game gain and the self-game gain, the electronic device may also obtain the self-game gain of the first node according to the game strategy corresponding to the first node. Then, the electronic device controls the first node to play games with the second nodes corresponding to all network nodes that are 1 hop away from the first node in the target topology network according to the target topology network and the game strategy corresponding to the first node to obtain the initial game gain.

[0104] Alternatively, the electronic device may also simultaneously execute the steps of "obtaining the self-game profit of the first node according to the game strategy corresponding to the first node" and "controlling the first node to play game with the second nodes corresponding to all network nodes that are 1 hop away from the first node in the target topology network according to the game strategy corresponding to the first node to obtain the initial game profit."

[0105] In some embodiments, taking the above-mentioned target system as a network resource configuration system as an example, after the electronic device determines the resource configuration method of each first node in the target system according to the game gain of the first node, it can also send the resource configuration method to the network resource allocation node in the target system, so that the network resource allocation node can perform network resource configuration for each first node in the target system according to the above-mentioned resource configuration method.

[0106] Exemplarily, the network resource allocation node may be, for example, a hub or other network access point in the network resource configuration system.

[0107] In this embodiment, by sending the resource configuration method of each first node to the network resource allocation node in the target system, the network resource allocation node can perform network resource configuration for each first node in the target system according to the above resource configuration method, thereby improving the accuracy of the network resource configuration of each first node in the target system and improving the efficiency of each node in the target system in using the allocated network resources to perform tasks.

[0108] Still taking the target system as the network resource configuration system as an example, each node in the network resource configuration system (such as mobile towers, mobile phones, WLANs, or these nodes can be understood as the network resource assembly of different suppliers) can usually apply for and use resources in its own network or network area, and will not share its network resources. When network resources (such as bandwidth, signal strength, etc.) are in short supply, it affects network speed and transmission timeliness, which in turn affects user experience. When the network resources are sufficient, they cannot share their own resources, resulting in considerable waste. Therefore, how to reasonably allocate network resources is crucial.

[0109] Figure 4 A flowchart of another resource configuration method provided by this application. Figure 4 As shown, illustratively, the electronic device may, for example, respond to a user-triggered operation of modeling the network resource configuration system and begin to execute the following steps:

[0110] First, the electronic device can respond to the modeling operation triggered by the user, and model each first node (that is, the computing power node) in the network resource configuration system into (or map to) a target topology network (the target topology network can be represented by a logical matrix). Optionally, the type of the target topology network can be a non-homogeneous network. Optionally, the form of the target topology network can be, for example, a lattice network or a logical lattice network.

[0111] Then, the electronic device can control the computing power node to play games with neighboring nodes (including self-game), that is, control the first node to play games with the second node including "the first node and the network nodes within 1 hop from the first node in the target topology network". The game and profit calculation rules can be described as follows:

[0112] For two logically adjacent first nodes, assuming that both parties share their respective network resource values, the benefits are both 1 (the benefits can be used to represent additional network resource benefits or network resource priority acquisition levels, etc., which can be determined based on the modeling meaning given during modeling). The benefits of one party sharing network resources are 0; the benefits of the party not sharing network resources are b, and the benefits of both parties not sharing network resources are 0.

[0113] by Figure 3For example, after the first node plays games with the four first nodes in the neighborhood, the first node can interact with itself (that is, play games by itself). If the game strategy of the first node is a cooperative strategy (that is, sharing network resources), it will obtain additional benefits (that is, self-game benefits) δ. If the game strategy of the first node is a betrayal strategy, it will punish itself, and the number of penalties (that is, self-game benefits) can be P (penalties can be used to characterize network resource losses, reduce the level of network resource acquisition, etc.). Among them, the value of P can be related to the coefficient of the game model. Taking PDG as an example, the P value can be 0.

[0114] At the beginning of the game, the following steps can be performed:

[0115] Step 1: The electronic device randomly initializes the game strategy (cooperation or betrayal) of each first node in the network resource configuration system, and clears the game gain of each first node to 0.

[0116] Step 2: The electronic device randomly selects a first node. Assume that the first node is x (e.g. Figure 3 ) as shown in the center dot in the figure.

[0117] Step 3: The electronic device controls the first node to start playing games with all direct neighboring (first nodes within 1 hop can be used as neighboring nodes) second nodes to obtain the initial game income of the first node (refer to the above embodiment for specific implementation). After completing the game with the neighbors, the first node plays games with itself to obtain its own game income.

[0118] After calculating the benefits of each neighbor, according to the strategy update rule, the game benefits of the first node x are recorded as Px, and the game benefits of the second node y are recorded as Py. According to the following Fermi probability, the first node x learns the game strategy of the second node y from the second node y, which can be shown in the following formula (3):

[0119]

[0120] Among them, K represents the intensity of the noise factor that updates the strategy during decision-making, or the degree of irrationality, which is a fixed value.

[0121] Step 4, repeat steps 1-3. On average, the first node corresponding to each network node in the target topology network structure has the opportunity to conduct a random two-to-two game in the MCS step to change its current game strategy, that is, asynchronous update. After all the evolutionary game steps are completed, when the electronic device determines that the game has reached a stable state (characterizing that the system has reached a stable state), the ratio of the first node collaborator (that is, the first node that selects the cooperation strategy) in the target system is counted and recorded. The calculation method of the network node collaborator ratio can be, for example, as shown in the following formula (4):

[0122] ρ c =N c / (N c +N d ) (4)

[0123] Among them, N c Represents the number of network nodes that choose the cooperation (sharing network resources) strategy in the system. N d Represents the number of network nodes that choose the betrayal (not sharing network resources) strategy in the system. c Represents the ratio of partners.

[0124] After the electronic device determines that the game is over according to the cooperator ratio, it can use the game income corresponding to each first node in the game end state as the resource allocation method of the network resource allocation system, and send the resource allocation method to the hub center or the network access point of the system as a network resource allocation node. The hub center can allocate network resources to the terminal device, so that each node in the network resource allocation system obtains network resources according to the dynamic allocation result.

[0125] By executing the above game steps, taking the game model as PDG, and the self-game benefit of the first node as a random number greater than or equal to the first preset value and less than or equal to the second preset value as an example, Figure 5 A cooperation ratio ρ provided for this application c Schematic diagram of the change with parameter b. This b is the parameter b in the aforementioned game payoff matrix, which can represent the degree of punishment. Figure 5 (1) in the figure indicates that the cooperation ratio ρ is c It changes with parameter b. Among them, δ represents the self-game benefit of the node choosing the cooperation strategy. δ=0 represents the original PDG model. δ=[0,0.2] represents the self-game benefit of choosing the cooperation strategy is a random number between [0,0.2], and so on. Figure 5 (2) in the figure shows that in the case of 8 neighbors, the cooperation ratio ρ c Varies with parameter b.

[0126] Figure 6 Another cooperation ratio ρ provided for this application c Schematic diagram of the change with parameter b. Figure 6 (1) in the figure indicates that the cooperation ratio ρ is c It varies with parameter b (which can represent the degree of punishment). Among them, δ represents the self-game benefit of the node choosing the cooperation strategy. δ=0 represents the original PDG model. δ=0.2 represents the self-game benefit of choosing the cooperation strategy is 0.2, and so on. Figure 5 (2) in the figure shows that in the case of 8 neighbors, the cooperation ratio ρ c Varies with parameter b.

[0127] Taking the above b as 1.1 as an example, Figure 7 This is a schematic diagram of the game strategy of each first node in the target system at the end of a game provided by this application. Figure 7 As shown in (a), (b), (c), (d), (e), and (f), black represents the network nodes that choose the betrayal strategy, and white represents the network nodes that choose the cooperation strategy. Among them, (a), (b), and (c) are the cases where the self-game benefits of the node choosing the cooperation strategy are 0, 0.2, and 0.4 respectively. (d), (e), and (f) are the cases where the self-game benefits of the node choosing the cooperation strategy are 0, a random number between [0, 0.2], and [0, 0.4]. Figure 7 As shown, when the self-game benefit of the node choosing the cooperation strategy is 0.4, the resources in the system are shared the most.

[0128] In this embodiment, by adding the self-game benefits of the nodes to the game process, the accuracy of determining the allocation of network resources based on the game is improved, thereby improving the user experience and the degree of resource sharing.

[0129] Figure 8 This is a schematic diagram of the structure of a resource configuration device provided by this application. Figure 8 As shown, the device includes: an acquisition module 21 and a processing module 22. Among them,

[0130] The acquisition module 21 is used to acquire a target topology network, wherein the network nodes of the target topology network correspond one-to-one to each first node in the target system; the first node is a node in the target system to be configured with resources.

[0131] The processing module 22 is used to control any of the first nodes to play games with the second node according to the target topology network and the game strategy corresponding to the first node, and obtain the game benefit of the first node; and determine the resource configuration mode of each first node in the target system according to the game benefit of the first node. The second node includes: the first node, and all network nodes that are 1 hop away from the first node in the target topology network.

[0132] Optionally, the processing module 22 is specifically used to control the first node to play game with second nodes corresponding to all network nodes that are one hop away from the first node in the target topology network according to the target topology network and the game strategy corresponding to the first node to obtain an initial game gain; to obtain a self-game gain of the first node according to the game strategy corresponding to the first node; and to obtain the game gain of the first node according to the initial game gain and the self-game gain.

[0133] Optionally, the processing module 22 is specifically configured to determine the self-game benefit of the first node according to the game strategy corresponding to the first node and a pre-stored mapping relationship between the game strategy and the self-game benefit.

[0134] Optionally, the processing module 22 is specifically used to generate a random number greater than or equal to a first preset value and less than or equal to a second preset value when it is determined that the game strategy corresponding to the first node is a cooperative strategy, and use the random number as the self-game profit of the first node.

[0135] Optionally, if the game strategy corresponding to the first node is a betrayal strategy, the self-game benefit is less than or equal to 0.

[0136] Taking the target system as a network resource configuration system as an example, the resource configuration device may further include: a sending module 23, which is used to send the resource configuration method to the network resource allocation node in the target system after determining the resource configuration method of each first node in the target system according to the game profit of the first node, so that the network resource allocation node performs network resource configuration for each first node according to the resource configuration method.

[0137] The resource configuration device provided in the present application is used to execute the aforementioned resource configuration method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0138] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in this application. Fig. 9 As shown, the electronic device 300 may include: at least one processor 301 and a memory 302 .

[0139] The memory 302 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.

[0140] The memory 302 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0141] The processor 301 is used to execute the computer-executable instructions stored in the memory 302 to implement the resource configuration method described in the aforementioned method embodiment. The processor 301 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0142] Optionally, the electronic device 300 may further include a communication interface 303. In a specific implementation, if the communication interface 303, the memory 302 and the processor 301 are implemented independently, the communication interface 303, the memory 302 and the processor 301 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0143] Optionally, in a specific implementation, if the communication interface 303, the memory 302 and the processor 301 are integrated on a chip, the communication interface 303, the memory 302 and the processor 301 can complete communication through an internal interface.

[0144] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used for the methods in the above embodiments.

[0145] The present application also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of an electronic device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the electronic device implements the resource configuration method provided by the various embodiments described above.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A resource configuration method, characterized in that: The method comprises: Acquire a target topology network; the network nodes of the target topology network correspond one-to-one to each first node in the target system; the first node is a node in the target system to be resource configured; For any of the first nodes, according to the target topology network and the game strategy corresponding to the first node, control the first node to play a game with all the second nodes to obtain the game benefit of the first node; the second nodes include: the first node, and all the first nodes that are 1 hop away from the first node in the target topology network; Determining a resource configuration mode of each first node in the target system according to the game income of the first node; According to the target topology network and the game strategy corresponding to the first node, controlling the first node to play games with all the second nodes to obtain the game income of the first node includes: According to the target topology network and the game strategy corresponding to the first node, the first node is controlled to play a game with the second nodes corresponding to all network nodes in the target topology network that are 1 hop away from the first node, to obtain an initial game gain; Obtaining a self-game benefit of the first node according to the game strategy corresponding to the first node; The game profit of the first node is obtained according to the sum of the initial game profit and the self-game profit.

2. The method according to claim 1, characterized in that The obtaining the self-game benefit of the first node according to the game strategy corresponding to the first node includes: The self-game benefit of the first node is determined according to the game strategy corresponding to the first node and the pre-stored mapping relationship between the game strategy and the self-game benefit.

3. The method according to claim 1, characterized in that: The obtaining the self-game benefit of the first node according to the game strategy corresponding to the first node includes: If it is determined that the game strategy corresponding to the first node is a cooperative strategy, a random number greater than or equal to a first preset value and less than or equal to a second preset value is generated, and the random number is used as the self-game profit of the first node.

4. The method according to any one of claims 1 to 3, characterized in that: If the game strategy corresponding to the first node is a betrayal strategy, the self-game benefit is less than or equal to 0.

5. The method according to any one of claims 1 to 3, characterized in that: The target system is a network resource configuration system; After determining the resource configuration mode of each first node in the target system according to the game income of the first node, the method further includes: The resource configuration mode is sent to the network resource allocation node in the target system, so that the network resource allocation node performs network resource configuration on each first node according to the resource configuration mode.

6. A resource allocation device, characterized in that: The device comprises: An acquisition module, used for acquiring a target topology network; the network nodes of the target topology network correspond one-to-one to each first node in the target system; the first node is a node in the target system to be resource configured; A processing module is used for controlling any of the first nodes to play a game with a second node according to the target topology network and the game strategy corresponding to the first node, so as to obtain the game benefit of the first node; and determining the resource configuration mode of each first node in the target system according to the game benefit of the first node; wherein the second node includes: the first node, and all first nodes that are 1 hop away from the first node in the target topology network; The processing module is specifically used to control the first node to play a game with the second nodes corresponding to all network nodes that are 1 hop away from the first node in the target topology network according to the target topology network and the game strategy corresponding to the first node, so as to obtain an initial game gain; Obtaining a self-game benefit of the first node according to the game strategy corresponding to the first node; The game profit of the first node is obtained according to the sum of the initial game profit and the self-game profit.

7. An electronic device, characterized in that: The electronic device comprises a memory and a processor; The memory stores a computer program; The processor is configured to execute the method of any one of claims 1 to 5 through the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.