SDN-based block chain resource optimal configuration method and system, and program product
The SDN-based resource optimization method addresses static configuration inefficiencies in block chain networks by dynamically reallocating resources using MILP algorithms and OpenFlow protocols, enhancing utilization and scalability.
Patent Information
- Application Number
- CN202510500662.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-07-15
AI Technical Summary
The static configuration method of traditional blockchain network architecture leads to low resource utilization, low configuration efficiency, poor scalability, and difficult to adapt to dynamic load changes. Existing solutions such as preset resource quotas and heuristic algorithms have problems of resource waste and high management complexity.
The resource optimization configuration method based on SDN is adopted, and network status data is received through the SDN controller, network topology and resource requirements matrix are constructed, bandwidth and computing resource allocation are optimized using a hybrid integer linear planning algorithm, and resource configuration is dynamically adjusted through the OpenFlow protocol to meet node requirements and link load constraints.
It realizes dynamic resource allocation with second-level response, improves resource utilization by 15%, improves system performance and scalability, meets real-time requirements, and reduces operation and maintenance complexity.
Smart Images

Figure CN120321113A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular, to a blockchain resource optimization configuration system, method, and program product. Background Art
[0002] Blockchain test environments usually need to frequently adjust network topologies and node resources to verify performance in different scenarios. However, the static configuration method of traditional network architectures causes the following problems:
[0003] Low resource utilization: The fixed-allocated network bandwidth and computing resources cannot adapt to dynamic loads.
[0004] Low configuration efficiency: Manually adjusting network parameters is time-consuming and error-prone, and there is a risk of reducing the availability of the system.
[0005] Poor scalability: It is difficult to quickly deploy and adjust nodes in large-scale test scenarios, which has a greater impact on the availability and reliability of the system.
[0006] Existing solution 1: Traditional blockchain test platforms adopt a solution of presetting fixed node resource quotas. This solution is also one of the most widely used solutions currently. For example, CPU resources, memory resources, disk resources, and network resources are predictively deployed, and resource allocation is difficult to dynamically adjust during the test cycle.
[0007] Existing solution 2: Heuristic algorithms (such as genetic algorithms) are used to optimize virtual machine resource configuration. The computational complexity is high, the management cost is relatively high, and there is interference in resource contention, making it difficult to meet the real-time adaptation requirements of large-scale blockchain tests. Summary of the Invention
[0008] This application provides a method, system, and program product for optimizing blockchain resource configuration based on SDN, aiming to solve the problems of low resource utilization, low configuration efficiency, and poor scalability existing in the static configuration method of traditional network architectures in the prior art.
[0009] In a first aspect, a method for optimizing blockchain resource configuration based on SDN is provided. The method is based on an SDN controller and includes:
[0010] Receive the collected network status data, node resource usage data, and blockchain network data, and construct a network topology G = (V, E), a node resource demand matrix D, and a link capacity C; where the network topology G = (V, E), V represents the set of nodes, that is, the set of all nodes in the blockchain network; E represents the set of edges, that is, the set of communication links connecting each node; data is transmitted between nodes through communication links; the node resource demand matrix D is used to describe the demand situation of each node for different types of resources; the rows of matrix D correspond to different nodes, and the columns correspond to different resource types; the link capacity C is a parameter related to the link, indicating the maximum data transmission rate bandwidth that each link e ∈ E can carry.
[0011] Based on the given network topology G = (V, E), node resource demand matrix D, and link capacity C, call the mixed integer linear programming MILP algorithm. By reasonably allocating bandwidth and computing resources, under the conditions of meeting node resource requirements and link load constraints, minimize the total delay of the network, and generate a bandwidth allocation matrix B and a node computing resource quota R; where the bandwidth allocation matrix B represents the bandwidth allocation situation of each link in the network; the node computing resource quota R represents the amount of computing resources allocated to each node.
[0012] Send flow table rules to the switch through the OpenFlow protocol, and adjust the link bandwidth allocation according to the bandwidth allocation matrix B and adjust the quotas of various resources of the node according to the node computing resource quota R.
[0013] In the above solution, optionally, minimize the total delay T total The formula is:
[0014]
[0015] In the formula, f e represents the traffic of link e, that is, the data transmission rate through link e; C e - f e represents the remaining capacity of link e; the meaning of this formula is to minimize the total delay of the entire network by reasonably allocating link traffic; the denominator C e - f e represents the remaining capacity of link e. When the link traffic approaches its capacity, the delay will increase sharply. Therefore, this formula reflects the relationship between traffic and delay, and optimizes network performance by minimizing the sum.
[0016] The conditions for meeting node resource requirements and link load constraints include: determining that the node resource requirement satisfaction rate is greater than a preset satisfaction rate threshold and the link load is less than a preset load threshold.
[0017] In the above solution, further optionally, the preset satisfaction rate threshold is 95%, that is, the node resource demand satisfaction rate > 95%.
[0018] The preset load threshold is 80%, that is, the link load < 80%.
[0019] In the above solution, optionally, before the method is executed, a topology database of the basic resource configuration is first maintained, and this database is used to record the initial state of the network, including the configuration information of nodes and links, as well as the initial resource allocation situation.
[0020] In the above solution, optionally, before receiving the collected network status data, node resource usage data, and blockchain network data, it further includes: judging the rationality and effectiveness of data storage. If the data storage is reasonable and effective, then continue to execute the method; otherwise, clear the cached data and re-collect valid and reasonable data.
[0021] In a second aspect, a blockchain resource optimization configuration system for SDN is provided, including:
[0022] A data layer for providing blockchain network data that needs to be optimized;
[0023] An acquisition layer for supporting an SDN controller to collect network status data and node resource usage data in real time;
[0024] A control layer for receiving the collected network status data, node resource usage data, and blockchain network data, and constructing a network topology G = (V, E), a node resource demand matrix D, and a link capacity C; where the network topology G = (V, E), V represents the set of nodes, that is, the set of all nodes in the blockchain network; E represents the set of edges, that is, the set of communication links connecting each node; data is transmitted between nodes through communication links; the node resource demand matrix D is used to describe the demand situation of each node for different types of resources; the rows of the matrix D correspond to different nodes, and the columns correspond to different resource types; the link capacity C is a parameter related to the link, indicating the maximum data transmission rate bandwidth that each link e ∈ E can carry; based on the given network topology G = (V, E), node resource demand matrix D, and link capacity C, a mixed-integer linear programming MILP algorithm is called. By reasonably allocating bandwidth and computing resources, under the conditions of meeting node resource demands and link load constraints, the total delay of the network is minimized, and a bandwidth allocation matrix B and a node computing resource quota R are generated; where the bandwidth allocation matrix B represents the bandwidth allocation situation of each link in the network; the node computing resource quota R represents the amount of computing resources allocated to each node; flow table rules are sent to the switch through the OpenFlow protocol, and the link bandwidth allocation is adjusted according to the bandwidth allocation matrix B, and the quotas of various resources of the nodes are adjusted according to the node computing resource quota R.
[0025] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the above method.
[0026] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and characterized in that when the computer program is executed by a processor, the steps of the above method are implemented.
[0027] In a fifth aspect, a computer program product is provided, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the above method are implemented.
[0028] Compared with the prior art, the present application has at least the following beneficial effects:
[0029] Based on further analysis and research of the problems in the prior art, the present application recognizes that the static configuration method of the traditional network architecture in the prior art has problems such as low resource utilization, low configuration efficiency, and poor scalability. Through SDN technology and dynamic optimization algorithms, dynamic and intelligent optimization configuration of blockchain network resources is achieved. The system collects network data in real time, accurately analyzes and generates an optimal resource allocation strategy, dynamically adjusts resource configuration, significantly improves resource utilization and system performance, while enhancing configuration efficiency and scalability, and effectively solves the deficiencies of the prior art.
[0030] The present application also provides a low-overhead dynamic resource configuration method through the centralized control ability of SDN. Combining with the real-time resource requirements of blockchain nodes, it dynamically optimizes network traffic paths and bandwidth allocation. At the same time, the MILP algorithm is used to balance latency, resource utilization, and system throughput, and intelligently adjusts the computing resource quota to achieve efficient configuration of global resources, meeting the following requirements:
[0031] (1) Second-level response: Under high load of requests, the resource configuration response time ≤ 15 seconds.
[0032] (2) Improvement in resource utilization: Through batch group configuration and message queue optimization, the resource utilization is increased by 15%.
[0033] (3) Global optimization: Based on SDN global topology awareness, dynamically adjust the resource allocation strategy. Description of the Drawings
[0034] Figure 1 It is a schematic flowchart of a method for optimizing and configuring blockchain resources based on SDN provided by the first embodiment of the present application.
[0035] Figure 2Schematic diagram of the technical architecture of a blockchain resource optimization and allocation system based on SDN provided by an embodiment of the present application.
[0036] Figure 3 Flow chart of a method for optimizing and allocating blockchain resources based on SDN provided by the first embodiment of the present application. Detailed implementation manners
[0037] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0038] In the description of the present application: Unless otherwise specified, expressions such as "including", "comprising", "having", etc. also mean "not limited to" (certain units, components, materials, steps, etc.).
[0039] Explanation of technical terms:
[0040] SDN: Software Defined Network, which is a revolutionary network architecture paradigm. Its core is to achieve centralized and intelligent management of the network by decoupling the network.
[0041] OpenFlow protocol: OpenFlow is a key communication protocol for software-defined networks, aiming to separate the control plane (decision-making logic) and data plane (traffic forwarding) of network devices, so as to achieve centralized and flexible control of the network.
[0042] SDN controller: Responsible for centralized monitoring and scheduling of network-wide resources, and issuing flow table rules based on the OpenFlow protocol.
[0043] Resource demand model: The resource demands of blockchain nodes include indicators such as bandwidth, CPU utilization, and storage I / O.
[0044] Mixed Integer Linear Programming (MILP): It is an extension of conventional linear programming, which requires some variables to take integer values and can be used in fields such as resource allocation, scheduling, and path optimization. The integer constraints lead to a discrete solution space and the complexity of solving is the key content to be solved.
[0045] Dynamic optimization algorithm: An algorithm based on mixed integer linear programming, with the goal of minimizing network latency and resource waste.
[0046] Blockchain resource layer: Includes computing nodes (CPU / GPU), storage nodes (distributed storage), and network nodes (SDN switches).
[0047] The existing blockchain resource allocation has the following disadvantages: Static allocation cannot adapt to dynamic load changes, resulting in coexistence of resource waste and performance bottlenecks; Only computing resources are optimized, ignoring the impact of network topology on blockchain performance in terms of consensus latency and data transmission efficiency; Static allocation strategies cannot dynamically adapt to load fluctuations, leading to serious resource fragmentation; Without combining the global topology information of SDN, the resource allocation strategy is locally optimized.
[0048] Based on these disadvantages, this application proposes a blockchain resource optimization allocation system and method based on software-defined network (SDN): Through dynamic network resource scheduling and intelligent optimization algorithms, it realizes the on-demand allocation of network bandwidth and computing resources, reduces the operation and maintenance complexity of the test environment, and improves resource utilization and system throughput.
[0049] In one embodiment, referring to Figure 1 or Figure 3 , a blockchain resource optimization allocation method based on SDN is provided. The method is based on an SDN controller and includes:
[0050] Receiving the collected network status data, node resource usage data, and blockchain network data, and constructing a network topology G=(V, E), a node resource demand matrix D, and a link capacity C; where the network topology G=(V, E), V represents the set of nodes, that is, the set of all nodes in the blockchain network; E represents the set of edges, that is, the set of communication links connecting each node; Nodes transmit data through communication links; The node resource demand matrix D is used to describe the demand situation of each node for different types of resources; The rows of matrix D correspond to different nodes, and the columns correspond to different resource types; The link capacity C is a parameter related to the link, indicating the maximum data transmission rate bandwidth that each link e∈E can carry;
[0051] Based on the given network topology G=(V, E), node resource demand matrix D, and link capacity C, calling the mixed integer linear programming (MILP) algorithm, by reasonably allocating bandwidth and computing resources, under the condition of meeting node resource requirements and link load constraints, minimizing the total delay of the network, generating a bandwidth allocation matrix B and a node computing resource quota R; where the bandwidth allocation matrix B represents the bandwidth allocation situation of each link in the network; The node computing resource quota R represents the amount of computing resources allocated to each node;
[0052] Issuing flow table rules to switches through the OpenFlow protocol, adjusting the link bandwidth allocation according to the bandwidth allocation matrix B, and adjusting the quotas of various resources of nodes according to the node computing resource quota R.
[0053] In this embodiment, network status data: used to understand the overall operation of the network, including link status, node status, etc. Node resource usage data: records the current resource usage of each node, such as CPU, memory, etc. Blockchain network data: data related to the blockchain, such as transaction traffic, block generation rate, etc.
[0054] By dynamically adjusting network resource allocation through the SDN controller, it can quickly adapt to changes in network status. Using the MILP algorithm for resource optimization can effectively reduce network latency and improve resource utilization. Automatically distributing flow table rules through the OpenFlow protocol reduces manual intervention and improves management efficiency.
[0055] In one embodiment, minimizing the total delay T total has the formula:
[0056]
[0057] In the formula, f e represents the traffic of link e, that is, the data rate transmitted through link e; C e - f e represents the remaining capacity of link e; the meaning of this objective function is to minimize the total delay of the entire network by reasonably allocating link traffic; the denominator C e - f e represents the remaining capacity of link e. When the link traffic approaches its capacity, the delay will increase sharply. Therefore, this formula reflects the relationship between traffic and delay, and optimizes network performance by minimizing the sum;
[0058] The conditions for meeting node resource requirements and link load constraints include: determining that the node resource satisfaction rate is greater than the preset satisfaction rate threshold, and the link load is less than the preset load threshold.
[0059] In this embodiment, the objective function for minimizing the total delay and its constraint conditions in the SDN-based blockchain resource optimization and configuration method are further clarified. This objective function minimizes the total delay of the entire network by reasonably allocating link traffic. When the link traffic approaches its capacity, the delay will increase sharply. Therefore, the formula reflects the relationship between traffic and delay. In addition, the optimization process needs to meet node resource requirements and link load constraints. The specific conditions include: the node resource satisfaction rate needs to be greater than the preset satisfaction rate threshold, and the link load needs to be less than the preset load threshold.
[0060] Minimizing the total delay clearly reflects the non-linear relationship between traffic and delay, providing a clear goal for the optimization algorithm. This enables the optimization process to more precisely adjust the link traffic, avoid link overload, and thus effectively reduce network latency. Secondly, setting the constraint conditions for node resource satisfaction rate and link load ensures that the optimization process not only focuses on minimizing delay but also takes into account the reasonable allocation of node resources and the safe operation of links, improving the stability and reliability of the network.
[0061] In one embodiment, the preset satisfaction rate threshold is 95%, that is, the node resource demand satisfaction rate > 95%; the preset load threshold is 80%, that is, the link load < 80%.
[0062] In this embodiment, the node resource demand satisfaction rate needs to be greater than 95%, that is, at least 95% of the node resource demands must be met; the link load needs to be less than 80%, that is, the actual traffic on the link must not exceed 80% of its capacity. The setting of the thresholds provides a clear quantitative standard for the optimization process, ensuring the efficient utilization of node resources and the safe operation of links while optimizing network latency.
[0063] In one embodiment, before the method is executed, a topology database of the basic resource configuration is first maintained. This database is used to record the initial state of the network, including the configuration information of nodes and links, as well as the initial resource allocation situation.
[0064] In this embodiment, before the SDN-based blockchain resource optimization configuration method is executed, a topology database of the basic resource configuration is first maintained. Through this database, the optimization configuration method can accurately understand the initial architecture and resource allocation status of the network, providing basic data support for subsequent dynamic optimization.
[0065] In one embodiment, before receiving the collected network status data, node resource usage data, and blockchain network data, it further includes: judging the rationality and effectiveness of data storage. If the data storage is reasonable and effective, the method continues to be executed; otherwise, the cached data is cleared and valid and reasonable data is collected again.
[0066] In this embodiment, by adding a data rationality and effectiveness verification step before data reception, the reliability and efficiency of the SDN-based blockchain resource optimization configuration method are further improved, enhancing the robustness and adaptability of the system, and providing more powerful guarantee for the efficient operation of the blockchain network.
[0067] The solution of the present application is described from another perspective below.
[0068] As Figure 3As shown in the figure, the dynamic resource implementation process based on SDN (the blockchain resource optimization configuration method based on SDN) mainly consists of four parts, and the general process is briefly introduced as follows:
[0069] Data collection: First, maintain a topology database of basic resource configuration based on the SDN controller, and then collect the status of all network nodes (load, bandwidth, latency, resources, network, link data, etc.) in real time. The controller periodically obtains the network link status and node resource utilization rate.
[0070] Demand prediction: Based on the complex blockchain network environment and the historical data of the blockchain network collected, conduct data statistics, data analysis, and data prediction to predict the resource requirements of blockchain nodes in the next time period and generate a prediction report.
[0071] Optimization calculation: According to the resource usage parameters in the prediction report, call the mixed integer linear programming MILP algorithm to solve the optimal bandwidth allocation and computing resource quota, providing a basis for generating policy adjustments.
[0072] Policy distribution: According to the policy results calculated by the mixed integer linear programming algorithm, adjust the switch flow table rules through the OpenFlow protocol, use the SDN controller to notify the nodes to adjust the quotas of various resources, and periodically poll or event-driven update the topology database.
[0073] The key algorithm for realizing dynamic resource adjustment consists of four major parts: input of resource allocation data, calculation of the objective function, constraint conditions, and output of resource allocation data.
[0074] 1. Input of resource allocation data:
[0075] Network topology G = (V, E):
[0076] V represents the set of nodes, that is, the set of all nodes in the network. Each node can be an entity in the network such as a server, router, or terminal device; E represents the set of edges (links), that is, the set of communication links connecting each node. Through these links, data can be transmitted between nodes.
[0077] Node resource demand matrix D:
[0078] This is a matrix used to describe the demand for different types of resources (such as computing resources, storage resources, etc.) by each node. The rows of the matrix correspond to different nodes, and the columns correspond to different resource types. For example, D i D j can represent the demand of node i for the jth type of resource.
[0079] Link capacity C:
[0080] It is a link-related parameter that represents the maximum data transmission rate bandwidth that each link e ∈ E can carry. For example, Ce represents the capacity of link e, with the unit of bit rate (bps).
[0081] 2. Objective function:
[0082] Minimize the total delay (f e (where f is the traffic of link e).
[0083] Here, f e is the traffic of link e, that is, the data rate transmitted through link e.
[0084] The meaning of this objective function is to minimize the total delay of the entire network by reasonably allocating link traffic. The denominator C e - f e represents the remaining capacity of link e. When the link traffic approaches its capacity, the delay will increase sharply. Therefore, this formula reflects the relationship between traffic and delay, and optimizes the network performance by minimizing this sum.
[0085] 3. Constraints:
[0086] Node resource requirement satisfaction rate > 95%:
[0087] This requires that during the resource scheduling process, the amount of resources obtained by each node should at least meet 95% of its requirements. For example, for computing resources, the actual computing power allocated to the node should reach more than 95% of its required computing power to ensure that the node can run relevant tasks normally, and the same applies to storage resources.
[0088] Link load < 80%:
[0089] To minimize the blocking of the network's demand for transactions, the link load refers to the ratio of the actual traffic of the link to the link capacity. This constraint requires that the actual traffic f e of each link cannot exceed 80% of its capacity C e to avoid link congestion. When the link load is too high, problems such as packet loss and increased delay will occur, so this constraint is used to ensure the stability and reliability of the network.
[0090] 4. Output of resource allocation data:
[0091] Bandwidth allocation matrix B:
[0092] This is a matrix used to represent the bandwidth allocation situation of each link in the network. The rows and columns of the matrix can correspond to the links in the network. Considering that there is a certain association or allocation relationship between the links, B ican represent the bandwidth allocation amount from link i to link j, or simply, B e represents the bandwidth allocated to link e.
[0093] Node computing resource quota R:
[0094] This is a vector or matrix (depending on the number of resource types) used to represent the amount of computing resources allocated to each node. For example, R i represents the computing resource quota allocated to node i, ensuring that the node can execute tasks according to a certain amount of resources to meet its business needs.
[0095] The purpose of the dynamic resource scheduling algorithm is to minimize the total network delay based on the given network topology, node resource requirements, and link capacity, by reasonably allocating bandwidth and computing resources, under the conditions of meeting node resource requirements and link load constraints, so as to optimize the overall performance of the network.
[0096] Key innovation points of this application:
[0097] (1) Deep integration of SDN and blockchain: Achieve global optimization of network resources through the centralized collection, analysis, and control capabilities of SDN.
[0098] (2) Dynamic resource scheduling mechanism: Combine real-time collected monitoring data with predictive analysis to dynamically adjust bandwidth and computing resources.
[0099] (3) Hybrid optimization algorithm: Use the MILP algorithm to balance delay, resource utilization, and system throughput.
[0100] In one embodiment, referring to Figure 2 , a blockchain resource optimization and configuration system for SDN is provided, including:
[0101] Data layer, used to provide blockchain network data that needs to be optimized;
[0102] Collection layer, used to support the SDN controller to collect network status data and node resource usage data in real time;
[0103] The control layer is used to receive the collected network status data, node resource usage data, and blockchain network data, and construct a network topology G = (V, E), a node resource demand matrix D, and a link capacity C. Among them, for the network topology G = (V, E), V represents the set of nodes, that is, the set of all nodes in the blockchain network; E represents the set of edges, that is, the set of communication links connecting each node; data is transmitted between nodes through communication links. The node resource demand matrix D is used to describe the demand situation of each node for different types of resources; the rows of matrix D correspond to different nodes, and the columns correspond to different resource types. The link capacity C is a parameter related to the link, indicating the maximum data transmission rate bandwidth that each link e ∈ E can carry. Based on the given network topology G = (V, E), node resource demand matrix D, and link capacity C, the mixed integer linear programming (MILP) algorithm is called. By reasonably allocating bandwidth and computing resources, under the condition of meeting node resource requirements and link load constraints, the total delay of the network is minimized, and a bandwidth allocation matrix B and a node computing resource quota R are generated. Among them, the bandwidth allocation matrix B represents the bandwidth allocation situation of each link in the network; the node computing resource quota R represents the amount of computing resources allocated to each node. Flow table rules are sent to the switch through the OpenFlow protocol, and the link bandwidth allocation is adjusted according to the bandwidth allocation matrix B, and the quotas of various resources of the node are adjusted according to the node computing resource quota R.
[0104] In this embodiment, with reference to Figure 2 , the blockchain resource optimization technology architecture based on SDN is divided into three layers. The data layer provides the blockchain network data to be optimized. The collection layer collects the blockchain network data. The control layer performs real-time analysis and periodic collection control on the collected data. The design idea is as follows:
[0105] Data layer: The data layer is the sum of the data of the blockchain network, mainly including transaction data between blockchain nodes, p2p network data, storage data, block synchronization data, and consensus engine data, etc., for the content of the data layer.
[0106] Collection layer: The SDN controller collects network status (bandwidth utilization rate, link delay, etc.) and node resource (CPU, memory, disk, etc.) usage data in real time.
[0107] Control layer: The dynamic optimization algorithm processes and analyzes the blockchain-related data forwarded by the switch, as well as the network data and resource consumption data collected by the controller, and then generates a resource allocation parameter strategy and a deployment strategy, and issues a configuration instruction through the controller.
[0108] In one embodiment, a computer device is further provided, including a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the steps of the method in the above embodiment.
[0109] In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0110] In one embodiment, a computer program product is further provided, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the method in the above embodiment are implemented.
[0111] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
Claims
1. A method for optimizing the allocation of blockchain resources based on SDN, characterized in that, The method is based on an SDN controller and includes: Receiving the collected network status data, node resource usage data, and blockchain network data, and constructing a network topology G=(V, E), a node resource demand matrix D, and a link capacity C; where the network topology G=(V, E), V represents the node set, that is, the set of all nodes in the blockchain network; E represents the edge set, that is, the set of communication links connecting each node; data is transmitted between nodes through communication links; the node resource demand matrix D is used to describe the demand situation of each node for different types of resources; the rows of matrix D correspond to different nodes, and the columns correspond to different resource types; the link capacity C is a parameter related to the link, indicating the maximum data transmission rate bandwidth that each link e∈E can carry; Based on the given network topology G=(V, E), node resource demand matrix D, and link capacity C, calling the mixed integer linear programming (MILP) algorithm, by reasonably allocating bandwidth and computing resources, minimizing the total delay of the network under the conditions of meeting node resource requirements and link load constraints, generating a bandwidth allocation matrix B and a node computing resource quota R; where the bandwidth allocation matrix B represents the bandwidth allocation situation of each link in the network; the node computing resource quota R represents the amount of computing resources allocated to each node; Sending flow table rules to the switch through the OpenFlow protocol, adjusting the link bandwidth allocation according to the bandwidth allocation matrix B, and adjusting the quotas of various resources of the node according to the node computing resource quota R.
2. The method for optimizing the allocation of blockchain resources based on SDN according to claim 1, characterized in that Minimize the total delay T total The formula for which is where f e represents the traffic of link e, i.e., the data rate transmitted through link e; C e - f e represents the remaining capacity of link e; the meaning of this formula is to minimize the total delay of the entire network by reasonably allocating link traffic; the denominator C e - f e represents the remaining capacity of link e. When the link traffic approaches its capacity, the delay will increase sharply. Therefore, this formula reflects the relationship between traffic and delay, and optimizes network performance by minimizing the sum; The conditions for meeting node resource requirements and link load constraints include: determining that the node resource requirement satisfaction rate is greater than a preset satisfaction rate threshold, and the link load is less than a preset load threshold.
3. The method for optimizing the allocation of blockchain resources based on SDN according to claim 2, wherein The preset satisfaction rate threshold is 95%, that is, the node resource requirement satisfaction rate > 95%; The preset load threshold is 80%, that is, the link load < 80%.
4. The method for optimizing the allocation of blockchain resources based on SDN according to claim 1, wherein, Before the method is executed, first maintain a topology database of the basic resource configuration, which is used to record the initial state of the network, including the configuration information of nodes and links, and the initial resource allocation situation.
5. The method for optimizing the allocation of blockchain resources based on SDN according to claim 1, wherein, Before receiving the collected network status data, node resource usage data, and blockchain network data, it also includes: judging the rationality and effectiveness of data storage. If the data storage is reasonable and effective, then continue to execute the method; otherwise, clear the cached data and re-collect valid and reasonable data.
6. A blockchain resource optimization and allocation system for SDN, characterized in that, It includes: A data layer for providing blockchain network data to be optimized; An acquisition layer for supporting the SDN controller to collect network status data and node resource usage data in real time; The control layer is used to receive the collected network status data, node resource usage data, and blockchain network data, and construct a network topology G=(V, E), a node resource demand matrix D, and a link capacity C. Among them, for the network topology G=(V, E), V represents the node set, that is, the set of all nodes in the blockchain network; E represents the edge set, that is, the set of communication links connecting each node; data is transmitted between nodes through communication links. The node resource demand matrix D is used to describe the demand situation of each node for different types of resources; the rows of the matrix D correspond to different nodes, and the columns correspond to different resource types. The link capacity C is a parameter related to the link, indicating the maximum data transmission rate bandwidth that each link e∈E can carry. Based on the given network topology G=(V, E), node resource demand matrix D, and link capacity C, the mixed integer linear programming (MILP) algorithm is called. By reasonably allocating bandwidth and computing resources, under the condition of meeting the node resource demand and link load constraints, the total delay of the network is minimized, and a bandwidth allocation matrix B and a node computing resource quota R are generated. Among them, the bandwidth allocation matrix B represents the bandwidth allocation situation of each link in the network; the node computing resource quota R represents the amount of computing resources allocated to each node. Flow table rules are sent to the switch through the OpenFlow protocol, and the link bandwidth allocation is adjusted according to the bandwidth allocation matrix B, and the quotas of various resources of the node are adjusted according to the node computing resource quota R.
7. A computer device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the steps of the method described in claim 1.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method described in claim 1 are implemented.
9. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, the steps of the method described in claim 1 are implemented.