CN114036235A - Block chain system and method for block chain system - Google Patents

Block chain system and method for block chain system Download PDF

Info

Publication number
CN114036235A
CN114036235A CN202111355932.4A CN202111355932A CN114036235A CN 114036235 A CN114036235 A CN 114036235A CN 202111355932 A CN202111355932 A CN 202111355932A CN 114036235 A CN114036235 A CN 114036235A
Authority
CN
China
Prior art keywords
node
execution
storage
execution node
state information
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.)
Pending
Application number
CN202111355932.4A
Other languages
Chinese (zh)
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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN202111355932.4A priority Critical patent/CN114036235A/en
Publication of CN114036235A publication Critical patent/CN114036235A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • 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 present disclosure relates to a blockchain system and a method for the blockchain system, the system includes a node configuration end and a plurality of peer nodes, wherein at least one of the peer nodes is composed of a plurality of execution nodes, and each execution node is respectively configured to realize partial functions of the peer node; and the node configuration end is used for acquiring the state information of each execution node and adding the execution node or stopping the execution node when the state information meets the preset condition. The technical scheme can add or stop the execution node according to the state of the execution node, thereby playing the effect of dynamically adjusting the resources of the peer node. By dynamically allocating the resources of the peer-to-peer nodes, the performance of the peer-to-peer nodes can be optimized, and the adaptability of the peer-to-peer nodes to different application scenes is improved.

Description

