CN111459676A - Node resource management method, device and storage medium - Google Patents

Node resource management method, device and storage medium Download PDF

Info

Publication number
CN111459676A
CN111459676A CN202010245564.7A CN202010245564A CN111459676A CN 111459676 A CN111459676 A CN 111459676A CN 202010245564 A CN202010245564 A CN 202010245564A CN 111459676 A CN111459676 A CN 111459676A
Authority
CN
China
Prior art keywords
node
resource
blockchain
configuration data
block chain
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.)
Granted
Application number
CN202010245564.7A
Other languages
Chinese (zh)
Other versions
CN111459676B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010245564.7A priority Critical patent/CN111459676B/en
Publication of CN111459676A publication Critical patent/CN111459676A/en
Application granted granted Critical
Publication of CN111459676B publication Critical patent/CN111459676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a node resource management method, a device and a storage medium, wherein the method can be applied to a block chain management platform and comprises the following steps: responding to a block link point configuration request sent by a user terminal, and outputting a node configuration page through the user terminal; receiving parameter and block chain identification resource allocation data which are sent by a user terminal and comprise at least one allocation item, wherein the resource allocation data are set through a node allocation page; and determining at least one node associated with the target block chain indicated by the block chain identification from the plurality of nodes to send the resource configuration data, so that each node in the at least one node replaces the original configuration data in the resource configuration file by using the resource configuration data, and restarting a block chain process corresponding to the target block chain to complete the reconfiguration of the resource. By adopting the invention, the management efficiency of the node resources can be improved, and the flexible configuration of the node resources is realized.

Description

