CN111600967B - Access pressure-based load balancing system among block chain nodes - Google Patents

Access pressure-based load balancing system among block chain nodes Download PDF

Info

Publication number
CN111600967B
CN111600967B CN202010721860.XA CN202010721860A CN111600967B CN 111600967 B CN111600967 B CN 111600967B CN 202010721860 A CN202010721860 A CN 202010721860A CN 111600967 B CN111600967 B CN 111600967B
Authority
CN
China
Prior art keywords
node
value
module
block chain
transaction request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010721860.XA
Other languages
Chinese (zh)
Other versions
CN111600967A (en
Inventor
李霞
王剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Rongzer Information Technology Co Ltd
Original Assignee
Jiangsu Rongzer Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Rongzer Information Technology Co Ltd filed Critical Jiangsu Rongzer Information Technology Co Ltd
Priority to CN202010721860.XA priority Critical patent/CN111600967B/en
Publication of CN111600967A publication Critical patent/CN111600967A/en
Application granted granted Critical
Publication of CN111600967B publication Critical patent/CN111600967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Abstract

The invention discloses an access pressure-based inter-block chain node load balancing system, which is used for solving the problem that when the access pressure of a single block chain node in the existing block chain is high, the single block chain node is punctured, so that an avalanche condition can occur in a block chain node cluster due to too high pressure; the data acquisition module is used for acquiring the consumed resource information of the transaction request and sending the consumed resource information to the server; the data analysis module is used for acquiring consumption resource information stored in the server and analyzing the consumption resource information, and the load balancing module is used for carrying out load balancing adjustment on the transaction request; the invention executes the transaction request by selecting the node, and reasonably distributes the transaction request by the load balancing module, so that the node resources in the whole block chain are efficiently used.

Description

Access pressure-based load balancing system among block chain nodes
Technical Field
The invention relates to the technical field of computer information processing and block chains, in particular to a load balancing system among block chain nodes based on access pressure.
Background
A blockchain node generally refers to a computer in a blockchain network, that is, any computer (including cell phones, mining machines, etc.) connected to the blockchain network is called a node; when the access pressure of a single blockchain node in the existing blockchain is large, the single blockchain node is punctured, so that an avalanche condition can occur in a blockchain node cluster due to too large pressure.
Disclosure of Invention
The invention aims to provide a load balancing system among block chain nodes based on access pressure, aiming at solving the problem that when the access pressure of a single block chain node in the existing block chain is high, the single block chain node is punctured, so that an avalanche condition can occur in a block chain node cluster due to too high pressure; the transaction request is executed by the selected node, and the transaction request is reasonably distributed by the load balancing module, so that the node resources in the whole block chain are efficiently used.
The purpose of the invention can be realized by the following technical scheme: a load balancing system among block chain nodes based on access pressure comprises a data acquisition module, a server, a data analysis module and a load balancing module;
the data acquisition module is used for acquiring the consumed resource information of the transaction request and sending the consumed resource information to the server; the data analysis module is used for acquiring consumption resource information stored in the server and analyzing the consumption resource information, and the specific analysis steps are as follows:
the method comprises the following steps: setting a transaction request as Pi, i =1, … …, n; setting the memory occupation value consumed by executing transaction request as NjPi(ii) a The CPU occupation value consumed by the execution of the transaction request is DjPi(ii) a j =1, … …, n; j represents the number of executions of the transaction request;
step two: carrying out dequantization processing on the memory occupation value and the CPU occupation value and taking the numerical values of the memory occupation value and the CPU occupation value;
using formulas
Figure 341625DEST_PATH_IMAGE001
Obtaining the average consumption value Z of the transaction requestPi(ii) a Wherein, b1 and b2 are both preset proportionality coefficients;
step three: the data analysis module sends the average consumption value of the transaction request to a server for storage;
the load balancing module is used for carrying out load balancing adjustment on the transaction request, and the specific adjustment steps are as follows:
s1: the user sends a transaction request to the load balancing module through the client, and after receiving the transaction request, the load balancing module matches the transaction request with all transaction requests stored in the server to obtain an average consumption value Z of the corresponding transaction requestPa(ii) a a belongs to i, and simultaneously the load balancing module generates a node analysis instruction;
s2: the load balancing module sends the node analysis instruction to the node analysis module, and the node analysis module sends the node execution value of the block chain node to the load balancing module after analyzing;
s3: the load balancing module enables the node execution value to be larger than the average consumption value ZPaMarking the block chain link points as initial selection nodes; setting the initially selected node as Jk, wherein k is a positive integer;
s4: the load balancing module generates an access instruction corresponding to the initially selected node and sends the access instruction to the node counting module, and the node counting module receives and processes the access instruction corresponding to the initially selected node to obtain a block value of the initially selected node and sends the block value to the load balancing module;
s5: marking the node execution value of the primary selection node as ZJk(ii) a Marking the block value of the primary selection node as QJk(ii) a Carrying out dequantization processing on the node execution value and the block value and taking the numerical value of the node execution value and the block value;
s6: using the formula FJk=ZJk×b3+QJkObtaining x b 4-mu to obtain the node kiss value F of the primary selected nodeJk(ii) a Wherein b3 and b4 are both preset proportionality coefficients, mu is an error correction factor, and the value is 2.3863;
s7: and selecting the initial selection node with the maximum node kiss value as the selected node of the transaction request, and executing the transaction request through the selected node.
Preferably, the system further comprises a node acquisition module and a node analysis module, wherein the node acquisition module is used for acquiring node information of the block chain node and sending the node information to the node analysis module; the node information comprises the residual memory value of the block chain node and the real-time residual utilization rate of the CPU; the node analysis module is used for receiving node information and analyzing the node information, and the specific analysis steps are as follows:
SS 1: after receiving the node analysis instruction, the node analysis module analyzes the node information and sets the residual memory value of the block chain node to be D1;
SS 2: counting the real-time residual utilization rate of the CPU, and setting the residual utilization rate to be Lm, wherein m =0 and … … 99; and the value range of Lm is (0, 1)]The number of occurrences of remaining usage is counted and labeled as ELm
SS 3: selecting the residual utilization rate with the largest occurrence frequency, and marking the residual utilization rate as Lb, wherein b belongs to m;
SS 4: summing the times of other residual utilization rates to obtain a total occurrence time EZ;
SS 5: dequantizing the residual memory value, the residual utilization rate and the residual utilization rate, and taking the values of the dequantization residual memory value, the residual utilization rate and the residual utilization rate, and obtaining a node execution value Z of the block chain node by using a formula Z = D1 × b5+ Lb × b6-EZ × b7+ lambda; b5, b6 and b7 are all preset proportionality coefficients, and lambda is a correction constant and takes the value of 1.32;
SS 6: and the node analysis module sends the node execution value to the load balancing module.
Preferably, the consumed resource information is a resource consumed when the transaction request is executed, and the resource includes a memory occupation value and a CPU occupation value.
Preferably, the specific processing steps of the node statistics module in step S4 to obtain the block value of the initially selected node include:
s41: acquiring equipment information of the primary selection node, setting all CPU models to be preset values, matching the CPU models in the equipment information with all the CPU models to obtain corresponding preset values, and marking as Y1Jk
S42: calculating the time difference between the purchase time in the equipment information and the current time of the system to obtain the purchase duration of the equipment and marking the purchase duration as T1JkThe unit is day;
s43: set the rated memory of the device to Y2Jk(ii) a The number of times of maintenance of the apparatus was Y3Jk(ii) a Carrying out dequantization processing on a preset value, purchase duration, rated memory and maintenance times and taking the numerical values of the dequantization processing;
s44: using formulas
Figure 462028DEST_PATH_IMAGE003
Obtaining a block value Q of the primary selection nodeJk(ii) a Wherein, b8, b9, b10 and b11 are all preset proportionality coefficients.
Preferably, the system further comprises a registration login module, wherein the registration login module is used for submitting the equipment information for registration by the user and sending the equipment information which is successfully registered to the server for storage, and the server marks the equipment as the block link node after receiving the equipment information and marks the time when the equipment information is received as the registration time of the equipment; the equipment information comprises the position, the CPU model, the purchase time, the rated memory and the maintenance frequency of the equipment, and the equipment is a desktop computer or a notebook computer; the rated memory includes a rated capacity of the operating memory and a rated capacity of the hard disk memory.
Preferably, the system further comprises a storage allocation module, wherein the storage allocation module is used for allocating and storing the compacted data, and the specific allocation steps are as follows:
v1: the user sends the stored data to the server through the client, and the server receives the stored data, compresses and encrypts the data to obtain the compressed data and sends the compressed data to the storage distribution module;
v2: setting the hard disk memory of the block chain node as G1: the remaining memory of the hard disk is marked as G4; carrying out distance calculation on the positions of the block chain nodes and the positions of the storage distribution modules to obtain a distance value, and marking the distance value as G2; calculating the time difference between the registration time of the block chain node and the current time of the system to obtain registration time length which is marked as G3;
v3: dequantizing the hard disk memory, the residual memory, the distance value and the registration duration, and taking the values of the dequantization processing, and obtaining a numerical distribution value GF of a block chain node by using a formula GF = G1 × c1+ G4 × c2+ G3 × c3+ (1/G2) × c 4; wherein c1, c2, c3 and c4 are all preset proportionality coefficients;
v4: and selecting the block chain node with the maximum matching value as a storage node of the compacted data, and sending the compacted data to the block chain node for storage by the storage allocation module.
Compared with the prior art, the invention has the beneficial effects that: the data acquisition module acquires the consumed resource information of the transaction request and sends the consumed resource information to the server; the data analysis module acquires consumption resource information stored in the server, analyzes the consumption resource information, and dequantizes and takes numerical values of the memory occupation value and the CPU occupation value; obtaining an average consumption value of the transaction request by using a formula; the data analysis module sends the average consumption value of the transaction request to a server for storage; the load balancing module carries out load balancing adjustment on the transaction request, selects the initial selection node with the maximum node kiss value as the selected node of the transaction request, and executes the transaction request through the selected node; the method comprises the steps of carrying out dequantization processing on a memory occupation value and a CPU occupation value of a transaction request and analyzing to obtain an average consumption value, selecting a block chain node according to the average consumption value, then carrying out dequantization processing on the selected block chain node according to a node execution value and a block value to obtain a node kiss value of the block chain node, selecting a primary selected node with the largest node kiss value as a selected node of the transaction request, executing the transaction request through the selected node, and reasonably distributing the transaction request through a load balancing module, so that node resources in the whole block chain are efficiently used, breakdown of the single block chain node is avoided when the access pressure of the single block chain node is large, and meanwhile, the situation that avalanche occurs due to too large pressure in a block chain node cluster is also ensured.
Drawings
In order to facilitate understanding for those skilled in the art, the present invention will be further described with reference to the accompanying drawings.
Fig. 1 is a schematic block diagram of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a system for balancing load among nodes of a block chain based on access pressure includes a data acquisition module, a server, a data analysis module, a load balancing module, a node acquisition module, a node analysis module, a node statistics module, a registration and login module, and a storage and allocation module;
the data acquisition module is used for acquiring the consumed resource information of the transaction request and sending the consumed resource information to the server; the resource consumption information is the resource consumed when the transaction request is executed, and the resource comprises a memory occupation value and a CPU occupation value;
the data analysis module is used for acquiring consumption resource information stored in the server and analyzing the consumption resource information, and the specific analysis steps are as follows:
the method comprises the following steps: setting a transaction request as Pi, i =1, … …, n; setting the memory occupation value consumed by executing transaction request as NjPi(ii) a The CPU occupation value consumed by the execution of the transaction request is DjPi(ii) a j =1, … …, n; j represents the number of executions of the transaction request;
step two: carrying out dequantization processing on the memory occupation value and the CPU occupation value and taking the numerical values of the memory occupation value and the CPU occupation value;
using formulas
Figure 241765DEST_PATH_IMAGE001
Obtaining the average consumption value Z of the transaction requestPi(ii) a Wherein, b1 and b2 are both preset proportionality coefficients;
step three: the data analysis module sends the average consumption value of the transaction request to a server for storage;
the load balancing module is used for carrying out load balancing adjustment on the transaction request, and the specific adjustment steps are as follows:
s1: the user sends a transaction request to the load balancing module through the client, and after receiving the transaction request, the load balancing module matches the transaction request with all transaction requests stored in the server to obtain an average consumption value Z of the corresponding transaction requestPa(ii) a a belongs to i, and simultaneously the load balancing module generates a node analysis instruction;
s2: the load balancing module sends the node analysis instruction to the node analysis module, and the node analysis module sends the node execution value of the block chain node to the load balancing module after analyzing;
s3: the load balancing module enables the node execution value to be larger than the average consumption value ZPaMarking the block chain link points as initial selection nodes; setting the initially selected node as Jk, wherein k is a positive integer;
s4: the load balancing module generates an access instruction corresponding to the initially selected node and sends the access instruction to the node counting module, and the node counting module receives and processes the access instruction corresponding to the initially selected node to obtain a block value of the initially selected node and sends the block value to the load balancing module; the specific treatment steps are as follows:
s41: acquiring equipment information of the primary selection node, setting all CPU models to be preset values, matching the CPU models in the equipment information with all the CPU models to obtain corresponding preset values, and marking as Y1Jk
S42: calculating the time difference between the purchase time in the equipment information and the current time of the system to obtain the purchase duration of the equipment and marking the purchase duration as T1JkThe unit is day;
s43: set the rated memory of the device to Y2Jk(ii) a The number of times of maintenance of the apparatus was Y3Jk(ii) a Carrying out dequantization processing on a preset value, purchase duration, rated memory and maintenance times and taking the numerical values of the dequantization processing;
s44: using formulas
Figure 309078DEST_PATH_IMAGE004
Obtaining a block value Q of the primary selection nodeJk; wherein b8, b9, b10 and b11 are all preset proportionality coefficients;
s5: marking the node execution value of the primary selection node as ZJk(ii) a Marking the block value of the primary selection node as QJk(ii) a Carrying out dequantization processing on the node execution value and the block value and taking the numerical value of the node execution value and the block value;
s6: using the formula FJk=ZJk×b3+QJkObtaining x b 4-mu to obtain the node kiss value F of the primary selected nodeJk(ii) a Wherein b3 and b4 are both preset proportionality coefficients, mu is an error correction factor, and the value is 2.3863; the larger the node kiss value is, the higher the probability that the transaction request is executed by the primary selection node is;
s7: selecting the initial selection node with the maximum node kiss value as the selected node of the transaction request, and executing the transaction request through the selected node;
the node acquisition module is used for acquiring node information of the block chain nodes and sending the node information to the node analysis module; the node information comprises the residual memory value of the block chain node and the real-time residual utilization rate of the CPU; the node analysis module is used for receiving node information and analyzing the node information, and the specific analysis steps are as follows:
SS 1: after receiving the node analysis instruction, the node analysis module analyzes the node information and sets the residual memory value of the block chain node to be D1;
SS 2: counting the real-time residual utilization rate of the CPU, and setting the residual utilization rate to be Lm, wherein m =0 and … … 99; and the value range of Lm is (0, 1)]The number of occurrences of remaining usage is counted and labeled as ELm
SS 3: selecting the residual utilization rate with the largest occurrence frequency, and marking the residual utilization rate as Lb, wherein b belongs to m;
SS 4: summing the times of other residual utilization rates to obtain a total occurrence time EZ;
SS 5: dequantizing the residual memory value, the residual utilization rate and the residual utilization rate, and taking the values of the dequantization residual memory value, the residual utilization rate and the residual utilization rate, and obtaining a node execution value Z of the block chain node by using a formula Z = D1 × b5+ Lb × b6-EZ × b7+ lambda; b5, b6 and b7 are all preset proportionality coefficients, and lambda is a correction constant and takes the value of 1.32;
SS 6: the node analysis module sends the node execution value to the load balancing module;
the registration login module is used for submitting equipment information for registration by a user and sending the equipment information which is successfully registered to the server for storage, and the server marks the equipment as a block chain node after receiving the equipment information and marks the time when the equipment information is received as the registration time of the equipment; the equipment information comprises the position, the CPU model, the purchase time, the rated memory and the maintenance frequency of the equipment, and the equipment is a desktop computer or a notebook computer; the rated memory comprises the rated capacity of the operating memory and the rated capacity of the hard disk memory;
the storage allocation module is used for allocating and storing the compacted data, and the specific allocation steps are as follows:
v1: the user sends the stored data to the server through the client, and the server receives the stored data, compresses and encrypts the data to obtain the compressed data and sends the compressed data to the storage distribution module;
v2: setting the hard disk memory of the block chain node as G1: the remaining memory of the hard disk is marked as G4; carrying out distance calculation on the positions of the block chain nodes and the positions of the storage distribution modules to obtain a distance value, and marking the distance value as G2; calculating the time difference between the registration time of the block chain node and the current time of the system to obtain registration time length which is marked as G3;
v3: dequantizing the hard disk memory, the residual memory, the distance value and the registration duration, and taking the values of the dequantization processing, and obtaining a numerical distribution value GF of a block chain node by using a formula GF = G1 × c1+ G4 × c2+ G3 × c3+ (1/G2) × c 4; wherein c1, c2, c3 and c4 are all preset proportionality coefficients;
v4: selecting the block chain node with the maximum numerical distribution value as a storage node of the compacted data, and sending the compacted data to the block chain node for storage by a storage distribution module;
the formulas are obtained by acquiring a large amount of data and performing software simulation, and the coefficients in the formulas are set by the technicians in the field according to actual conditions;
the load balancing module can also adjust the load by: the method comprises the following specific steps:
VV 1: calculating the resources consumed by each transaction in the execution process, including memory occupation, CPU occupation and data used by a hard disk;
VV 2: calculating all resources of the current node, including the residual memory, the CPU core number and Hz when the current node is empty, and the residual available space of the hard disk;
VV 3: dividing all resources by average consumed resources to obtain the maximum concurrent transaction execution number of the node;
VV 4: adding a configurable threshold value, and storing in percentage form;
VV 5: broadcasting the current pressure percentage of the node to other nodes in the blockchain cluster through the P2P network, wherein the current node also receives the state information of other nodes;
VV 6: adding Token into a bucket at a constant 1/QPS time interval (if QPS =100, the interval is 10ms) by using a current limiter of a Token bucket algorithm when receiving a transaction, temporarily not adding a new request if the bucket is full, respectively taking away one Token, and forwarding the request to other nodes if no Token can be taken;
VV 7: when in forwarding, a smooth polling load balancing algorithm taking the load state percentage as the weight is used, and the load balancing algorithm is as follows:
VV 71: finding out a server maxWeightServer with the maximum current weight value;
VV 72: calculating the sum weightSum of { W0, W1, W2, … and Wn };
VV 73: transmitting maxweight Server. CW = maxweight Server. CW-weight Sum;
VV 74: recalculating the current weight CW of { S0, S1, S2, …, Sn } with the formula Sn.CW = Sn.CW + Sn.Wn
VV75, return maxWeightServer;
the default weight represents the original weight of the server, the current weight represents the weight recalculated after each access, the initial value of the current weight is the default weight, the server with the maximum current weight is maxweightServer, the sum of all the default weights is weightSum, and the server list is serverList;
when the transaction system is used, the data acquisition module is used for acquiring the consumed resource information of the transaction request and sending the consumed resource information to the server; the data analysis module acquires consumption resource information stored in the server, analyzes the consumption resource information, and dequantizes and takes numerical values of the memory occupation value and the CPU occupation value; obtaining an average consumption value of the transaction request by using a formula; the data analysis module sends the average consumption value of the transaction request to a server for storage; the load balancing module carries out load balancing adjustment on the transaction requests, a user sends the transaction requests to the load balancing module through a client, and the load balancing module matches the transaction requests with all transaction requests stored in the server after receiving the transaction requests to obtain an average consumption value of the corresponding transaction requests; the load balancing module sends the node analysis instruction to the node analysis module, and the node analysis module sends the node execution value of the block chain node to the load balancing module after analyzing; the load balancing module marks the block chain link points with the node execution values larger than the average consumption value as the primary selection nodes; the load balancing module generates an access instruction corresponding to the initially selected node and sends the access instruction to the node counting module, and the node counting module receives and processes the access instruction corresponding to the initially selected node to obtain a block value of the initially selected node and sends the block value to the load balancing module; carrying out dequantization processing on the node execution value and the block value and taking the numerical value of the node execution value and the block value; acquiring a node kiss value of the obtained primary selected node by using a formula, selecting the primary selected node with the maximum node kiss value as a selected node of the transaction request, and executing the transaction request through the selected node; the method comprises the steps of carrying out dequantization processing on a memory occupation value and a CPU occupation value of a transaction request and analyzing to obtain an average consumption value, selecting a block chain node according to the average consumption value, then carrying out dequantization processing on the selected block chain node according to a node execution value and a block value to obtain a node kiss value of the block chain node, selecting a primary selected node with the largest node kiss value as a selected node of the transaction request, executing the transaction request through the selected node, and reasonably distributing the transaction request through a load balancing module, so that node resources in the whole block chain are efficiently used, breakdown of the single block chain node is avoided when the access pressure of the single block chain node is large, and meanwhile, the situation that avalanche occurs due to too large pressure in a block chain node cluster is also ensured.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (4)