Block chain system and method for block chain system
Technical Field
The present disclosure relates to the field of blockchain technology, and in particular, to a blockchain system and a method for the same.
Background
Blockchain technology is a technology that can collectively maintain a reliable database through decentralized and distrust. In the block chain network, even nodes which are not trusted with each other can conveniently verify data, and a certain consensus mechanism is relied on to achieve consistency. Therefore, the blockchain technology can obviously reduce trust cost among multiple nodes, and has wide application scenes and application values in cross-border payment, credential business and financial fields.
The performance problems of blockchains are also becoming increasingly prominent behind widespread applications. In some scenarios, the performance of blockchain nodes may not meet the application requirements.
Disclosure of Invention
The present disclosure is directed to a blockchain system and a method for the same, which solve the above-mentioned problems.
To achieve the above object, according to a first aspect of the embodiments of the present disclosure, there is provided a block chain system comprising a node configuration end and a plurality of peer nodes, wherein,
at least one of the peer nodes is composed of a plurality of executing nodes, and each executing node is respectively configured to realize partial functions of the peer node;
and the node configuration end is used for acquiring the state information of each execution node and adding the execution node or stopping the execution node when the state information meets the preset condition.
Optionally, the plurality of executing nodes include a storage executing node and a computation executing node, the storage executing node is configured to implement a data storage function of the peer node, and the computation executing node is configured to implement a data computation function of the peer node.
Optionally, the node configuration end is specifically configured to,
when the state information represents that the calculation execution node is in fault, adding a calculation execution node;
when the state information represents that the storage execution node fails, copying the data of the storage execution node to backup equipment, and adding a new storage execution node based on the backup equipment.
Optionally, the node configuration end is specifically configured to, when acquiring state information of each execution node, acquire storage state information of the storage execution node and acquire operation state information of the computation execution node;
wherein the storage state information comprises one or more of storage capacity, remaining storage space, input/output performance parameters; the operating state information includes one or more of response duration, central processor occupancy, memory occupancy, throughput, transaction success rate, transaction concurrency number.
Optionally, the node configuration end is further specifically configured to calculate a load description value of the computation execution node according to the running state information, and,
when the load description value is larger than a first load threshold value, newly adding one or more computing execution nodes;
deactivating one or more compute execution nodes when the load description value is less than a second load threshold, wherein the second load threshold is less than the first load threshold.
Optionally, the node configuration end is further specifically configured to initiate a storage capacity expansion request when the storage state information indicates that the storage capacity of the storage execution node is smaller than a capacity threshold, where the storage capacity expansion request is used to expand the storage capacity of the storage execution node.
Optionally, the node configuration end is further configured to obtain meta-information of the plurality of execution nodes, where the meta-information includes storage association relationships between the computation execution nodes and the storage execution nodes,
the node configuration end is further specifically configured to add an execution node according to the storage association relationship between the computation execution node and the storage execution node.
Optionally, the computing execution nodes include one or more of an endorsement execution node, a data pull execution node, and an accounting execution node;
the endorsement execution node is used for realizing the endorsement function of the peer node;
the data pulling execution node is used for acquiring block data from a sorting node in a block chain network;
the accounting execution node is used for verifying transaction data in the block data;
the storage execution node is specifically configured to store block data.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for a blockchain system, which is applied to the blockchain system of any one of the above first aspects, the method including:
the node configuration end acquires the state information of each execution node; and the number of the first and second electrodes,
and when the state information meets the preset condition, adding an execution node or stopping the execution node.
Optionally, the obtaining the state information of each execution node includes:
acquiring storage state information of the storage execution node and running state information of the calculation execution node;
when the state information meets the preset condition, adding an execution node or stopping the execution node, including:
calculating a load description value of the calculation execution node according to the running state information;
when the load description value is larger than a first load threshold value, newly adding one or more computing execution nodes;
deactivating one or more compute execution nodes when the load description value is less than a second load threshold;
wherein the storage state information comprises one or more of storage capacity, remaining storage space, input/output performance parameters; the operation state information comprises one or more of response time length, central processor occupancy, memory occupancy, throughput, transaction success rate and transaction concurrency number, and the second load threshold is smaller than the first load threshold.
In the above technical solution, a peer node is composed of a plurality of executing nodes, and each executing node is configured to implement a part of functions of the peer node, such as a computing function, a storage function, and the like. Therefore, the node configuration end can monitor the state information of each execution node and further adjust the execution nodes. For example, when the load of the initial execution node is high, an execution node may be added to process data, thereby reducing the load of the initial execution node. That is to say, the above technical solution can add an executing node or stop the executing node according to the state of the executing node, thereby playing the effect of dynamically adjusting the resources of the peer node. By dynamically allocating the resources of the peer-to-peer nodes, the performance of the peer-to-peer nodes can be optimized, and the adaptability of the peer-to-peer nodes to different application scenes is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is a block diagram of a blockchain system shown in an exemplary embodiment of the present disclosure.
Fig. 2 is a block diagram of a peer node 1 shown in an exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating a node configuring end configuration executing node according to an exemplary embodiment of the disclosure.
Fig. 4 is a flowchart illustrating a method for a blockchain system according to an exemplary embodiment of the present disclosure.
Fig. 5 is a flow chart illustrating a method for a blockchain system in an exemplary embodiment of the present disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a block diagram of a blockchain system shown in the present disclosure, which includes a plurality of peer nodes (fig. 1 is illustrated with two peer nodes), with reference to fig. 1. Wherein one or more of the peer nodes is formed by a plurality of executing nodes, each of which is configured to implement a part of the functions of the peer node.
For example, in some scenarios, the execution node may employ a microservice architecture. By dividing the functions of the peer nodes, microservices corresponding to the respective peer node functions may be configured. Wherein, each function of the peer node can be correspondingly provided with one or more microservices.
Fig. 2 is a block diagram of a peer node 1 shown in the present disclosure, and in one possible embodiment, a plurality of execution nodes of the peer node 1 include a storage execution node and a computation execution node. In fig. 2, the storage executing node includes an executing node 3 and an executing node 4, which are used to implement data storage functions of the peer node, such as blockchain ledger data storage, blockchain state data storage, blockchain transaction data storage, blockchain history data storage, and the like. The computing execution nodes comprise an execution node 1 and an execution node 2, and are used for realizing the data computing function of the peer-to-peer node.
Regarding the computation execution node, the computation execution node may be a stateless node, that is, multiple computation execution nodes included in the same peer node may run in the same execution device or migrate between different execution devices. In some implementations, the computing execution nodes include one or more endorsement execution nodes to implement an endorsement function of the peer node.
In some implementations, the compute execution nodes include one or more data pull execution nodes to obtain the tile data from a sorting node in a blockchain network.
In some implementations, the computing execution nodes include one or more accounting execution nodes to verify transactional data in the block data.
Of course, in some implementation scenarios, the computing execution nodes may also include multiple ones of the endorsement execution nodes, data pull execution nodes, and accounting execution nodes described above. In addition, other execution nodes for executing the function may be divided according to other functions of the peer node. For example, in some implementation scenarios, an information forwarding execution node may be further obtained by dividing, where the information forwarding execution node is configured to forward a received request to an execution node corresponding to the request (for example, forward an endorsement request to an endorsement execution node), and the present disclosure does not specifically limit the type and function of the execution node.
Furthermore, the storage executing node may be specifically configured to store block data, for example. For example, after verifying the transaction data in the block, the accounting execution node may send the verified data to the storage execution node, and then the data is stored by the storage execution node. Referring to fig. 2, in some possible implementation scenarios, the storage execution node may also interact with the computation execution node to store data generated by the computation execution node.
The block chain system further comprises a node configuration end, and the node configuration end can be arranged in one-to-one correspondence with the peer nodes. For example, in fig. 1, a peer node 1 is provided with a node configuration end 1, and a peer node 2 is provided with a node configuration end 2. In some embodiments, the node configuration end may also be configured corresponding to multiple peer nodes, for example, the node configuration end 1 may correspond to both peer node 1 and peer node 2.
The node configuration end can be used for acquiring the state information of each execution node, and adding the execution node or stopping the execution node when the state information meets the preset condition.
For example, in one possible embodiment, the node configuration side is specifically configured to,
and when the state information represents that the calculation execution node is in fault, adding a calculation execution node. When the state information represents that the storage execution node fails, copying the data of the storage execution node to backup equipment, and adding a new storage execution node based on the backup equipment.
Illustratively, heartbeat detection can be maintained between the node configuration end and each execution node. In this case, the status information may be, for example, a heartbeat response of the executing node. When the node configuration end does not receive the heartbeat response of the computation execution node within the preset time length, the failure of the computation execution node can be determined. In this case, the node configuration side may instantiate a new compute execution node, which may be implemented, for example, in the manner of a mount container.
When the node configuration end does not receive the heartbeat response of the storage execution node within the preset time length, the failure of the storage execution node can be determined. In this case, if the storage medium of the storage execution node is not damaged, the data in the storage medium may be copied to another device, and then a new storage execution node is newly instantiated in the device.
It should be noted that, in some implementation scenarios, the node configuration end may restart the execution node before adding the execution node. When the number of rebooting times exceeds the threshold number (e.g. 3 times), and the executing node is still in the failure state, the node configuring end may add the executing node.
In the above technical solution, a peer node is composed of a plurality of executing nodes, and each executing node is configured to implement a part of functions of the peer node, such as a computing function, a storage function, and the like. Therefore, the node configuration end can monitor the state information of each execution node and further adjust the execution nodes. For example, when the load of the initial execution node is high, an execution node may be added to process data, thereby reducing the load of the initial execution node. That is to say, the above technical solution can add an executing node or stop the executing node according to the state of the executing node, thereby playing the effect of dynamically adjusting the resources of the peer node. By dynamically allocating the resources of the peer-to-peer nodes, the performance of the peer-to-peer nodes can be optimized, and the adaptability of the peer-to-peer nodes to different application scenes is improved.
In a possible implementation manner, the node configuration end is specifically configured to, when obtaining the state information of each execution node, obtain the storage state information of the storage execution node and obtain the operation state information of the computation execution node.
Wherein the storage state information comprises one or more of storage capacity, remaining storage space, input/output performance parameters. The operating state information includes one or more of response duration, central processor occupancy, memory occupancy, throughput, transaction success rate, transaction concurrency number.
The node configuration end is further specifically configured to calculate a load description value of the computation execution node according to the running state information. And when the load description value is larger than the first load threshold value, one or more calculation execution nodes are newly added. Deactivating one or more compute execution nodes when the load description value is less than a second load threshold. Wherein the second load threshold is less than the first load threshold.
Fig. 3 is a flowchart illustrating a node configuration end configuring an execution node, where the node configuration end may obtain a response duration, a central processing unit occupancy, a memory occupancy, a throughput, a transaction success rate, and a transaction concurrency number of the execution node, and input the obtained parameters to an input layer. The input layer is used for receiving the running state information of the execution node and carrying out algorithm model mapping so as to convert the running state information into parameters required by the decision layer.
For example, in one possible embodiment, each of the parameters may be transformed as follows:
x1=(1-c)×100 (1)
x2=(1-α)×100 (2)
Figure BDA0003357077130000081
Figure BDA0003357077130000082
Figure BDA0003357077130000083
x6=δ (6)
wherein c is the CPU occupancy, x1Is the conversion value of Central Processing Unit (CPU), alpha is the memory occupancy, x2Is the converted value of the memory occupancy, t is the response time length, x3For the converted value of the response duration, beta is the throughput, x4For the converted value of the throughput,
Figure BDA0003357077130000085
for trade success rate, x5Conversion value for transaction success rate, delta is transaction concurrency number, x6A conversion value for transaction concurrency.
In the decision layer, x can be obtained based on1To x6The state of the executing node is analyzed. For example, in some embodiments, the decision layer may employ a linear regression algorithm to implement the decision analysis. The calculation formula is as follows:
lnf(x)=w1x1+w2x2+w3x3+w4x4+w5x5+w5x5+b (6)
Figure BDA0003357077130000084
thus, the optimal values of w and b can be obtained by the least square method.
Wherein the content of the first and second substances,
Figure BDA0003357077130000091
note that E (w, b) is a convex function with respect to (w, b), and therefore, there is a minimum value. That is, when the derivatives of E (w, b) with respect to w, b are both zero, an optimal solution for w and b can be obtained, which is calculated as follows:
Figure BDA0003357077130000092
Figure BDA0003357077130000093
thus, the optimal values of w and b can be calculated by the equations (9) and (10), and the mapping relationship of f (x) can be obtained. In the case of obtaining the mapping relationship of f (x), the mapping relationship can be based on the input parameter x1To x6Calculate the value of f (x), and transmit this data to the output layer.
In the output layer, for example, the sigmoid function may be used to convert the value range of f (x) into the interval of (0,1), so as to obtain the load description value Q (f (x)):
Figure BDA0003357077130000094
in this way, the load threshold may be set according to application requirements, thereby configuring the executing node. For example, in some scenarios, S may be defined as an output control command whose state is: when S is equal to-1, the executing node is deactivated, when S is equal to 1, the executing node is newly added, and when S is equal to 0, the executing node state is maintained.
Wherein, the corresponding relation between S and Q (f (x)) is as follows:
Figure BDA0003357077130000095
in a possible implementation manner, the node configuration end may be further configured to obtain meta-information of the multiple execution nodes, where the meta-information includes storage association relationships between the computation execution nodes and the storage execution nodes.
Illustratively, the executing nodes comprised by the respective peer nodes may be assigned identification tags. Taking fig. 1 as an example, the execution nodes 1 to 4 of the peer node 1 may be assigned an identification tag peer 1. Thus, the execution nodes 1 to 4 can recognize each other by the identification tag peer 1. After the computation execution node of the peer node 1 identifies the storage execution node of the peer node 1, the storage of data may be performed by the storage execution node. In this way, the association relationship between the computation execution node and the storage execution node can be established. Of course, the node configuration end may also identify the executing node of each peer node through the identification tag. For example, after acquiring the state information of the multiple executing nodes, the node configuration end may filter and aggregate the state information of the multiple executing nodes of the same peer node according to the identification tag, so as to facilitate analysis processing. Furthermore, in some implementation scenarios, the meta-information of the execution node may also include the node name, the number of execution nodes, the physical host address of the execution node, and so on.
In this case, the node configuration end is further specifically configured to add an execution node according to the storage association relationship between the calculation execution node and the storage execution node.
By adopting the technical scheme, the node configuration end can acquire the CPU occupancy rate, the memory occupancy rate, the response duration, the throughput rate, the transaction success rate, the transaction concurrency number and other running state information of the execution node, and calculate the load description value of the execution node according to the acquired state information. When the load description value is greater than the first load threshold value, it may be determined that the load of the execution node is higher, and at this time, one or more computation execution nodes may be newly added to reduce the load of the execution node. When the load description value is smaller than the second load threshold value, it may be determined that the load of the execution node is low, and at this time, one or more computation execution nodes may be deactivated, so as to recycle resources and improve resource utilization. Therefore, the performance of the peer node can be optimized and the adaptability of the peer node to different application scenes can be improved by dynamically allocating the resources of the peer node.
In addition, the storage capacity of the storage executing node can be adjusted according to the storage state information of the storage executing node. For example, in some implementation scenarios, the node configuration end is further specifically configured to initiate a storage capacity expansion request when the storage state information indicates that the storage capacity of the storage execution node is smaller than a capacity threshold, where the storage capacity expansion request is used to expand the storage capacity of the storage execution node.
For example, the node configuration end may detect parameters such as a total storage space and a remaining storage space of the storage execution node, and set a threshold interval for each parameter. And when a certain parameter exceeds the threshold interval of the parameter, initiating a storage capacity expansion request. The set threshold interval may be greater than 10G of disk remaining space, the disk occupancy rate is less than 80%, and the like, which is not limited by the present disclosure. When the storage execution node is expanded, for example, a distributed file storage technology may be used to implement dynamic expansion of storage.
Based on the same inventive concept, the present disclosure also provides a method for a blockchain system, which is applied to the blockchain system provided by the present disclosure. Fig. 4 is a flow chart of a method for a blockchain system, as shown in fig. 4, illustrated by the present disclosure, the method comprising:
and S41, the node configuration end acquires the state information of each execution node.
And S42, adding an execution node or stopping the execution node when the state information meets the preset condition.
For example, in a possible implementation manner, the node configuration end may add a new calculation execution node when the state information represents that the calculation execution node is failed. When the state information represents that the storage execution node fails, copying the data of the storage execution node to backup equipment, and adding a new storage execution node based on the backup equipment.
Illustratively, heartbeat detection can be maintained between the node configuration end and each execution node. In this case, the status information may be, for example, a heartbeat response of the executing node. When the node configuration end does not receive the heartbeat response of the computation execution node within the preset time length, the failure of the computation execution node can be determined. In this case, the node configuration side may instantiate a new compute execution node, which may be implemented, for example, in the manner of a mount container.
When the node configuration end does not receive the heartbeat response of the storage execution node within the preset time length, the failure of the storage execution node can be determined. In this case, if the storage medium of the storage execution node is not damaged, the data in the storage medium may be copied to another device, and then a new storage execution node is newly instantiated in the device.
It should be noted that, in some implementation scenarios, the node configuration end may restart the execution node before adding the execution node. When the number of rebooting times exceeds the threshold number (e.g. 3 times), and the executing node is still in the failure state, the node configuring end may add the executing node.
In the above technical solution, a peer node is composed of a plurality of executing nodes, and each executing node is configured to implement a part of functions of the peer node, such as a computing function, a storage function, and the like. Therefore, the node configuration end can monitor the state information of each execution node and further adjust the execution nodes. For example, when the load of the initial execution node is high, an execution node may be added to process data, thereby reducing the load of the initial execution node. That is to say, the above technical solution can add an executing node or stop the executing node according to the state of the executing node, thereby playing the effect of dynamically adjusting the resources of the peer node. By dynamically allocating the resources of the peer-to-peer nodes, the performance of the peer-to-peer nodes can be optimized, and the adaptability of the peer-to-peer nodes to different application scenes is improved.
Fig. 5 is a flowchart of a method for a blockchain system, which is applied to the blockchain system provided in the present disclosure, and includes:
and S51, the node configuration end acquires the storage state information of the storage execution node and the running state information of the calculation execution node.
And S52, the node configuration end calculates the load description value of the calculation execution node according to the running state information.
S53, when the load description value is larger than the first load threshold value, the node configuration end adds one or more calculation execution nodes.
And S54, the node configuration end deactivates one or more calculation execution nodes when the load description value is less than the second load threshold value.
Wherein the storage state information comprises one or more of storage capacity, remaining storage space, input/output performance parameters; the operation state information comprises one or more of response time length, central processor occupancy, memory occupancy, throughput, transaction success rate and transaction concurrency number, and the second load threshold is smaller than the first load threshold.
Referring to fig. 3, the node configuration end may obtain a response duration of the execution node, a central processing unit occupancy, a memory occupancy, a throughput, a transaction success rate, and a transaction concurrency number, and input the obtained parameters to the input layer. The input layer is used for receiving the running state information of the execution node and carrying out algorithm model mapping so as to convert the running state information into parameters required by the decision layer. In a possible embodiment, each of the parameters may be transformed as follows:
x1=(1-c)×100 (1)
x2=(1-α)×100 (2)
Figure BDA0003357077130000131
Figure BDA0003357077130000132
Figure BDA0003357077130000133
x6=δ (6)
wherein c is the CPU occupancy, x1Is the conversion value of Central Processing Unit (CPU), alpha is the memory occupancy, x2Is the converted value of the memory occupancy, t is the response time length, x3For the converted value of the response duration, beta is the throughput, x4For the converted value of the throughput,
Figure BDA0003357077130000134
for trade success rate, x5Conversion value for transaction success rate, delta is transaction concurrency number, x6A conversion value for transaction concurrency.
In the decision layer, x can be obtained based on1To x6The state of the executing node is analyzed. For example, in some embodiments, the decision layer may employ a linear regression algorithm to implement the decision analysis. The calculation formula is as follows:
lnf(x)=w1x1+w2x2+w3x3+w4x4+w5x5+w5x5+b (6)
Figure BDA0003357077130000141
thus, the optimal values of w and b can be obtained by the least square method.
Figure BDA0003357077130000142
Where E (w, b) is a convex function with respect to (w, b), there is a minimum. That is, when the derivatives of E (w, b) with respect to w, b are both zero, an optimal solution for w and b can be obtained, which is calculated as follows:
Figure BDA0003357077130000143
Figure BDA0003357077130000144
thus, the optimal values of w and b can be calculated by the equations (9) and (10), and the mapping relationship of f (x) can be obtained. In the case of obtaining the mapping relationship of f (x), the mapping relationship can be based on the input parameter x1To x6Calculate the value of f (x), and transmit this data to the output layer.
In the output layer, for example, the sigmoid function may be used to convert the value range of f (x) into the interval of (0,1), so as to obtain the load description value Q (f (x)):
Figure BDA0003357077130000145
in this way, the load threshold may be set according to application requirements, thereby configuring the executing node. For example, in some scenarios, S may be defined as an output control command whose state is: when S is equal to-1, the executing node is deactivated, when S is equal to 1, the executing node is newly added, and when S is equal to 0, the executing node state is maintained.
Wherein, the corresponding relation between S and Q (f (x)) is as follows:
Figure BDA0003357077130000146
in a possible implementation manner, the node configuration end may be further configured to obtain meta-information of the multiple execution nodes, where the meta-information includes storage association relationships between the computation execution nodes and the storage execution nodes.
Illustratively, the executing nodes comprised by the respective peer nodes may be assigned identification tags. Taking fig. 1 as an example, the execution nodes 1 to 4 of the peer node 1 may be assigned an identification tag peer 1. Thus, the execution nodes 1 to 4 can recognize each other by the identification tag peer 1. After the computation execution node of the peer node 1 identifies the storage execution node of the peer node 1, the storage of data may be performed by the storage execution node. In this way, the association relationship between the computation execution node and the storage execution node can be established. Of course, the node configuration end may also identify the executing node of each peer node through the identification tag. For example, after acquiring the state information of the multiple executing nodes, the node configuration end may filter and aggregate the state information of the multiple executing nodes of the same peer node according to the identification tag, so as to facilitate analysis processing. Furthermore, in some implementation scenarios, the meta-information of the execution node may also include the node name, the number of execution nodes, the physical host address of the execution node, and so on.
In this case, the node configuration end is further specifically configured to add an execution node according to the storage association relationship between the calculation execution node and the storage execution node.
By adopting the technical scheme, the node configuration end can acquire the CPU occupancy rate, the memory occupancy rate, the response duration, the throughput rate, the transaction success rate, the transaction concurrency number and other running state information of the execution node, and calculate the load description value of the execution node according to the acquired state information. When the load description value is greater than the first load threshold value, it may be determined that the load of the execution node is higher, and at this time, one or more computation execution nodes may be newly added to reduce the load of the execution node. When the load description value is smaller than the second load threshold value, it may be determined that the load of the execution node is low, and at this time, one or more computation execution nodes may be deactivated, so as to recycle resources and improve resource utilization. Therefore, the performance of the peer node can be optimized and the adaptability of the peer node to different application scenes can be improved by dynamically allocating the resources of the peer node.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned method for a blockchain system when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A block chain system comprises a node configuration end and a plurality of peer nodes, wherein,
at least one of the peer nodes is composed of a plurality of executing nodes, and each executing node is respectively configured to realize partial functions of the peer node;
and the node configuration end is used for acquiring the state information of each execution node and adding the execution node or stopping the execution node when the state information meets the preset condition.
2. The blockchain system of claim 1, wherein the plurality of execution nodes includes a storage execution node for implementing a data storage function of the peer node and a computation execution node for implementing a data computation function of the peer node.
3. The blockchain system of claim 2, wherein the node allocation terminal is specifically configured to,
when the state information represents that the calculation execution node is in fault, adding a calculation execution node;
when the state information represents that the storage execution node fails, copying the data of the storage execution node to backup equipment, and adding a new storage execution node based on the backup equipment.
4. The blockchain system according to claim 2, wherein the node configuration end is specifically configured to, when obtaining the state information of each execution node, obtain the storage state information of the storage execution node and obtain the running state information of the computation execution node;
wherein the storage state information comprises one or more of storage capacity, remaining storage space, input/output performance parameters; the operating state information includes one or more of response duration, central processor occupancy, memory occupancy, throughput, transaction success rate, transaction concurrency number.
5. The blockchain system of claim 4, wherein the node configuration end is further configured to calculate a load description value of the computation execution node according to the running state information, and,
when the load description value is larger than a first load threshold value, newly adding one or more computing execution nodes;
deactivating one or more compute execution nodes when the load description value is less than a second load threshold, wherein the second load threshold is less than the first load threshold.
6. The blockchain system of claim 4, wherein the node configuration end is further configured to initiate a storage capacity expansion request when the storage state information indicates that the storage capacity of the storage execution node is smaller than a capacity threshold, where the storage capacity expansion request is used to expand the storage capacity of the storage execution node.
7. The blockchain system according to claim 3 or 5, wherein the node configuration end is further configured to obtain meta-information of the plurality of execution nodes, the meta-information including storage association relationship between the computation execution node and the storage execution node,
the node configuration end is further specifically configured to add an execution node according to the storage association relationship between the computation execution node and the storage execution node.
8. The blockchain system of any one of claims 2 to 6, wherein the computing execution nodes include one or more of an endorsement execution node, a data pull execution node, an accounting execution node;
the endorsement execution node is used for realizing the endorsement function of the peer node;
the data pulling execution node is used for acquiring block data from a sorting node in a block chain network;
the accounting execution node is used for verifying transaction data in the block data;
the storage execution node is specifically configured to store block data.
9. A method for a blockchain system, applied to the blockchain system of any one of claims 1 to 8, the method comprising:
the node configuration end acquires the state information of each execution node; and the number of the first and second electrodes,
and when the state information meets the preset condition, adding an execution node or stopping the execution node.
10. The method of claim 9, wherein the plurality of executing nodes include a storage executing node and a computation executing node, and wherein obtaining the status information of each executing node comprises:
acquiring storage state information of the storage execution node and running state information of the calculation execution node;
when the state information meets the preset condition, adding an execution node or stopping the execution node, including:
calculating a load description value of the calculation execution node according to the running state information;
when the load description value is larger than a first load threshold value, newly adding one or more computing execution nodes;
deactivating one or more compute execution nodes when the load description value is less than a second load threshold;
wherein the storage state information comprises one or more of storage capacity, remaining storage space, input/output performance parameters; the operation state information comprises one or more of response time length, central processor occupancy, memory occupancy, throughput, transaction success rate and transaction concurrency number, and the second load threshold is smaller than the first load threshold.
CN202111355932.4A 2021-11-16 2021-11-16 Block chain system and method for block chain system Pending CN114036235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111355932.4A CN114036235A (en) 2021-11-16 2021-11-16 Block chain system and method for block chain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111355932.4A CN114036235A (en) 2021-11-16 2021-11-16 Block chain system and method for block chain system