Node resource management method, device and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a node resource management method, an apparatus, and a storage medium.
Background
A blockchain network is typically made up of a plurality of nodes. A blockchain process executed by one or more nodes in the blockchain network needs to occupy corresponding resources, such as memory resources. When the resource configuration of the corresponding node needs to be changed, the node needs to be logged in and a corresponding configuration file is found, then the resource configuration of the node is changed, and the block chain is restarted. However, in this process, restarting the blockchain requires modifying and starting all the nodes corresponding to the blockchain one by one, which reduces the management efficiency of the node resources.
Disclosure of Invention
Embodiments of the present invention provide a node resource management method, apparatus, and storage medium, which can improve the management efficiency of node resources and implement flexible configuration of node resources.
In a first aspect, an embodiment of the present invention provides a node resource management method, which is applied to a blockchain management platform, where the blockchain management platform is used to perform resource management on multiple nodes included in a blockchain network, and the method includes:
responding to a block link point configuration request sent by a user terminal, and outputting a node configuration page through the user terminal;
receiving resource configuration data sent by the user terminal, wherein the resource configuration data is set by a user through the node configuration page, the resource configuration data comprises parameters of at least one configuration item and a block chain identifier, and each configuration item is used for correspondingly configuring a resource;
determining at least one node associated with a target blockchain indicated by the blockchain identification from the plurality of nodes;
and sending the resource configuration data to the at least one node, so that each node in the at least one node replaces original configuration data in a resource configuration file by using the resource configuration data, and restarts a block chain process corresponding to the target block chain to complete resource reconfiguration, wherein the resource configuration file stores the original configuration data of the resources required by the block chain process corresponding to the target block chain.
In a second aspect, an embodiment of the present invention further provides a node resource management method, which is applied to a node of a block chain network, and the method includes:
receiving resource allocation data sent by a blockchain management platform, wherein the resource allocation data is set by a user through a node allocation page provided by the blockchain management platform, the resource allocation data comprises parameters of at least one allocation item and a blockchain identifier, each allocation item is used for correspondingly allocating a resource, and the blockchain identifier is used for determining at least one node from a plurality of nodes included in the blockchain network;
determining a resource corresponding to each configuration item in the at least one configuration item;
and replacing the original configuration data in the resource configuration file by using the parameter of each configuration item in the resource configuration data, and restarting the block chain process corresponding to the target block chain indicated by the block chain identifier to complete the reconfiguration of the resource.
In a third aspect, an embodiment of the present invention provides a node resource management apparatus, which is applied to a blockchain management platform, where the blockchain management platform is configured to perform resource management on multiple nodes included in a blockchain network, and the apparatus includes:
the processing module is used for responding to a block link point configuration request sent by a user terminal and outputting a node configuration page through the user terminal;
a communication module, configured to receive resource configuration data sent by the user terminal, where the resource configuration data is set by a user through the node configuration page, and the resource configuration data includes a parameter of at least one configuration item and a block chain identifier, and each configuration item is used to configure a resource correspondingly;
the processing module is further configured to determine at least one node associated with a target blockchain indicated by the blockchain identifier from the plurality of nodes;
the communication module is further configured to send the resource configuration data to the at least one node, so that each node in the at least one node replaces original configuration data in a resource configuration file with the resource configuration data, and restarts the block chain process corresponding to the target block chain to complete resource reconfiguration, where the resource configuration file stores the original configuration data of the resources required by the block chain process corresponding to the target block chain.
In a fourth aspect, an embodiment of the present invention further provides a node resource management apparatus, which is applied to a node of a blockchain network, and the apparatus includes:
a communication module, configured to receive resource allocation data sent by a blockchain management platform, where the resource allocation data is set by a user through a node allocation page provided by the blockchain management platform, the resource allocation data includes parameters of at least one allocation item and a blockchain identifier, each allocation item is used to allocate a resource correspondingly, and the blockchain identifier is used to determine at least one node from a plurality of nodes included in the blockchain network;
and the processing module is used for determining the resource corresponding to each configuration item in the at least one configuration item, replacing the original configuration data in the resource configuration file by using the parameter of each configuration item in the resource configuration data, and restarting the block chain process corresponding to the target block chain indicated by the block chain identifier so as to complete the reconfiguration of the resource.
In a fifth aspect, an embodiment of the present invention provides a block chain management platform, including: a processor, an input device, an output device, and a memory; the memory to store program instructions; the processor calls the program instruction to realize the aforementioned node resource management method.
In a sixth aspect, an embodiment of the present invention provides a node of a block chain network, including: a processor, an input device, and a memory; the memory to store program instructions; the processor calls the program instruction to realize the aforementioned node resource management method.
In a seventh aspect, an embodiment of the present invention provides a computer storage medium, where program instructions are stored in the computer storage medium, and when the program instructions are executed, the computer storage medium is configured to implement the foregoing node resource management method.
In summary, the blockchain management platform may output a node configuration page through the user terminal in response to a blockchain node configuration request sent by the user terminal, and may receive resource configuration data sent by the user terminal based on the node configuration page, so as to determine at least one node associated with a target blockchain indicated by a blockchain identifier included in the resource configuration data from a plurality of nodes included in the blockchain network, and send the resource configuration data to the at least one node, so that each node in the at least one node replaces original resource configuration data in the resource configuration file with the resource configuration data, and restart a blockchain process corresponding to the target blockchain, thereby completing resource reconfiguration, improving management efficiency of node resources, and implementing flexible configuration of node resources.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic structural diagram of a node resource management system based on a block chain according to an embodiment of the present invention;
fig. 1B is a schematic diagram of a block chain according to an embodiment of the present invention;
FIG. 1C is a block generation process according to an embodiment of the present invention;
fig. 2A is a flowchart illustrating a node resource management method according to an embodiment of the present invention;
fig. 2B is a schematic diagram of a node configuration page according to an embodiment of the present invention;
fig. 2C is a schematic diagram of another node configuration page provided in the embodiment of the present invention;
fig. 2D is a schematic diagram of a node selection page according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating another node resource management method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating another node resource management method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a node resource management apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another node resource management apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a block chain management platform according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a node of a blockchain network according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Referring to the node resource management system shown in fig. 1A, the node resource management system may include a blockchain network 100, a blockchain management platform 102, and a user terminal 103. Wherein:
the blockchain network 100 refers to a network for performing data sharing between nodes. The blockchain network may include a plurality of nodes 101, and the plurality of nodes 101 may refer to respective clients in the blockchain network. Each node 101 may receive input information and maintain shared data within the blockchain network based on the received input information while operating normally. In order to ensure information intercommunication in the blockchain network, information connection can exist between each node in the blockchain network, and information transmission can be carried out between the nodes through the information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain network are consistent.
The blockchain management platform 102 may perform resource management for a plurality of nodes included in the blockchain network. The blockchain management platform 102 may include a service device or a service device cluster, which is not limited in the embodiments of the present invention. In an application scenario, the Blockchain network platform 102 may be a Blockchain as a Service (BaaS) platform.
The user terminal 103 may communicate with the blockchain management platform 102, for example, sending a blockchain node allocation request to the blockchain management platform 102. The user terminal 103 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like, which is not limited in the embodiments of the present invention.
It should be noted that the number of nodes shown in fig. 1A is merely illustrative, and any number of nodes may be deployed according to actual needs.
Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store node identifiers of other nodes in the blockchain network, so that the generated block can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
Each node in the blockchain network stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 1B, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 1C, when the node where the block chain is located receives the input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the block chain network where the newly generated blocks are located according to the node identifications of the other nodes in the block chain network, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
The intelligent contract can be operated on the nodes of the block chain network, the intelligent contract is realized by codes executed when a certain condition is met, developers can define contract logic through a programming language, issue the contract logic to the block chain (intelligent contract registration), and call keys or other events to trigger execution according to the logic of contract terms to complete the contract logic and simultaneously provide the functions of upgrading and cancelling the intelligent contract.
In some alternative embodiments, the user terminal 103 may send a block link node configuration request to the block link management platform 102. the block link management platform 102 may output a node configuration page via the user terminal 103 in response to the block link node configuration request sent by the user terminal 103. the user may set resource configuration data via the node configuration interface, i.e., the resource configuration data may be set by the user via the node configuration page. the resource configuration data may include parameters of at least one configuration item and a block link identifier, each configuration item being for configuring a resource accordingly.
In an embodiment, the above-mentioned process of reconfiguring the resources required by the blockchain process corresponding to the target blockchain by each node in the at least one node may be: and each node in the at least one node replaces the original configuration data in the resource configuration file by using the resource configuration data and restarts the block chain process corresponding to the target block chain. The resource allocation file mentioned here stores the original resource allocation data of the resources required by the blockchain corresponding to the target blockchain.
Based on the above description, the embodiments of the present invention provide a node resource management method, which can be applied to a block chain management platform. The blockchain management platform can be used to perform resource management on a plurality of nodes included in the blockchain network. Referring to fig. 2A, the method may specifically include the following steps:
s201, responding to a block chain link point configuration request sent by a user terminal, and outputting a node configuration page through the user terminal.
In the embodiment of the invention, the user terminal can send the block chain link point configuration request to the block chain management platform, the block chain management platform can respond to the block chain link point configuration request sent by the user terminal and return the node configuration page to the user terminal, and the user terminal can output the node configuration page.
In one embodiment, the block chain node configuration request may carry identity information of a user, and the block chain management platform may determine whether the user has a node configuration right according to the identity information of the user; if the blockchain management platform determines that the user has the node configuration authority, the step of outputting the node configuration page through the user terminal can be executed.
In one embodiment, the node configuration page may include an identification of a blockchain for which the user has node configuration privileges and/or a node identification. The identifier of the blockchain may be a name of the blockchain. The node identification may be a node name. In one embodiment, the blockchain management platform may query the identity of the blockchain for which the user has node configuration permissions and/or the node identity, thereby generating a node configuration page including the identity of the blockchain for which the user has node configuration permissions and/or the node identity. In one embodiment, if the blockchain management platform determines that the user has the node configuration authority, the blockchain management platform may perform a step of querying an identifier of a blockchain and/or a node identifier of the user having the node configuration authority.
In an application scenario, a user may enter a blockchain management page through a user terminal, and then click a node configuration option included in the blockchain management page, and the user terminal may send a blockchain node configuration request to a blockchain management platform when detecting a click operation of the user on the node configuration option.
In an application scenario, a user may enter a blockchain management page through a user terminal, and then click a blockchain link point management option included in the blockchain management page, the user terminal may send a blockchain link point management request to a blockchain management platform when detecting a click operation of the user on the blockchain link point configuration option, the blockchain management platform may return a node management page to the user terminal in response to the blockchain link point management request, and the user terminal may output the node management page. After the user clicks the node configuration option included in the node management page, the user terminal may send a block link point configuration request to the block chain management platform when detecting a click operation of the user on the node configuration option.
In an application scenario, the above-mentioned node configuration option may be replaced by a node resource configuration option, and correspondingly, the node configuration page may also be replaced by a node resource configuration page.
S202, receiving resource configuration data sent by the user terminal, wherein the resource configuration data is set by a user through the node configuration page, the resource configuration data comprises parameters of at least one configuration item and a block chain identifier, and each configuration item is used for correspondingly configuring a resource.
In the embodiment of the invention, after the user terminal outputs the node configuration page, the user can set the resource configuration data based on the resource configuration page. After the user sets the resource allocation data, the user terminal may send the resource allocation data to the blockchain management platform, and the blockchain management platform may receive the resource allocation data sent by the user terminal, so as to execute step S203. This portion of the content will be described below in conjunction with the node configuration pages shown in fig. 2B-2D. It should be noted that the node configuration page may also be presented in other forms besides fig. 2B-2D, and the embodiments of the present invention are not listed here.
In yet another application scenario, see the node configuration page shown in FIG. 2B. The node configuration page shown in fig. 2B includes a blockchain option. The user may set parameters of at least one configuration item further based on the node configuration page shown in fig. 2B after selecting a corresponding blockchain based on the blockchain option. For example, after selecting the blockchain 1, the user may set the parameter of the memory configuration item to 300G. After the user finishes setting the resource configuration data, the user can click the determination button. The user terminal can respond to the click operation of the user on the determined button and send the resource allocation data to the block chain management platform.
In yet another application scenario, see the node configuration page shown in FIG. 2C. The node configuration page shown in fig. 2C includes a blockchain option and a node option. After selecting the corresponding blockchain option, the user may further select a node requiring resource allocation based on the selected blockchain option and the node option. The parameters of at least one configuration item are then set based on the node configuration page shown in FIG. 2C. For example, after selecting the blockchain 1 and the node 1 corresponding to the blockchain 1, the user may set the parameter of the memory configuration item of the node 1 corresponding to the blockchain 1 to 300G. After the user finishes setting the resource configuration data, the user can click the determination button. The user terminal can respond to the click operation of the user on the determined button and send the resource allocation data to the block chain management platform.
In another application scenario, the options mentioned in the embodiment of the present invention may be replaced with controls in the form of an input box or a drop-down text box, and the embodiment of the present invention is not limited. The above-mentioned configuration items may be replaced by options or controls in the form of a drop-down text library, and the embodiments of the present invention are not limited.
S203, determining at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes.
The following describes in detail how to determine at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes.
In one embodiment, the determining, by the blockchain management platform, at least one node associated with the target blockchain indicated by the blockchain identification from the plurality of nodes may be performed by determining, by the blockchain management platform, all nodes associated with the target blockchain indicated by the blockchain identification from the plurality of nodes. Here, all nodes herein may refer to all nodes including the target block chain.
For example, referring to FIG. 2B, if the user selects the blockchain 1 option, at which time the resource allocation data includes an identification of blockchain 1, the blockchain management platform may determine all nodes associated with blockchain 1. assuming all nodes associated with blockchain 1 include node 1-node L, then the blockchain management platform may determine node 1-node L associated with blockchain 1.
In an embodiment, considering that after the user selects the blockchain identifier, there may be a case where one or more nodes corresponding to the target blockchain indicated by the blockchain identifier are selected, the process of the blockchain management platform determining, from the plurality of nodes, at least one node associated with the target blockchain indicated by the blockchain identifier may be: the block chain management platform determines all nodes associated with the target block chain indicated by the block chain identification from the plurality of nodes; the block chain management platform outputs the identification of each node in all the nodes; and the block chain management platform receives the node selection operation input according to the identification of each node, and determines at least one node from all the nodes according to the node selection operation.
For example, referring to fig. 2D, if the blockchain identifier is an identifier of blockchain 1, the blockchain management platform may obtain and determine node 1 to node L associated with blockchain 1 from the plurality of nodes, the blockchain management platform may output the identifier of node 1, i.e., the identifier of node L, through the terminal device, the user may select the identifier of node 1 from the identifier of node 1, i.e., the identifier of node L, and the blockchain management platform may receive the user's node selection operation through the terminal device, and determine node 1 from node 1 to node L according to the node selection operation.
In one embodiment, when the resource configuration data further includes a designated node identifier corresponding to the blockchain identifier, the determining, by the blockchain management platform, at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes may be: and the block chain management platform determines at least one node corresponding to the designated node identification corresponding to the block chain identification from the plurality of nodes. By adopting the process, under the condition that one node comprises a plurality of block chains, the resource allocation can be accurately carried out on the block chain process corresponding to a certain block chain in the node.
For example, referring to fig. 2C, the user selects a node 1 corresponding to the blockchain 1, the resource configuration data may further include an identifier of the node 1 corresponding to the blockchain 1, and the blockchain management platform may determine the node 1 corresponding to the blockchain 1 from the plurality of nodes.
In one embodiment, the determining, by the blockchain management platform, at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes may be: the block chain management platform acquires all nodes associated with the target block chain indicated by the block chain identification from the plurality of nodes; the block chain management platform acquires the use state information of the resources of the block chain process corresponding to the target block chain on each node in all the nodes, wherein the use state information comprises the resource use amount or the resource residual amount; and the block chain management platform determines at least one node from all the nodes according to the use state information. It should be noted that the resource usage mentioned in the embodiment of the present invention may be the usage of the resource. Through the process, the nodes with the resource adjustment requirement can be effectively determined.
In one embodiment, the process of the blockchain management platform determining at least one node from the all nodes according to the usage status information may be: and the block chain management platform determines at least one node with abnormal resource usage amount or abnormal resource remaining amount from all the nodes according to the usage state information. In one embodiment, the resource usage may be determined to be abnormal when the resource usage is too large or too small (e.g., when the resource usage for the specified resource is determined to be greater than a first preset usage or less than a second preset usage), and the resource remaining amount may be determined to be abnormal when the resource remaining amount for the specified resource is too large or too small (e.g., when the resource remaining amount for the specified resource is determined to be greater than a first preset remaining amount or less than a second preset remaining amount).
In one embodiment, when the resource configuration data includes at least one configuration item parameter and a node identifier, the blockchain management platform may determine, from the plurality of nodes, at least one node corresponding to the node identifier. Compared with a mode of uniformly performing resource allocation on nodes corresponding to one or more block chains, a mode of performing resource allocation on one or more nodes one by one can make the resource allocation process more targeted.
S204, sending the resource configuration data to the at least one node, so that each node in the at least one node replaces original configuration data in a resource configuration file by using the resource configuration data, and restarts a block chain process corresponding to the target block chain to complete resource reconfiguration, wherein the resource configuration file stores the original configuration data of resources required by the block chain process corresponding to the target block chain.
In this embodiment of the present invention, the blockchain management platform may send the resource allocation data to at least one node, and each node in the at least one node may replace the original allocation data in the resource allocation file with the resource allocation data and restart the blockchain process corresponding to the target blockchain, so as to complete resource reconfiguration. The resource allocation file may be a resource allocation file corresponding to the target block chain, or may also be a resource allocation file corresponding to a plurality of block chains, where the plurality of block chains include the target block chain.
For example, referring to fig. 2B, the blockchain management platform may send resource configuration data (including at least one parameter of the configuration item and an identifier of the blockchain 1) to the node 1 corresponding to the blockchain 1, and the node 1 may receive the resource configuration data, replace the original configuration data in the resource configuration file with the resource configuration data, and restart the blockchain process corresponding to the blockchain 1 to complete the reconfiguration of the resource.
For another example, referring to fig. 2B, assuming that the user sets the parameter of the at least one configuration item corresponding to the node 1 and also sets the parameter of the at least one configuration item corresponding to the node 2 corresponding to the blockchain 1 based on the node configuration page, the blockchain management platform may send the resource configuration data corresponding to the node 1 (including the parameter of the at least one configuration item corresponding to the node 1) to the node 1 and send the resource configuration data corresponding to the node 2 (including the parameter of the at least one configuration item corresponding to the node 2) to the node 2.
For example, referring to fig. 2C, the blockchain management platform may send the resource configuration data to the node 1 corresponding to the blockchain 1, and the node 1 may receive the resource configuration data, replace the original configuration data in the resource configuration file with the resource configuration data, and restart the blockchain process corresponding to the blockchain 1 to complete resource reconfiguration.
For another example, referring to fig. 2C, assuming that the user sets at least one configuration item parameter corresponding to node 1 corresponding to blockchain 1 and at least one configuration item parameter corresponding to node 1 corresponding to blockchain 2 in addition to the at least one configuration item parameter corresponding to node 1 corresponding to blockchain 1, the blockchain management platform may send resource configuration data (including the at least one configuration item parameter set for blockchain 1 and the at least one configuration item parameter set for blockchain 2) to node 1. Node 1 may receive the resource allocation data, replace the original allocation data in the resource allocation file with the resource allocation data, and restart the block chain process corresponding to the target block chain to complete resource reconfiguration. Specifically, the node 1 may replace, according to the parameter of the at least one configuration item set for the blockchain 1 included in the resource configuration data, the configuration data of the resource required by the blockchain process corresponding to the blockchain 1 in the original configuration data included in the resource configuration file, and restart the blockchain process corresponding to the blockchain 1. Correspondingly, the node 1 may also use the configuration data of the resources required by the blockchain process corresponding to the blockchain 2 in this manner, and restart the blockchain process corresponding to the blockchain 2 to complete the reconfiguration of the resources.
In the embodiment shown in fig. 2A, the blockchain management platform may respond to the request for blockchain node allocation sent by the user terminal, outputting, by the user terminal, a node configuration page, and receiving resource configuration data including parameters of at least one configuration item and a blockchain identifier, which is sent by the user terminal based on the node configuration page, determining, from the plurality of nodes, at least one node associated with a target blockchain indicated by the blockchain identifier, thereby sending the resource allocation data to the at least one node, so that each node in the at least one node replaces the original resource allocation data in the resource allocation file with the resource allocation data, and restarts the blockchain process corresponding to the target blockchain, therefore, the resource reconfiguration is completed, the management efficiency of the node resources is improved, and the flexible configuration of the node resources is also realized.
In an embodiment, an embodiment of the present invention further provides another node resource management method, which can be applied to a blockchain management platform, where the blockchain management platform can be used to perform resource management on a plurality of nodes included in a blockchain network. In comparison with the embodiment shown in fig. 2A, the embodiment of the present invention further describes a process of the blockchain management platform performing automatic and intelligent dynamic configuration on the node resources. Referring to fig. 3, the method may specifically include the following steps:
s301, responding to a block chain link point configuration request sent by a user terminal, and outputting a node configuration page through the user terminal.
S302, receiving resource configuration data sent by the user terminal, where the resource configuration data is set by a user through the node configuration page, the resource configuration data includes parameters of at least one configuration item and a block chain identifier, and each configuration item is used to configure a resource correspondingly.
S303, determining at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes.
S304, sending the resource configuration data to the at least one node, so that each node in the at least one node replaces original configuration data in a resource configuration file by using the resource configuration data, and restarts a block chain process corresponding to the target block chain to complete resource reconfiguration, wherein the resource configuration file stores the original configuration data of resources required by the block chain process corresponding to the target block chain.
Steps S301 to S304 can refer to steps S201 to S204 in the embodiment of fig. 2A, and the embodiment of the present invention is not described herein again.
S305, obtaining the usage amount of each node in the plurality of nodes to the target resource.
Wherein the target resource includes but is not limited to at least one of the following: memory resources, disk resources, processor resources, network resources.
In one embodiment, the blockchain management platform may send a get request for a usage amount of the target resource to each of the plurality of nodes. The node may send the usage of the target resource by the node to the blockchain management platform in response to the request for obtaining the usage of the target resource. The target resource may refer to any one or more of the resources required to run the blockchain process, or may also refer to a specified resource among the resources required to run the blockchain process.
In one embodiment, the blockchain management platform may send an acquisition request for a usage amount of the target resource to each of the plurality of nodes upon arrival of the specified time.
S306, if the usage of the target resource by a first node in the plurality of nodes is within a preset usage range, adjusting parameters of a configuration item corresponding to the target resource in the resource configuration data of the first node to obtain updated resource configuration data.
S307, sending the updated resource configuration data to the first node, so that the first node reconfigures the target resource required by the running block chain process by using the updated resource configuration data.
In steps S306 to S307, the block chain management platform may consider how to adjust a parameter of a configuration item corresponding to a target resource in the resource configuration data of the first node in combination with the usage amount of the target resource by the first node in the plurality of nodes, so as to obtain updated resource configuration data, and send the updated resource configuration data to the first node, so that the first node reconfigures the target resource required by the block chain process by using the updated resource configuration data, even if the first node replaces the original configuration data in the resource configuration file by using the updated resource configuration data, and restarts the corresponding block chain process, thereby achieving the purpose of reconfiguring the target resource required by the block chain process by using the updated resource configuration data. The first node may be any one or more of a plurality of nodes, or may also be a designated node of the plurality of nodes, which is not limited in the embodiment of the present invention. The preset usage range may include a first preset usage range and a second preset usage range. The minimum value of the first preset usage range is larger than the maximum value of the second preset usage range.
In an embodiment, if the usage amount of the target resource by the first node of the plurality of nodes is within a preset usage amount range, the blockchain management platform adjusts the parameter of the configuration item corresponding to the target resource in the resource configuration data of the first node, and the process of obtaining the updated resource configuration data may be that when the usage amount of the target resource by the first node of the plurality of nodes is within a first preset usage amount range, the blockchain management platform increases the parameter of the configuration item corresponding to the target resource in the resource configuration data of the first node to obtain the updated resource configuration data, where the updated resource configuration data includes the increased parameter of the configuration item corresponding to the target resource.
In an embodiment, when the usage amount of the target resource by the first node device in the plurality of nodes is within a first preset usage amount range, the blockchain management platform may calculate a ratio of the usage amount of the target resource by the first node device in a parameter corresponding to a configuration item corresponding to the target resource; and if the occupation ratio is larger than or equal to the preset occupation ratio, executing a step of increasing the parameters of the configuration items corresponding to the target resource in the resource configuration data of the first node to obtain updated resource configuration data. In combination with the occupation ratio, the usage degree of the node for the corresponding resource can be measured more accurately, and whether to adjust the parameter of the configuration item corresponding to the resource is determined according to the usage degree.
In an embodiment, if the usage amount of the target resource by the first node of the plurality of nodes is within a preset usage amount range, the blockchain management platform adjusts the parameter of the configuration item corresponding to the target resource in the resource configuration data of the first node, and the process of obtaining the updated resource configuration data may be that when the usage amount of the target resource by the first node of the plurality of nodes is within a second preset usage amount range, the blockchain management platform reduces the parameter of the configuration item corresponding to the target resource in the resource configuration data of the first node to obtain the updated resource configuration data, where the updated resource configuration data includes the reduced parameter of the configuration item corresponding to the target resource.
In one embodiment, steps S305 to S307 may also be performed before step S301, and the embodiment of the present invention is not limited.
In one embodiment, in addition to whether the parameter of the configuration item corresponding to the resource needs to be adjusted or not in view of the dimension of the usage amount of the resource, whether the parameter of the configuration item corresponding to the resource needs to be adjusted or not may be also determined in view of the number of requests processed by the node within a certain time period. The blockchain management platform can also perform the following operations: acquiring the number of requests processed by each node in the plurality of nodes within a preset time (such as the previous day or the previous week); if the number of the requests processed by the second node in the preset time length is within the preset number range, adjusting parameters of each configuration item in the resource configuration data of the second node to obtain updated resource configuration data; and sending the updated resource configuration data to the second node so that the second node reconfigures the resources required by the running block chain process by using the updated resource configuration data. The second node may be any one or more of a plurality of nodes, or may also be a designated node of the plurality of nodes. The second node may be the same as or different from the first node. The preset number range may include a first preset number range and a second preset number range. The minimum value of the first predetermined number range is greater than the maximum value of the second predetermined number range.
In an embodiment, if the number of the requests processed by the second node in the preset time duration is within a preset number range, the parameter of each configuration item in the resource configuration data of the second node is adjusted, and the process of obtaining the updated resource configuration data may be that, if the number of the requests processed by the second node in the preset time duration is within a first preset number range, the parameter of each configuration item in the resource configuration data of the second node is increased to obtain the updated resource configuration data, where the updated resource configuration data includes the increased parameter of each configuration item.
In an embodiment, if the number of the requests processed by the second node in the preset time duration is within a preset number range, the parameter of each configuration item in the resource configuration data of the second node is adjusted, and the process of obtaining the updated resource configuration data may be that, if the number of the requests processed by the second node in the preset time duration is within a second preset number range, the parameter of each configuration item in the resource configuration data of the second node is decreased, so as to obtain the updated resource configuration data, where the updated resource configuration data includes the decreased parameter of each configuration item.
In an embodiment, if the number of requests processed by a second node of the plurality of nodes in the preset time period is within a second preset number range, and a parameter of a target configuration item in each configuration item included in the second node is greater than a preset value corresponding to the target configuration item, the parameter of the target configuration item in the resource configuration data of the second node is decreased. That is, when the request amount is small but the resource allocated to the node is excessive, the resource can be reduced to achieve reasonable allocation of the resource.
In the embodiment shown in fig. 3, the blockchain management platform may determine how to adjust the parameter of the configuration item corresponding to the resource in the resource configuration data of the node according to the usage amount of the node for the resource, so as to achieve the purpose of automatically and intelligently dynamically configuring the resource of the node.
Based on the above description, the embodiment of the present invention further provides another node resource management method, which can be applied to a node of a block chain network. Referring to fig. 4, the method may specifically include the following steps:
s401, receiving resource allocation data sent by a blockchain management platform, where the resource allocation data is set by a node allocation page provided by a user through the blockchain management platform, the resource allocation data includes a parameter of at least one allocation item and a blockchain identifier, each allocation item is used to allocate a resource correspondingly, and the blockchain identifier is used to determine at least one node from a plurality of nodes included in the blockchain network.
S402, determining the resource corresponding to each configuration item in the at least one configuration item.
In steps S401 to S402, the blockchain management platform may send resource configuration data to the node, where the resource configuration data includes parameters of at least one configuration item, and the node may receive the resource configuration data sent by the blockchain management platform and determine a resource corresponding to each configuration item in the at least one configuration item, so as to perform step S403.
S403, replacing the original configuration data in the resource configuration file with the parameter of each configuration item in the resource configuration data, and restarting the block chain process corresponding to the target block chain indicated by the block chain identifier, so as to complete resource reconfiguration.
In the embodiment of the present invention, the node may reconfigure the resource required by the blockchain process corresponding to the target blockchain by using the resource allocation data. Specifically, the node may replace the original configuration data in the resource configuration file with the parameter of each configuration item in the resource configuration data, and restart the blockchain process corresponding to the target blockchain indicated by the blockchain identifier, so as to complete resource reconfiguration.
For example, the resource configuration data includes a parameter of at least one configuration item set for blockchain 1 and a parameter of at least one configuration item set for blockchain 2, and the node may replace the configuration data of the resource required by the blockchain process corresponding to blockchain 1 in the original configuration data included in the configuration file with the parameter of at least one configuration item set for blockchain 1 and restart the blockchain process corresponding to blockchain 1. The node may also replace the configuration data of the resource required by the blockchain process corresponding to the blockchain 2 in the original configuration data included in the configuration file with the parameter of the at least one configuration item set for the blockchain 2, and restart the blockchain process corresponding to the blockchain 2.
In one embodiment, the node may further obtain operation status data of the node, where the operation status data includes a usage amount of the resource or a number of requests processed within a preset time period; if the running state data meets the resource reconfiguration condition, the resource configuration data is adjusted according to the running state data to obtain adjusted resource configuration data, and resources required by the running block chain process are reconfigured by using the adjusted resource configuration data. In an embodiment, the process of the node reconfiguring the resource required by the running blockchain process by using the adjusted resource configuration data may be: and the node replaces the original configuration data in the resource configuration file by using the adjusted resource configuration data and restarts the block chain process of the node. In an embodiment, the running state data may be running state data corresponding to a blockchain process of a target blockchain, and accordingly, the above-mentioned utilizing the adjusted resource allocation data may refer to replacing, by the adjusted resource allocation data, configuration data of resources required by the blockchain process corresponding to the target blockchain, which is included in original configuration data in a resource configuration file, with the adjusted resource allocation data. Accordingly, the above mentioned restart blockchain process may refer to a blockchain process corresponding to a target blockchain of the restart node.
In an embodiment, if the operating status data meets the resource reconfiguration condition, the node adjusts the resource configuration data according to the operating status data, and obtaining the adjusted resource configuration data may include: if the usage amount of the target resource by the node is within the preset usage amount range, the node adjusts the parameters of the configuration item corresponding to the target resource in the resource configuration data of the node to obtain the adjusted resource configuration data. The preset usage range herein may include a third preset usage range and a fourth preset usage range. The minimum value of the third preset usage range is larger than the maximum value of the fourth preset usage range. The third preset usage range may be the same as or different from the aforementioned first preset usage range, and the fourth preset usage range may be the same as or different from the aforementioned second preset usage range.
In an embodiment, if the usage amount of the target resource by the node is in a preset usage amount range, the node adjusts a parameter of a configuration item corresponding to the target resource in the resource configuration data of the node, and the process of obtaining the adjusted resource configuration data may be that when the usage amount of the target resource by the node is in a third preset usage amount range, the node increases the parameter of the configuration item corresponding to the target resource in the resource configuration data of the node to obtain the adjusted resource configuration data, where the adjusted resource configuration data includes the increased parameter of the configuration item corresponding to the target resource.
In an embodiment, if the usage amount of the target resource by the node is in a preset usage amount range, the node adjusts a parameter of a configuration item corresponding to the target resource in the resource configuration data of the node, and the process of obtaining the adjusted resource configuration data may be that when the usage amount of the target resource by the node is in a fourth preset usage amount range, the node reduces the parameter of the configuration item corresponding to the target resource in the resource configuration data of the node to obtain the adjusted resource configuration data, where the adjusted resource configuration data includes the reduced parameter of the configuration item corresponding to the target resource.
In one embodiment, in addition to whether the parameter of the configuration item corresponding to the resource needs to be adjusted or not in view of the dimension of the usage amount of the resource, whether the parameter of the configuration item corresponding to the resource needs to be adjusted or not may be also determined in view of the number of requests processed by the node within a certain time period. Specifically, if the operating status data meets the resource reconfiguration condition, the resource configuration data is adjusted according to the operating status data, and the process of obtaining the adjusted resource configuration data may be that if the number of the requests processed by the node within the preset time duration is within the preset number range, the parameter of each configuration item in the resource configuration data of the node is adjusted to obtain the adjusted resource configuration data. The preset number range herein may include a third preset number range and a fourth preset number range. The minimum value of the third predetermined number range is greater than the maximum value of the fourth predetermined number range. The third predetermined number range may be the same as or different from the first predetermined number range, and the fourth predetermined number range may be the same as or different from the second predetermined number range.
In an embodiment, if the number of requests processed by the node in the preset duration is within a preset number range, the parameter of each configuration item in the resource configuration data of the node is adjusted, and the process of obtaining the adjusted resource configuration data may be that if the number of requests processed by the node in the preset duration is within a third preset number range, the parameter of each configuration item in the resource configuration data of the node is increased to obtain the adjusted resource configuration data, where the adjusted resource configuration data includes the increased parameter of each configuration item.
In an embodiment, if the number of requests processed by the node in the preset duration is within a preset number range, the parameter of each configuration item in the resource configuration data of the node is adjusted, and the process of obtaining the adjusted resource configuration data may be that if the number of requests processed by the node in the preset duration is within a fourth preset number range, the parameter of each configuration item in the resource configuration data of the node is reduced, so as to obtain the adjusted resource configuration data, where the adjusted resource configuration data includes the reduced parameter of each configuration item.
As can be seen, in the embodiment shown in fig. 4, the node can reconfigure the resource corresponding to each configuration item in the resources required by the operation of the blockchain process according to the resource configuration data sent by the blockchain management platform, thereby implementing the process of automatically and intelligently dynamically configuring the node resources, and improving the management efficiency of the node resources.
Based on the description of the foregoing method embodiment, in an embodiment, an embodiment of the present invention further provides a schematic structural diagram of a node resource management device as shown in fig. 5. The node resource management apparatus may be applied to the aforementioned blockchain management platform, which is used for resource management of a plurality of nodes included in a blockchain network. As shown in fig. 5, the node resource management apparatus in the embodiment of the present invention may include:
a processing module 501, configured to respond to a block link point configuration request sent by a user terminal, and output a node configuration page through the user terminal.
A communication module 502, configured to receive resource configuration data sent by the user terminal, where the resource configuration data is set by a user through the node configuration page, and the resource configuration data includes a parameter of at least one configuration item and a block chain identifier, and each configuration item is used to configure a resource correspondingly.
The processing module 501 is further configured to determine at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes, and send the resource configuration data to the at least one node, so that each node in the at least one node replaces original configuration data in a resource configuration file by using the resource configuration data, and restarts a blockchain process corresponding to the target blockchain to complete resource reconfiguration, where the resource configuration file stores the original configuration data of resources required by the blockchain process corresponding to the target blockchain.
In an optional embodiment, the processing module 501 determines at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes, specifically, determines all nodes associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes; acquiring use state information of resources, which are allocated to a blockchain process corresponding to the target blockchain, on each node in all the nodes, wherein the use state information comprises resource use amount or resource residual amount; and determining at least one node from all the nodes according to the using state information.
In an optional implementation, the processing module 501 determines at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes, specifically, determines all nodes associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes; outputting the identifier of each node in all the nodes through a communication module 502; receiving, by the communication module 502, a node selection operation input according to the identifier of each node; and determining at least one node from all the nodes according to the node selection operation.
In an optional embodiment, the processing module 501 is further configured to obtain a usage amount of the target resource by each node in the plurality of nodes; if the usage amount of the target resource by a first node in the plurality of nodes is within a preset usage amount range, adjusting parameters of a configuration item corresponding to the target resource in resource configuration data of the first node to obtain updated resource configuration data; and sending the updated resource configuration data to the first node, so that the first node reconfigures the target resource required by the running block chain process by using the updated resource configuration data.
In an optional implementation manner, the processing module 501 is further configured to obtain the number of requests processed by each node in the plurality of nodes within a preset time period; if the number of the requests processed by the second node in the preset time length is within a preset number range, adjusting parameters of each configuration item in the resource configuration data of the second node to obtain updated resource configuration data; and sending the updated resource configuration data to the second node so that the second node reconfigures the resources required by the running block chain process by using the updated resource configuration data.
As can be seen, in the embodiment shown in fig. 5, the node resource management device may output a node configuration page through the user terminal in response to a block link node configuration request sent by the user terminal, and may receive resource configuration data sent by the user terminal based on the node configuration page; the node determines at least one node associated with a target block chain indicated by a block chain identifier included in the resource configuration data from the plurality of nodes, so that the resource configuration data is sent to the at least one node, and each of the at least one node reconfigures resources required by a block chain process corresponding to the target block chain according to the resource configuration data, thereby improving the management efficiency of the node resources and realizing flexible configuration of the node resources.
Based on the description of the foregoing method embodiment, in an embodiment, an embodiment of the present invention further provides a schematic structural diagram of a node resource management device as shown in fig. 6. The node resource management apparatus may be applied to the node of the aforementioned block chain network. As shown in fig. 6, the node resource management apparatus in the embodiment of the present invention may include:
a communication module 601, configured to receive resource allocation data sent by a blockchain management platform, where the resource allocation data is set by a user through a node allocation page provided by the blockchain management platform, the resource allocation data includes parameters of at least one configuration item and a blockchain identifier, each configuration item is used to allocate a resource correspondingly, and the blockchain identifier is used to determine at least one node from a plurality of nodes included in the blockchain network.
A processing module 602, configured to determine a resource corresponding to each configuration item in the at least one configuration item, replace original configuration data in a resource configuration file with a parameter of each configuration item in the resource configuration data, and restart a block chain process corresponding to a target block chain indicated by the block chain identifier, so as to complete resource reconfiguration.
In an optional implementation, the processing module 602 is further configured to obtain running state data of the node, where the running state data includes a usage amount of a resource or a number of requests processed within a preset time period; if the running state data meets the resource reconfiguration condition, adjusting the resource configuration data according to the running state data to obtain adjusted resource configuration data; and utilizing the adjusted resource configuration data to reconfigure the resources required by the running block chain process.
As can be seen, in the embodiment shown in fig. 6, the node resource management device may reconfigure the resource corresponding to each configuration item in the resources required by the operation of the blockchain process according to the resource configuration data sent by the blockchain management platform, thereby implementing a process of automatically and intelligently dynamically configuring the node resources, and improving the management efficiency of the node resources.
Fig. 7 is a schematic structural diagram of a block chain management platform according to an embodiment of the present invention. The blockchain management platform in the embodiment shown in fig. 7 may include: one or more processors 701, one or more input devices 702, one or more output devices 703, and memory 704. The processor 701, input device 702, output device 703, and memory 704 are connected by a bus or other means. The input device 702, the output device 703 may be a standard wired or wireless communication interface. The memory 704 is used to store a computer program comprising program instructions, and the processor 701 is used to execute the program instructions stored by the memory 704 to implement the various methods referred to above.
The memory 704 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory 704 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), etc.; the memory 704 may also comprise a combination of the above types of memory.
In one embodiment, processor 701 may be a Central Processing Unit (CPU), or other general-purpose processor, i.e., a microprocessor or any conventional processor. The memory 704 may include read-only memory and random access memory. Accordingly, the processor 701 and the memory 704 are not limited herein.
In one embodiment, processor 701 invokes program instructions stored in memory 704 for outputting a node configuration page via a user terminal in response to a block link point configuration request sent by the user terminal; receiving, through an input device 702, resource configuration data sent by the user terminal, where the resource configuration data is set by a user through the node configuration page, and the resource configuration data includes a parameter of at least one configuration item and a blockchain identifier, where each configuration item is used to configure a resource correspondingly; determining at least one node associated with a target blockchain indicated by the blockchain identification from the plurality of nodes; sending the resource configuration data to the at least one node through the output device 703, so that each node in the at least one node replaces original configuration data in a resource configuration file with the resource configuration data, and restarts the block chain process corresponding to the target block chain to complete resource reconfiguration, wherein the resource configuration file stores the original configuration data of the resources required by the block chain process corresponding to the target block chain.
In one embodiment, the processor 701 determines at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes, specifically, determines all nodes associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes; acquiring use state information of resources, which are allocated to a blockchain process corresponding to the target blockchain, on each node in all the nodes, wherein the use state information comprises resource use amount or resource residual amount; and determining at least one node from all the nodes according to the using state information.
In one embodiment, the processor 701 determines at least one node associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes, specifically, determines all nodes associated with the target blockchain indicated by the blockchain identifier from the plurality of nodes; outputting the identifier of each node in all the nodes through an output device 703; receiving a node selection operation input according to the identifier of each node through an input device 702; and determining at least one node from all the nodes according to the node selection operation.
In one embodiment, the processor 701 invokes program instructions stored in the memory 704 to further obtain usage of a target resource by each node of the plurality of nodes; if the usage amount of the target resource by a first node in the plurality of nodes is within a preset usage amount range, adjusting parameters of a configuration item corresponding to the target resource in resource configuration data of the first node to obtain updated resource configuration data; and sending the updated resource configuration data to the first node, so that the first node reconfigures the target resource required by the running block chain process by using the updated resource configuration data.
In one embodiment, the processor 701 calls the program instructions stored in the memory 704, and is further configured to obtain the number of requests processed by each node in the plurality of nodes within a preset time period; if the number of the requests processed by the second node in the preset time length is within a preset number range, adjusting parameters of each configuration item in the resource configuration data of the second node to obtain updated resource configuration data; and sending the updated resource configuration data to the second node so that the second node reconfigures the resources required by the running block chain process by using the updated resource configuration data.
It should be noted that, for the specific working process of the above-described blockchain management platform and unit, reference may be made to the relevant description in the foregoing embodiments, and details are not repeated here.
Fig. 8 is a schematic structural diagram of a node of a blockchain network according to an embodiment of the present invention. The nodes of the blockchain network in the present embodiment as shown in fig. 8 may include: one or more processors 801, one or more input devices 802, one or more output devices 803, and memory 804. The processor 801, input device 802, output device 803, and memory 804 are connected by a bus or other means. Wherein output device 803 is an optional device. Input device 802 and output device 803 may be standard wired or wireless communication interfaces. The memory 804 is used for storing a computer program comprising program instructions, and the processor 801 is used for executing the program instructions stored by the memory 804 to implement the various methods referred to above.
The memory 804 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory 804 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), etc.; the memory 804 may also comprise a combination of the above-described types of memory.
In one embodiment, processor 801 may be a Central Processing Unit (CPU), or other general-purpose processor, i.e., a microprocessor or any conventional processor. The memory 804 may include read-only memory and random access memory. Therefore, the processor 801 and the memory 804 are not limited herein.
In one embodiment, the processor 801 invokes a program instruction stored in the memory 804, to receive, through the input device 802, resource configuration data sent by the blockchain management platform, the resource configuration data being set by a user through a node configuration page provided by the blockchain management platform, the resource configuration data including parameters of at least one configuration item and a blockchain identifier, each configuration item being used to configure a resource correspondingly, the blockchain identifier being used to determine at least one node from a plurality of nodes included in the blockchain network; determining a resource corresponding to each configuration item in the at least one configuration item; and replacing the original configuration data in the resource configuration file by using the parameter of each configuration item in the resource configuration data, and restarting the block chain process corresponding to the target block chain indicated by the block chain identifier to complete the reconfiguration of the resource.
In one embodiment, the processor 801 calls the program instructions stored in the memory 804, and is further configured to obtain running state data of the node, where the running state data includes a usage amount of the resource or a number of requests processed within a preset time period; if the running state data meets the resource reconfiguration condition, adjusting the resource configuration data according to the running state data to obtain adjusted resource configuration data; and utilizing the adjusted resource configuration data to reconfigure the resources required by the running block chain process.
It should be noted that, for the specific working process of the node and the unit of the block chain network described above, reference may be made to the relevant description in each of the foregoing embodiments, and details are not described here again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware instructions of a computer program, where the computer program may be stored in a computer storage medium, and the computer storage medium may be a computer-readable storage medium, and when executed, the computer program may include the processes of the above embodiments of the methods. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a number of embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A node resource management method is applied to a blockchain management platform, and the blockchain management platform is used for carrying out resource management on a plurality of nodes included in a blockchain network, and the method comprises the following steps:
responding to a block link point configuration request sent by a user terminal, and outputting a node configuration page through the user terminal;
receiving resource configuration data sent by the user terminal, wherein the resource configuration data is set by a user through the node configuration page, the resource configuration data comprises parameters of at least one configuration item and a block chain identifier, and each configuration item is used for correspondingly configuring a resource;
determining at least one node associated with a target blockchain indicated by the blockchain identification from the plurality of nodes;
and sending the resource configuration data to the at least one node, so that each node in the at least one node replaces original configuration data in a resource configuration file by using the resource configuration data, and restarts a block chain process corresponding to the target block chain to complete resource reconfiguration, wherein the resource configuration file stores the original configuration data of the resources required by the block chain process corresponding to the target block chain.
2. The method of claim 1, wherein the determining at least one node from the plurality of nodes associated with the target blockchain indicated by the blockchain identifier comprises:
determining all nodes associated with a target blockchain indicated by the blockchain identification from the plurality of nodes;
acquiring use state information of resources, which are allocated to a blockchain process corresponding to the target blockchain, on each node in all the nodes, wherein the use state information comprises resource use amount or resource residual amount;
and determining at least one node from all the nodes according to the using state information.
3. The method of claim 1, wherein the determining at least one node from the plurality of nodes associated with the target blockchain indicated by the blockchain identifier comprises:
determining all nodes associated with a target blockchain indicated by the blockchain identification from the plurality of nodes;
outputting the identification of each node in all the nodes;
receiving node selection operation input according to the identification of each node;
and determining at least one node from all the nodes according to the node selection operation.
4. The method according to any one of claims 1 to 3, further comprising:
acquiring the usage amount of each node in the plurality of nodes to the target resource;
if the usage amount of the target resource by a first node in the plurality of nodes is within a preset usage amount range, adjusting parameters of a configuration item corresponding to the target resource in resource configuration data of the first node to obtain updated resource configuration data;
and sending the updated resource configuration data to the first node, so that the first node reconfigures the target resource required by the running block chain process by using the updated resource configuration data.
5. The method according to any one of claims 1 to 3, further comprising:
acquiring the number of requests processed by each node in the plurality of nodes within a preset time length;
if the number of the requests processed by the second node in the preset time length is within a preset number range, adjusting parameters of each configuration item in the resource configuration data of the second node to obtain updated resource configuration data;
and sending the updated resource configuration data to the second node so that the second node reconfigures the resources required by the running block chain process by using the updated resource configuration data.
6. A node resource management method is applied to a node of a block chain network, and the method comprises the following steps:
receiving resource allocation data sent by a blockchain management platform, wherein the resource allocation data is set by a user through a node allocation page provided by the blockchain management platform, the resource allocation data comprises parameters of at least one allocation item and a blockchain identifier, each allocation item is used for correspondingly allocating a resource, and the blockchain identifier is used for determining at least one node from a plurality of nodes included in the blockchain network;
determining a resource corresponding to each configuration item in the at least one configuration item;
and replacing the original configuration data in the resource configuration file by using the parameter of each configuration item in the resource configuration data, and restarting the block chain process corresponding to the target block chain indicated by the block chain identifier to complete the reconfiguration of the resource.
7. The method of claim 6, further comprising:
acquiring running state data of a node, wherein the running state data comprises the usage amount of resources or the number of requests processed within a preset time length;
if the running state data meets the resource reconfiguration condition, adjusting the resource configuration data according to the running state data to obtain adjusted resource configuration data;
and utilizing the adjusted resource configuration data to reconfigure the resources required by the running block chain process.
8. A node resource management apparatus applied to a blockchain management platform, the blockchain management platform being configured to perform resource management on a plurality of nodes included in a blockchain network, the apparatus comprising:
the processing module is used for responding to a block link point configuration request sent by a user terminal and outputting a node configuration page through the user terminal;
a communication module, configured to receive resource configuration data sent by the user terminal, where the resource configuration data is set by a user through the node configuration page, and the resource configuration data includes a parameter of at least one configuration item and a block chain identifier, and each configuration item is used to configure a resource correspondingly;
the processing module is further configured to determine at least one node associated with a target blockchain indicated by the blockchain identifier from the plurality of nodes;
the communication module is further configured to send the resource configuration data to the at least one node, so that each node in the at least one node replaces original configuration data in a resource configuration file with the resource configuration data, and restarts the block chain process corresponding to the target block chain to complete resource reconfiguration, where the resource configuration file stores the original configuration data of the resources required by the block chain process corresponding to the target block chain.
9. An apparatus for node resource management, applied to a node of a blockchain network, the apparatus comprising:
a communication module, configured to receive resource allocation data sent by a blockchain management platform, where the resource allocation data is set by a user through a node allocation page provided by the blockchain management platform, the resource allocation data includes parameters of at least one allocation item and a blockchain identifier, each allocation item is used to allocate a resource correspondingly, and the blockchain identifier is used to determine at least one node from a plurality of nodes included in the blockchain network;
and the processing module is used for replacing the original configuration data in the resource configuration file by using the parameter of each configuration item in the resource configuration data and restarting the block chain process corresponding to the target block chain indicated by the block chain identifier so as to complete the reconfiguration of the resource.
10. A computer storage medium having stored thereon program instructions for implementing the method of any one of claims 1-7 when executed.
CN202010245564.7A 2020-03-31 2020-03-31 Node resource management method, device and storage medium Active CN111459676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010245564.7A CN111459676B (en) 2020-03-31 2020-03-31 Node resource management method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010245564.7A CN111459676B (en) 2020-03-31 2020-03-31 Node resource management method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111459676A true CN111459676A (en) 2020-07-28
CN111459676B CN111459676B (en) 2024-06-18