1. A load balancing system among block chain nodes based on access pressure is characterized by comprising a data acquisition module, a server, a data analysis module, a load balancing module, a node acquisition module and a node analysis module;
the data acquisition module is used for acquiring the consumed resource information of the transaction request and sending the consumed resource information to the server; the data analysis module is used for acquiring consumption resource information stored in the server and analyzing the consumption resource information, and the specific analysis steps are as follows:
the method comprises the following steps: setting a transaction request as Pi, i =1, … …, n; setting the memory occupation value consumed by executing transaction request as NjPi(ii) a The CPU occupation value consumed by the execution of the transaction request is DjPi(ii) a j =1, … …, n; j represents the number of executions of the transaction request;
step two: carrying out dequantization processing on the memory occupation value and the CPU occupation value and taking the numerical values of the memory occupation value and the CPU occupation value;
using formulas
Figure DEST_PATH_IMAGE001
Obtaining the average consumption value Z of the transaction requestPi(ii) a Wherein, b1 and b2 are both preset proportionality coefficients;
step three: the data analysis module sends the average consumption value of the transaction request to a server for storage;
the load balancing module is used for carrying out load balancing adjustment on the transaction request, and the specific adjustment steps are as follows:
s1: the user sends a transaction request to the load balancing module through the client, and after receiving the transaction request, the load balancing module matches the transaction request with all transaction requests stored in the server to obtain an average consumption value Z of the corresponding transaction requestPa(ii) a a belongs to i, and simultaneously the load balancing module generates a node analysis instruction;
s2: the load balancing module sends the node analysis instruction to the node analysis module, and the node analysis module sends the node execution value of the block chain node to the load balancing module after analyzing;
s3: the load balancing module enables the node execution value to be larger than the average consumption value ZPaMarking the block chain link points as initial selection nodes; setting the initially selected node as Jk, wherein k is a positive integer;
s4: the load balancing module generates an access instruction corresponding to the initially selected node and sends the access instruction to the node counting module, and the node counting module receives and processes the access instruction corresponding to the initially selected node to obtain a block value of the initially selected node and sends the block value to the load balancing module; the specific processing steps of the node statistical module for processing the block value of the primarily selected node are as follows:
s41: acquiring equipment information of the primary selection node, setting all CPU models to be preset values, matching the CPU models in the equipment information with all the CPU models to obtain corresponding preset values, and marking as Y1Jk
S42: calculating the time difference between the purchase time in the equipment information and the current time of the system to obtain the purchase duration of the equipment and marking the purchase duration as T1JkThe unit is day;
s43: set the rated memory of the device to Y2Jk(ii) a The number of times of maintenance of the apparatus was Y3Jk(ii) a Carrying out dequantization processing on a preset value, purchase duration, rated memory and maintenance times and taking the numerical values of the dequantization processing;
s44: using formulas
Figure DEST_PATH_IMAGE002
Obtaining a block value Q of the primary selection nodeJk(ii) a Wherein b8, b9, b10 and b11 are all preset proportionality coefficients;
s5: marking the node execution value of the primary selection node as ZJk(ii) a Marking the block value of the primary selection node as QJk(ii) a Carrying out dequantization processing on the node execution value and the block value and taking the numerical value of the node execution value and the block value;
s6: using the formula FJk=ZJk×b3+QJkObtaining x b 4-mu to obtain the node kiss value F of the primary selected nodeJk(ii) a Wherein b3 and b4 are both preset proportionality coefficients, mu is an error correction factor, and the value is 2.3863;
s7: selecting the initial selection node with the maximum node kiss value as the selected node of the transaction request, and executing the transaction request through the selected node;
the node acquisition module is used for acquiring node information of the block chain nodes and sending the node information to the node analysis module; the node information comprises the residual memory value of the block chain node and the real-time residual utilization rate of the CPU; the node analysis module is used for receiving node information and analyzing the node information, and the specific analysis steps are as follows:
SS 1: after receiving the node analysis instruction, the node analysis module analyzes the node information and sets the residual memory value of the block chain node to be D1;
SS 2: counting the real-time residual utilization rate of the CPU, and setting the residual utilization rate to be Lm, wherein m =0 and … … 99; and the value range of Lm is (0, 1)]The number of occurrences of remaining usage is counted and labeled as ELm
SS 3: selecting the residual utilization rate with the largest occurrence frequency, and marking the residual utilization rate as Lb, wherein b belongs to m;
SS 4: summing the times of other residual utilization rates to obtain a total occurrence time EZ;
SS 5: dequantizing the residual memory value, the residual utilization rate and the residual utilization rate, and taking the values of the dequantization residual memory value, the residual utilization rate and the residual utilization rate, and obtaining a node execution value Z of the block chain node by using a formula Z = D1 × b5+ Lb × b6-EZ × b7+ lambda; b5, b6 and b7 are all preset proportionality coefficients, and lambda is a correction constant and takes the value of 1.32;
SS 6: and the node analysis module sends the node execution value to the load balancing module.
2. The system according to claim 1, wherein the consumed resource information is a resource consumed when a transaction request is executed, and the resource includes a memory usage value and a CPU usage value.
3. The system for balancing load among blockchain nodes based on access pressure according to claim 1, further comprising a registration login module, wherein the registration login module is configured to submit device information for registration by a user and send the successfully registered device information to the server for storage, and the server marks the device as a blockchain node after receiving the device information and marks a time when the device information is received as a registration time of the device; the equipment information comprises the position, the CPU model, the purchase time, the rated memory and the maintenance frequency of the equipment, and the equipment is a desktop computer or a notebook computer; the rated memory includes a rated capacity of the operating memory and a rated capacity of the hard disk memory.
4. The system according to claim 1, further comprising a storage allocation module, wherein the storage allocation module is configured to allocate and store the compacted data, and the specific allocation step is as follows:
v1: the user sends the stored data to the server through the client, and the server receives the stored data, compresses and encrypts the data to obtain the compressed data and sends the compressed data to the storage distribution module;
v2: setting the hard disk memory of the block chain node as G1: the remaining memory of the hard disk is marked as G4; carrying out distance calculation on the positions of the block chain nodes and the positions of the storage distribution modules to obtain a distance value, and marking the distance value as G2; calculating the time difference between the registration time of the block chain node and the current time of the system to obtain registration time length which is marked as G3;
v3: dequantizing the hard disk memory, the residual memory, the distance value and the registration duration, and taking the values of the dequantization processing, and obtaining a numerical distribution value GF of a block chain node by using a formula GF = G1 × c1+ G4 × c2+ G3 × c3+ (1/G2) × c 4; wherein c1, c2, c3 and c4 are all preset proportionality coefficients;
v4: and selecting the block chain node with the maximum matching value as a storage node of the compacted data, and sending the compacted data to the block chain node for storage by the storage allocation module.
CN202010721860.XA 2020-07-24 2020-07-24 Access pressure-based load balancing system among block chain nodes Active CN111600967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010721860.XA CN111600967B (en) 2020-07-24 2020-07-24 Access pressure-based load balancing system among block chain nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010721860.XA CN111600967B (en) 2020-07-24 2020-07-24 Access pressure-based load balancing system among block chain nodes