Publications (1)

Publication Number Publication Date
CN114036235A true CN114036235A (en) 2022-02-11

Family

ID=80144651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111355932.4A Pending CN114036235A (en) 2021-11-16 2021-11-16 Block chain system and method for block chain system

Country Status (1)

Country Link
CN (1) CN114036235A (en)

Similar Documents

Publication Publication Date Title
US7574620B2 (en) Method for operating an arrangement of a plurality of computers in the event of a computer failure
CN111818159B (en) Management method, device, equipment and storage medium of data processing node
US7937704B2 (en) Distributed computer
CN112261135A (en) Node election method, system, device and equipment based on consistency protocol
US11922059B2 (en) Method and device for distributed data storage
US10558547B2 (en) Methods for proactive prediction of disk failure in a RAID group and devices thereof
CN112671928A (en) Equipment centralized management architecture, load balancing method, electronic equipment and storage medium
CN111652728A (en) Transaction processing method and device
CN113132176B (en) Method for controlling edge node, node and edge computing system
US8719622B2 (en) Recording and preventing crash in an appliance
CN111211993A (en) Incremental persistence method and device for streaming computation
US9349012B2 (en) Distributed processing system, distributed processing method and computer-readable recording medium
CN114036235A (en) Block chain system and method for block chain system
CN115361295B (en) TOPSIS-based resource backup method, device, equipment and medium
CN113342893B (en) Node synchronization method and device based on block chain, storage medium and server
US10268375B2 (en) Methods for proactive prediction of disk failure in the disk maintenance pipeline and devices thereof
CN113946376A (en) Load adjustment method and device, electronic equipment and storage medium
CN114036234A (en) Block chain data storage system and method
CN115878309A (en) Resource allocation method, device, processing core, equipment and computer readable medium
CN109614242B (en) Computing capacity sharing method, device, equipment and medium
CN113190347A (en) Edge cloud system and task management method
US20080125878A1 (en) Method and system to detect application non-conformance
CN111475306B (en) Micro service node, asynchronous task processing method, system and storage medium
US20110185007A1 (en) Distributed processing system, distributed operation method and computer program
CN116528300B (en) Task issuing method, device, system and communication equipment

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