Family

ID=71685303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010245564.7A Active CN111459676B (en) 2020-03-31 2020-03-31 Node resource management method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111459676B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112054928A (en) * 2020-09-02 2020-12-08 杭州复杂美科技有限公司 Parallel chain node configuration method, equipment and storage medium
CN112055067A (en) * 2020-08-28 2020-12-08 杭州复杂美科技有限公司 Node connection method, device and storage medium
WO2023143410A1 (en) * 2022-01-28 2023-08-03 索尼集团公司 Dynamic resource sharing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
CN108696514A (en) * 2018-04-27 2018-10-23 腾讯科技(深圳)有限公司 Resource collects task management method, device, storage medium and system
CN110084486A (en) * 2019-04-02 2019-08-02 深圳前海微众银行股份有限公司 A kind of method for managing resource and device
CN110661658A (en) * 2019-09-23 2020-01-07 腾讯科技(深圳)有限公司 Node management method and device of block chain network and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
WO2019062304A1 (en) * 2017-09-26 2019-04-04 上海点融信息科技有限责任公司 Method, device and system for managing computing resources of block chain node
CN108696514A (en) * 2018-04-27 2018-10-23 腾讯科技(深圳)有限公司 Resource collects task management method, device, storage medium and system
CN110084486A (en) * 2019-04-02 2019-08-02 深圳前海微众银行股份有限公司 A kind of method for managing resource and device
CN110661658A (en) * 2019-09-23 2020-01-07 腾讯科技(深圳)有限公司 Node management method and device of block chain network and computer storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112055067A (en) * 2020-08-28 2020-12-08 杭州复杂美科技有限公司 Node connection method, device and storage medium
CN112055067B (en) * 2020-08-28 2023-04-18 杭州复杂美科技有限公司 Node connection method, device and storage medium
CN112054928A (en) * 2020-09-02 2020-12-08 杭州复杂美科技有限公司 Parallel chain node configuration method, equipment and storage medium
WO2023143410A1 (en) * 2022-01-28 2023-08-03 索尼集团公司 Dynamic resource sharing