Publications (2)

Publication Number Publication Date
CN111600967A CN111600967A (en) 2020-08-28
CN111600967B true CN111600967B (en) 2020-11-06

Family

ID=72184572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010721860.XA Active CN111600967B (en) 2020-07-24 2020-07-24 Access pressure-based load balancing system among block chain nodes

Country Status (1)

Country Link
CN (1) CN111600967B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187656B (en) * 2020-09-30 2023-10-03 安徽极玩云科技有限公司 Management system of CDN node
CN112000977B (en) * 2020-11-02 2021-02-19 浙江微能科技有限公司 System for encrypting and keeping digital assets
CN112800137A (en) * 2021-02-01 2021-05-14 杭州复杂美科技有限公司 Data scanning method, computer device and storage medium
CN113034161B (en) * 2021-03-30 2022-08-23 深圳市沃客非凡科技有限公司 Commodity logistics tracing information acquisition system based on block chain
CN114884962B (en) * 2022-04-29 2024-03-26 蚂蚁区块链科技(上海)有限公司 Load balancing method and device and electronic equipment
CN116049908B (en) * 2023-04-03 2023-06-06 北京数力聚科技有限公司 Multi-party privacy calculation method and system based on blockchain
CN117034361A (en) * 2023-07-31 2023-11-10 广州承启医学检验有限公司 Gene detection and inspection laboratory information management method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413175A (en) * 2018-10-19 2019-03-01 北京奇艺世纪科技有限公司 A kind of information processing method, device and electronic equipment
US20190102423A1 (en) * 2017-09-29 2019-04-04 Oracle International Corporation System and method for providing an interface for a blockchain cloud service
CN110297712A (en) * 2019-05-20 2019-10-01 贵州联科卫信科技有限公司 A kind of ARIMA combination forecasting method towards block chain node load estimation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971684B (en) * 2019-11-28 2022-09-09 北京工业大学 PBFT-based block chain network node load balancing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190102423A1 (en) * 2017-09-29 2019-04-04 Oracle International Corporation System and method for providing an interface for a blockchain cloud service
CN109413175A (en) * 2018-10-19 2019-03-01 北京奇艺世纪科技有限公司 A kind of information processing method, device and electronic equipment
CN110297712A (en) * 2019-05-20 2019-10-01 贵州联科卫信科技有限公司 A kind of ARIMA combination forecasting method towards block chain node load estimation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《网络安全态势感知综述》;常镒恒、马照瑞等;《网络空间安全》;20191225;全文 *