Also Published As

Publication number Publication date
CN111459676B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
US20200195511A1 (en) Network management method and related device
CN110661658B (en) Node management method and device of block chain network and computer storage medium
US20200137151A1 (en) Load balancing engine, client, distributed computing system, and load balancing method
CN111459676B (en) Node resource management method, device and storage medium
WO2021115054A1 (en) Method for adjusting node configuration in cluster system, and server
CN105791254B (en) Network request processing method and device and terminal
EP3661291A1 (en) Method for managing network component, and network device
CN110597918A (en) Account management method and device and computer readable storage medium
CN111338779B (en) Resource allocation method, device, computer equipment and storage medium
CN112698952A (en) Unified management method and device for computing resources, computer equipment and storage medium
CN109547253B (en) File downloading method and device, computer equipment and storage medium
CN114979286A (en) Access control method, device and equipment for container service and computer storage medium
CN109120680B (en) Control system, method and related equipment
CN111382141B (en) Master-slave architecture configuration method, device, equipment and computer readable storage medium
CN112003930A (en) Task allocation method, device, equipment and storage medium
CN109862134B (en) Lease time configuration method and system of IP address and DHCP client
CN107534678B (en) Method, device and system for establishing connection between VNFM and VIM
CN110933192A (en) Local area network IP address allocation method, device, system and computer equipment
CN115220993A (en) Process monitoring method, device, vehicle and storage medium
CN114265699A (en) Task scheduling method and device, electronic device and readable storage medium
CN113504981A (en) Task scheduling method and device, storage medium and electronic equipment
CN111294374B (en) Heterogeneous equipment starting system, method and device and electronic equipment
CN109525675B (en) Northbound server file downloading method and device, computer equipment and storage medium
CN113660353A (en) Method, device, equipment and medium for managing Provisioner address based on Bluetooth Mesh
CN114546631A (en) Task scheduling method, control method, core, electronic device and readable medium

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
TG01 Patent term adjustment