Also Published As

Publication number Publication date
CN111600967A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN111600967B (en) Access pressure-based load balancing system among block chain nodes
CN109218355B (en) Load balancing engine, client, distributed computing system and load balancing method
CN106411774A (en) Method and device for controlling transaction data volume
CN111682962B (en) Power data network fault recovery method, system and storage medium
CN109981744B (en) Data distribution method and device, storage medium and electronic equipment
CN111246586A (en) Method and system for distributing smart grid resources based on genetic algorithm
CN110297698B (en) Multi-priority dynamic current limiting method, device, server and storage medium
CN104092756A (en) Cloud storage system resource dynamic allocation method based on DHT mechanism
US20150109915A1 (en) Network traffic management
CN114640700B (en) Calling frequency control method and device
CN113692058A (en) Spectrum resource evaluation set-based satellite optical network spectrum allocation method and system
CN109347982A (en) A kind of dispatching method and device of data center
CN102340437A (en) Network fault tolerance method and device
US20200314019A1 (en) Managing bandwidth based on user behavior
CN106294445B (en) The method and device of data storage based on across computer room Hadoop cluster
CN108200185B (en) Method and device for realizing load balance
CN114338683A (en) Scheduling request processing method and device, storage medium and electronic equipment
CN113891336A (en) Communication network frequency-reducing network-quitting method and device, computer equipment and storage medium
US10057803B2 (en) Wi-Fi adoption index
CN114448838A (en) System reliability evaluation method
CN115080197A (en) Computing task scheduling method and device, electronic equipment and storage medium
CN110147278A (en) Data processing method and device
US20210329064A1 (en) Parametric Parsing Based Routing System in Content Delivery Networks
CN114390006B (en) Data packet transmission method, device, equipment and storage medium
CN110868304A (en) PCC strategy issuing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200828

Assignee: Nanjing Jiangbei new area Yangzi Technology Finance Leasing Co.,Ltd.

Assignor: JIANGSU RONGZER INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021320000067

Denomination of invention: A load balancing system between blockchain nodes based on access pressure

Granted publication date: 20201106

License type: Exclusive License

Record date: 20210805

EE01 Entry into force of recordation of patent licensing contract
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A load balancing system between blockchain nodes based on access pressure

Effective date of registration: 20210811

Granted publication date: 20201106

Pledgee: Nanjing Jiangbei new area green Financing Guarantee Co.,Ltd.

Pledgor: JIANGSU RONGZER INFORMATION TECHNOLOGY Co.,Ltd.

Registration number: Y2021320000168

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220905

Granted publication date: 20201106

Pledgee: Nanjing Jiangbei new area green Financing Guarantee Co.,Ltd.

Pledgor: JIANGSU RONGZER INFORMATION TECHNOLOGY CO.,LTD.

Registration number: Y2021320000168

EC01 Cancellation of recordation of patent licensing contract
EC01 Cancellation of recordation of patent licensing contract

Assignee: Nanjing Jiangbei new area Yangzi Technology Finance Leasing Co.,Ltd.

Assignor: JIANGSU RONGZER INFORMATION TECHNOLOGY CO.,LTD.

Contract record no.: X2021320000067

Date of cancellation: 20220921