CN112738172B - Block chain node management method and device, computer equipment and storage medium - Google Patents

Block chain node management method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112738172B
CN112738172B CN202011537856.4A CN202011537856A CN112738172B CN 112738172 B CN112738172 B CN 112738172B CN 202011537856 A CN202011537856 A CN 202011537856A CN 112738172 B CN112738172 B CN 112738172B
Authority
CN
China
Prior art keywords
node
nodes
block chain
current block
chain network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011537856.4A
Other languages
Chinese (zh)
Other versions
CN112738172A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011537856.4A priority Critical patent/CN112738172B/en
Publication of CN112738172A publication Critical patent/CN112738172A/en
Priority to PCT/CN2021/097242 priority patent/WO2022134471A1/en
Application granted granted Critical
Publication of CN112738172B publication Critical patent/CN112738172B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1053Group management mechanisms  with pre-configuration of logical or physical connections with a determined number of other peers
    • H04L67/1057Group management mechanisms  with pre-configuration of logical or physical connections with a determined number of other peers involving pre-assessment of levels of reputation of peers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Abstract

The invention relates to a management method, a device, computer equipment and a storage medium of a block chain node, wherein the method comprises the following steps: traversing all nodes in the current block chain network to obtain the time information of the state change of each node; acquiring the time length of each node for joining the current block link network based on the time information of the state change of each node; based on the time length of each node added into the current block chain network, selecting the node with the time length of the node added into the current block chain network meeting the preset condition as a target node, and endowing the target node with a first authority; acquiring historical behavior records of each target node in a current block chain network, and scoring the target nodes based on the historical behavior records; the method updates the first authority of the target node to the second authority based on the scoring result of each target node, and achieves a fine-grained management strategy of the nodes in the block chain network by taking a mode of scoring each expression of the nodes as a basis of authority redistribution.

Description

Block chain node management method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of blockchain technology, and in particular, to a method and an apparatus for managing blockchain nodes, a computer device, and a storage medium.
Background
At present, after a new block chain link point is added into a built block chain network, all permissions are often given to the newly added node, namely, the newly added node can obtain the same treatment as the previously added node in the block chain network, so that unfairness is caused to the previously added node, and the development and the expansion of the block chain network are not facilitated. It can be seen that the blockchain network management mode with or without distinction is too coarse to mobilize the transaction enthusiasm of node members.
Therefore, a need exists for finer grained management of blockchain networks.
Disclosure of Invention
Based on this, it is necessary to provide a method and an apparatus for managing blockchain nodes, a computer device, and a storage medium, for solving the problem that when an existing node joins a blockchain network, the newly joined node can obtain the same treatment as a previously joined node in the blockchain network, and the previously joined node is unfair.
A first aspect provides a method for managing a blockchain node, including:
traversing all nodes in the current block chain network to obtain the time information of the state change of each node;
based on the time information of the state change of each node, obtaining the time length of each node for joining the current block link network;
based on the time length of each node added into the current block chain network, selecting the node with the time length of the node added into the current block chain network meeting a preset condition as a target node, and endowing a first authority to the target node;
acquiring historical behavior records of each target node in a current block chain network, and determining a contribution value of the target node in the current block chain network based on the historical behavior records;
and updating the first authority of each target node into a second authority based on the contribution value of each target node in the current blockchain network, wherein the authority level of the second authority is higher than that of the first authority.
In one embodiment, the traversing all nodes in the current block chain network includes:
setting a priority for traversing all nodes in a current block chain network based on the operation information of the nodes;
and accessing all nodes in the current block chain network according to the priority.
In one embodiment, the obtaining, based on the time information of the state change of each node, a time duration for each node to join the current blockchain network includes:
extracting time information of the nodes joining the current block chain network based on the time information of the state change of each node;
performing randomness verification on the joining time information of the node to identify whether the joining time information is tampered;
carrying out dishonest marking on the tampered node added with the time information;
and comparing the joining time information of each node except the dishonest marked node in the current block chain network with the current system time of the management node in the current block chain network, and determining the time length of each node joining the current block chain network.
In one embodiment, the method further comprises: and if the scoring result of any node in the current block chain network is detected to be smaller than the preset scoring value and/or marked with dishonest confidence, removing the node from the current block chain network.
In one embodiment, the selecting, as the target node, a node having a duration meeting a preset condition for joining the current blockchain network includes:
sequencing all nodes in the current block chain network based on the time length of each node added into the current block chain network;
selecting a preset number of nodes ranked at the head end or the tail end of the ranking result as the target nodes, or selecting the nodes with the duration of adding the current block link network in the ranking result not greater than a preset time threshold as the target nodes;
wherein the time length of any target node joining the current block chain network is less than the time length of other nodes except the target node joining the current block chain network.
In one embodiment, the determining a contribution value of the target node in a current blockchain network based on the historical behavior record includes:
and marking positive or negative scores on the historical behaviors of each target node, accumulating the scoring results of all the historical behaviors of each node to obtain the scoring result of the target node, and determining the contribution value of the target node in the current block chain network according to the scoring result of the target node.
In one embodiment, the method further comprises:
receiving scoring requests of other nodes except the target node in the current block chain network;
taking a node sending a scoring request as a target node, and scoring and marking the node;
determining whether the target node can be used as an alternative management node of the current block chain network based on the marked times of the target node and/or the authority change of the target node.
A second aspect provides a management apparatus for a blockchain node, including:
the node access unit is used for traversing all nodes in the current block chain network to obtain the time information of the state change of each node;
the joining duration calculation unit is used for obtaining the duration of joining each node into the current block link network based on the time information of the state change of each node;
the first permission giving unit is used for selecting a node with the duration meeting preset conditions as a target node based on the duration of each node joining the current block chain network, and giving a first permission to the target node;
the node scoring unit is used for acquiring historical behavior records of each target node in the current blockchain network and determining the contribution value of the target node in the current blockchain network based on the historical behavior records;
and the second authority endowing unit is used for updating the first authority of the target node into a second authority based on the contribution value of each target node in the current blockchain network, wherein the authority level of the second authority is higher than that of the first authority.
A third aspect provides a computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by the processor, cause the processor to carry out the steps of the above-mentioned method of managing blockchain nodes.
A fourth aspect provides a storage medium storing computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the above-described method of managing blockchain nodes.
According to the management method, device, computer equipment and storage medium of the block chain nodes, firstly, the time information of the state change of each node is obtained, and the time length of each node for joining the current block chain network is obtained based on the time information of the state change of each node; then, based on the time length of each node added into the current block chain network, selecting the node with the time length of the node added into the current block chain network meeting the preset condition as a target node, and endowing a first authority to the target node; finally, obtaining historical behavior records of each target node in a current block chain network, and scoring the target nodes based on the historical behavior records; and updating the first authority of the target node to a second authority with higher authority level based on the scoring result of each target node. Therefore, according to the method, a plurality of newly added nodes are selected as target nodes according to the time of the nodes joining the current blockchain network, objects for key observation are carried out, only lower authorities (limited authorities) are distributed to the newly added target nodes, then the authorities of the target nodes with high contribution values are gradually improved according to the contribution values of the target nodes in the blockchain network (namely the authorities of the target nodes are updated to be second authorities from first authorities), namely effective management and assistance on the blockchain network are realized based on the contribution values of the nodes in the current blockchain network, the mode of scoring each performance of the target nodes is used as the basis of authority redistribution, namely higher authorities are distributed to the nodes with higher contribution values, the fine-grained management strategy of the nodes in the blockchain network is realized, and therefore the transaction enthusiasm of the nodes is improved.
Drawings
FIG. 1 is a block diagram showing an internal configuration of a computer device according to an embodiment;
FIG. 2 is a flow diagram of a method for managing block link points in one embodiment;
FIG. 3 is another flow diagram of a method for block link point management in one embodiment;
fig. 4 is a block diagram of a management apparatus of block link points in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first right may be termed a second right, and, similarly, a second right may be termed a second right, without departing from the scope of the present application.
In an implementation environment of the management method for the blockchain nodes provided in one embodiment, the management method comprises a computer device and the blockchain nodes (such as servers). The computer device is a configuration device, for example, a computer device such as a computer, and a dynamic configuration tool of node permissions is installed on the computer device. When configuration is needed, a management request of the blockchain node can be sent to the computer device, and the computer device receives the management request of the blockchain node and dynamically manages the blockchain node. It should be noted that the computer device may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like.
Fig. 1 is a schematic diagram of an internal structure of a computer device according to an embodiment. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The non-volatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions can enable the processor to realize a management method of the block chain nodes when being executed by the processor. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, may cause the processor to perform a method of managing blockchain nodes. The network interface of the computer device is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
As shown in fig. 2, in one embodiment, a method for managing a blockchain node is provided, and the method may include the following steps:
step 201, traversing all nodes in the current block chain network to obtain the time information of the state change of each node.
In this embodiment, the current blockchain network may include, but is not limited to, a federation chain, a public chain, a private chain, and the like. The state of a node may include, but is not limited to, a joining state, a trading state, a pending failure state, and the like. And traversing all nodes in the current block chain network according to a preset time interval to obtain the time information of the state change of each node. The predetermined time interval may be, for example, one day (24h), i.e., each node is traversed once at a fixed time point each day. The state change time information of the node is, for example, the time when the node joins the blockchain network.
Step 202, obtaining the time length of each node joining the current blockchain network based on the time information of the state change of each node.
In this embodiment, time information (or referred to as node generation time) of each node added to the current blockchain network is extracted from the time information of the state change of each node, and the time of each node added to the current blockchain network is compared with the current system time of the management node in the blockchain network (for example, difference processing or time distance calculation processing may be performed) to determine the time duration (the time duration for generating all nodes) of all nodes in the current dynamic blockchain network to add to the current blockchain network, so that the blockchain network addition time attribute of all nodes can be obtained to indicate the relationship between the node and the current blockchain network.
And 203, selecting the nodes with the time length meeting the preset conditions as target nodes based on the time length of each node added into the current block chain network, and endowing the target nodes with a first authority.
In this embodiment, selecting a node with a duration meeting a preset condition to join the current blockchain network as a target node refers to selecting a plurality of newly joined nodes (i.e., nodes with a shorter duration to join the current blockchain network) as objects of key observation (target nodes). The first authority here may be a limited authority, for example, the first authority is an observer authority, and the observer authority generally only has the authority to read accounts, the authority to transport partial blocks and the authority to store basic data, but does not have higher-level authority, and the authority range is narrower.
And 204, acquiring historical behavior records of each target node in the current blockchain network, and determining the contribution value of the target node in the current blockchain network based on the historical behavior records.
In this embodiment, the historical behavior record of the target node in the current blockchain network may include, but is not limited to: how much load is assumed, how much data is transferred, how much storage capacity is provided, etc. The manner of determining the contribution value of the target node in the current blockchain network may include, but is not limited to, transmitting X number of blocks X/10 points for other nodes, performing Y number of transaction queries (to share how many query workloads on the blockchain network) Y/8 points, providing Z number of standard memory blocks for storing data Z points such as shared accounts on the blockchain network, and then calculating a total score of all behavior records of the target node, where the total score corresponds to the contribution value of the target node in the current blockchain network, for example, the higher the total score of all behavior records of the target node is, the larger the contribution value of the target node in the current blockchain network is.
In some embodiments, determining a contribution value of the target node in the current blockchain network based on the historical behavior record may include: and marking positive or negative scores on each historical behavior of each target node, accumulating the scoring results of all the historical behaviors of each node to obtain the scoring result of the target node, and determining the contribution value of the target node in the current block chain network according to the scoring result of the target node.
It can be understood that each target node has a plurality of historical behaviors, each historical behavior is scored respectively, and finally the scoring result of each node is the sum of scores recorded by all the historical behaviors. The negative scoring condition may include that the target node performs a violation transaction once-1, the target node refuses to store the corresponding data once-2, the target node provides a service timeout-1, and the like.
Further, in some embodiments, step 204A is further included for rejecting the target node when the cumulative score of the target node is lower than the minimum threshold. For example, the target node is less in positive score and more in negative score, and when the final score is less than or equal to 0, the node is removed from the dynamic block chain network. Of course, the minimum threshold may also be increased by, for example, 5 points, and the nodes below the minimum threshold are removed, which is helpful to urge each node member to actively participate in the operation of the blockchain network, and warn that no misoperation is required, otherwise the current blockchain network is removed under the condition of no or little or wrong operation, so that the managed blockchain network has stronger vitality and vitality.
And step 205, updating the first authority of the target node to a second authority based on the contribution value of each target node in the current blockchain network, wherein the authority level of the second authority is higher than that of the first authority.
It can be understood that the scoring result of each target node is related to the historical behavior of the target node, and the historical behavior of the node can reflect the contribution value of the node to the current blockchain network, so that the first authority of the target node is updated to the second authority based on the scoring result of each target node, that is, the authority corresponding to the target node is determined according to the contribution value of the target node to the current blockchain.
Therefore, according to the method, a plurality of newly added nodes are selected as target nodes according to the time of the nodes joining the current blockchain network, objects for key observation are carried out, only lower authorities (limited authorities) are distributed to the newly added target nodes, then the authorities of the target nodes with high contribution values are gradually improved according to the contribution values of the target nodes in the blockchain network, namely effective management and assistance of the blockchain network are realized on the basis of the contribution values of the nodes in the current blockchain network, and a mode of scoring various performances of the target nodes is used as the basis of authority redistribution, so that a fine-grained management strategy of the nodes in the blockchain network is realized.
In some modified embodiments of the embodiment of the present application, in order to avoid that the access to the node affects the normal operation of the node, the step 201 of traversing all nodes in the current block chain network may specifically include:
step 2011, setting the priority of traversing nodes based on the operation information of all nodes in the current block link network.
The operation information of the node may include, but is not limited to, whether the node is operating, a runtime load rate, and the like.
Step 2012, access all nodes in the current blockchain network according to priority.
It is understood that the setting rule of the priority may be: the operation information (including whether to operate, the load rate during operation and the like) of each node in each time period is counted, and then the priority is set for each node in each time period according to the counted operation information, such as 1 point-2 points, A \ C \ E \ G \ B, 2 points-3 points C/G/B/E/A, … … and the like. The method comprises the steps of preparing to read the current time during traversal, determining the time period of the current time, and traversing according to the sequence of nodes in the priority by taking the obtained priority of the current time period as a basis, so that the method can access the nodes which are relatively idle firstly and then access the nodes which are busy, and the nodes which are originally busy are possibly relatively idle during later access, so as to access and acquire data in the relative idle time of the nodes to the maximum extent, and therefore, the method can avoid the influence of the access process of the nodes in the block chain network on the normal operation of the nodes as much as possible based on the mode.
In some modification embodiments of the embodiment of the present application, in order to find a node whose joining time information is tampered by the node itself, step 202, obtaining a time length for each node to join in a current block link network based on the time information of the state change of each node, may specifically include:
step 2021, extracting the time information of the node joining the current blockchain network based on the time information of the state change of each node.
The time information of the state change of the node at least comprises the time information of the state change of the node added into the block chain network, so the time information of the node added into the current block chain network can be extracted according to the time information of the state change of the node.
Step 2022, performing randomness verification on the joining time information of the node, and performing dishonest marking on the node with the tampered joining time information.
It is understood that the randomness verification process may include, but is not limited to, separately collecting uplink historical data of nodes adjacent to the node to be verified, and determining whether the node joining time information is tampered according to the uplink historical data of most or all nodes adjacent to the node to be verified based on a node consensus technology, and specifically may include: analyzing the uplink historical data of the node adjacent to the node to be verified, obtaining the joining time consensus information of the current node recorded by the adjacent node according to the analysis result of the uplink historical data, and if most (for example, 95%) of the joining time consensus information is the same as the joining time of the node, proving that the joining time of the node is accurate; otherwise, the node information is confirmed to be tampered. And if the joining time information of a certain node is found to be tampered by the node, marking the node.
Step 2023, comparing the joining time information of each node with the current system time of the management node in the current blockchain network, and determining the time length for joining the node into the current blockchain network.
Further, in some embodiments, after scoring each target node, the scoring result of the node marked as dishonest in step 2022 is modified to zero to represent a penalty for the dishonest node in step 204, and in other embodiments, the method may further include: and directly removing the dishonest node from the dynamic block chain network, and limiting the step that the node cannot be added into the current block chain network within a period of time.
In some modified embodiments of the embodiment of the present application, the step 203 of selecting, as the target node, a node having a duration meeting a preset condition for joining the current blockchain network may include:
step 2031, based on the time length of each node joining the current blockchain network, all nodes in the current blockchain network are sequenced.
In this embodiment, based on the attribute of the adding time of the blockchain network, all nodes in the current blockchain network may be sorted, for example, a first sorting result of all nodes may be formed according to the adding time from long to short, or a second sorting result of all nodes may be formed according to the adding time from short to long, so as to filter the nodes to be processed.
Step 2032, selecting a preset number of nodes ranked at the head end or the tail end of the ranking result as target nodes, or selecting nodes with a duration of adding the current blockchain network in the ranking result not greater than a preset time threshold as target nodes. The time length of any target node added into the current block chain network is less than the time length of other nodes except the target node added into the current block chain network.
In this embodiment, selecting a preset number of nodes ranked at the head end or the tail end of the ranking result as the target node may be to screen a plurality of nodes with shorter joining time from the first ranking result or the second ranking result, for example, screen a plurality of nodes ranked at the back from the first ranking result or screen a plurality of nodes ranked at the front from the second ranking result, and then the present invention can focus on the new joining or the nodes with short joining time.
The node with the time length added to the current blockchain network in the sorting result not greater than the preset time threshold value is selected as the target node, that is, the node with the adding time less than or equal to the threshold value is selected from the first sorting result or the second sorting result, that is, after a certain node is found from the sorting result and is less than the threshold value, the nodes behind the node in the first sorting result are all selected or the nodes in front of the node in the second sorting result are all selected, which is helpful for improving the operation efficiency, and is helpful for realizing the technical scheme provided by the application more quickly under the conditions of more complex blockchain networks and more data.
Further, in some embodiments, step 2031 may further include sequentially numbering the nodes from small to large in order from short to long in time, for example, numbering from 1, and numbering from 2 to 3 … … sequentially, so that in step 203, a plurality of nodes may be directly and quickly intercepted according to the numbers, for example, 10 nodes (numbers 1 to 10) not greater than 10 are directly screened out, and this embodiment may implement quick and efficient determination of a plurality of nodes with short joining time by this way, and has the outstanding advantages of simple algorithm implementation, small occupied resources, very fast execution speed, and the like.
Further, as shown in fig. 3, in order to enable a node in a blockchain network to fairly raise its own right, in some modified embodiments of the embodiment of the present application, a method for managing a blockchain node further includes:
and step 206, receiving scoring requests of other nodes except the target node in the current block chain network.
In this embodiment, nodes that are not screened in step 203 may issue a scoring request, and after receiving the scoring request in step 204, the nodes that issue the scoring request may be included in the target node set, and the nodes that issue the scoring request may be used as target nodes, and determine scores in step 204 together with other screened target nodes, and then assign permissions to the target nodes that issue the requests according to the scores.
And step 207, taking the node which sends the scoring request as a target node, and scoring and marking the node.
And step 208, determining the alternative management node of the current blockchain network based on the marked times of the marked target nodes and/or the authority change of the target nodes.
In this embodiment, in step 207, the nodes that issue the scoring request are recorded and given the identifier a, the change of the authority of the nodes that are given the identifier a is monitored, if the number of times that the nodes are given the identifier a and the number of times that the authority is raised both reach a set value, which may be 8 times, for example, then the nodes are used as elements in a management node candidate set of the blockchain nodes, and when it is necessary to determine the node that is used to manage the whole or part of the blockchain network as an administrator, a suitable node may be selected from the management node candidate set as the management node.
The method is beneficial to improving the activity positivity of the nodes in the block chain network, can promote each node to actively participate in transactions and undertake corresponding tasks so as to improve the self contribution degree, and can obtain corresponding authority according to the contribution degree evaluation result after applying for scoring, so the invention can also provide a scheme for promoting the self authority by the nodes in the block chain.
Further, in some modified embodiments of the present application, step 205 further includes a step of examining behaviors of each target node within a period of time after the current scoring, and then, each target node is scored twice according to an examination result to give a new authority to each target node, and then, step 201 may be returned to. In some embodiments, during this period, which may be one month or two months, for example, the items under consideration may include, but are not limited to, how much load is assumed, how much data is transmitted, how much storage capacity is provided, and the like, each target node is directly scored according to the contribution, i.e., the contribution degree, that the target node makes to the entire blockchain network during this period, and in some embodiments, the contribution degree value may be directly used as the score value.
As shown in fig. 4, in an embodiment, an apparatus for managing a blockchain node is provided, which is capable of implementing effective management and assistance for a blockchain network based on a contribution value of a node in the blockchain network, and the apparatus may specifically include:
the node access unit 411 is configured to traverse all nodes in the current blockchain network to obtain time information of state change of each node;
a join duration calculation unit 412, configured to obtain a duration for each node to join the current blockchain network based on the time information of the state change of each node;
a first authority giving unit 413, configured to select, as a target node, a node whose duration of joining the current blockchain network meets a preset condition based on a duration of joining the current blockchain network by each node, and give a first authority to the target node;
a node scoring unit 414, configured to obtain a historical behavior record of each target node in the current blockchain network, and determine a contribution value of the target node in the current blockchain network based on the historical behavior record;
a second authority giving unit 415, configured to update the first authority of each target node to a second authority based on a contribution value of the target node in the current blockchain network, where an authority level of the second authority is higher than an authority level of the first authority.
In one embodiment, a computer device is proposed, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: traversing all nodes in the current block chain network to obtain the time information of the state change of each node; acquiring the time length of each node for joining the current block link network based on the time information of the state change of each node; based on the time length of each node added into the current block chain network, selecting the node with the time length of the node added into the current block chain network meeting the preset condition as a target node, and endowing the target node with a first authority; acquiring historical behavior records of each target node in a current block chain network, and scoring the target nodes based on the historical behavior records; and updating the first authority of the target node to be the second authority based on the scoring result of each target node.
In one embodiment, the step performed by the processor to traverse all nodes in the current blockchain network comprises: setting the priority of the traversal nodes based on the operation information of all nodes in the current block chain network; all nodes in the current blockchain network are accessed according to the priority.
In one embodiment, the step of obtaining, by the processor, a time duration for each node to join the current blockchain network based on the time information of the state change of each node includes: extracting time information of the nodes added into the current block chain network based on the time information of the state change of each node; performing randomness verification on the joining time information of the node to identify whether the joining time information is tampered; carrying out dishonest marking on the tampered node added with the time information; and comparing the joining time information of each node except the dishonest marked node in the current block chain network with the current system time of the management node in the current block chain network, and determining the time length of each node joining the current block chain network.
In one embodiment, the processor, when executing the computer readable instructions, further performs the steps of: and if the scoring result of any node in the current block chain network is detected to be smaller than the preset scoring value and/or marked with dishonest confidence, removing the node from the current block chain network.
In one embodiment, the step performed by the processor of selecting a node with a duration meeting a preset condition to join the current blockchain network as the target node includes: sequencing all nodes in the current block chain network based on the time length of each node added into the current block chain network; selecting nodes with preset number arranged at the head end or the tail end of the sequencing result as target nodes, or selecting nodes with the time length of the current block chain network added in the sequencing result not greater than a preset time threshold value as the target nodes; the time length of any target node added into the current block chain network is less than the time length of other nodes except the target node added into the current block chain network.
In one embodiment, the scoring the target node based on the historical behavior record performed by the processor comprises: and (4) scoring the historical behaviors of each target node positively or negatively, and accumulating the scoring results of all the historical behaviors of each node to obtain the scoring result of the target node.
In one embodiment, the processor, when executing the computer readable instructions, further performs the steps of: receiving scoring requests of other nodes except the target node in the current block chain network; taking the node sending the scoring request as a target node, and scoring and marking the node; and determining the alternative management node of the current blockchain network based on the marked times of the marked target nodes and/or the authority change of the target nodes.
In one embodiment, a storage medium is provided that stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: traversing all nodes in the current block chain network to obtain the time information of the state change of each node; acquiring the time length of each node for joining the current block link network based on the time information of the state change of each node; based on the time length of each node added into the current block chain network, selecting the node with the time length of the node added into the current block chain network meeting the preset condition as a target node, and endowing the target node with a first authority; acquiring historical behavior records of each target node in a current block chain network, and scoring the target nodes based on the historical behavior records; and updating the first authority of the target node to be the second authority based on the scoring result of each target node.
In one embodiment, the step performed by the processor to traverse all nodes in the current blockchain network comprises: setting the priority of the traversal nodes based on the operation information of all nodes in the current block chain network; all nodes in the current blockchain network are accessed according to the priority.
In one embodiment, the step of obtaining the time length for each node to join the current blockchain network based on the time information of the state change of each node includes: extracting time information of the nodes added into the current block chain network based on the time information of the state change of each node; carrying out randomness verification on the adding time information of the node, and carrying out dishonest marking on the node with the added time information being tampered; and comparing the joining time information of each node with the current system time of the management node in the current block chain network to determine the time length for joining the node into the current block chain network.
In one embodiment, the processor, when executing the computer readable instructions, further performs the steps of: if the node in the current block chain network is detected to meet the preset condition, the node is removed from the current block chain network; wherein the preset conditions include: the scoring result of the node is less than the preset score value and or the node is marked dishonest.
In one embodiment, the step of selecting a node with a duration meeting a preset condition to join the current blockchain network as the target node includes:
sequencing all nodes in the current block chain network based on the time length of each node added into the current block chain network; selecting nodes with preset number arranged at the head end or the tail end of the sequencing result as target nodes, or selecting nodes with the time length of the current block chain network added in the sequencing result not greater than a preset time threshold value as the target nodes; the time length of any target node added into the current block chain network is less than the time length of other nodes except the target node added into the current block chain network.
In one embodiment, the step of scoring the target node based on the historical behavior record comprises: and (4) scoring the historical behaviors of each target node positively or negatively, and accumulating the scoring results of all the historical behaviors of each node to obtain the scoring result of the target node.
In one embodiment, the processor, when executing the computer readable instructions, further performs the steps of: receiving scoring requests of other nodes except the target node in the current block chain network; taking the node sending the scoring request as a target node, and scoring and marking the node; and determining the alternative management node of the current blockchain network based on the marked times of the marked target nodes and/or the authority change of the target nodes.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for managing blockchain nodes, comprising:
traversing all nodes in the current block chain network to obtain the time information of the state change of each node;
based on the time information of the state change of each node, obtaining the time length of each node for joining the current block link network;
based on the time length of each node added into the current block chain network, selecting the node with the time length of the node added into the current block chain network meeting a preset condition as a target node, and endowing a first authority to the target node; wherein the preset conditions include: the time length of the target node added into the current block chain network is not more than a preset time threshold, or the number of the target nodes is not more than a preset number threshold, and the time length of any one target node added into the current block chain network is less than the time length of other nodes except the target node added into the current block chain network;
acquiring historical behavior records of each target node in a current block chain network, and determining a contribution value of the target node in the current block chain network based on the historical behavior records;
and updating the first authority of each target node into a second authority based on the contribution value of each target node in the current blockchain network, wherein the authority level of the second authority is higher than that of the first authority.
2. The method for managing blockchain nodes according to claim 1, wherein the traversing all nodes in the current blockchain network includes:
setting a priority for traversing all nodes in a current block chain network based on the operation information of the nodes;
and accessing all nodes in the current block chain network according to the priority.
3. The method according to claim 1, wherein obtaining a time duration for each node to join the current blockchain network based on the time information of the state change of each node comprises:
extracting time information of the nodes joining the current block chain network based on the time information of the state change of each node;
performing randomness verification on the joining time information of the node to identify whether the joining time information is tampered;
carrying out dishonest marking on the tampered node added with the time information;
and comparing the joining time information of each node except the dishonest marked node in the current block chain network with the current system time of the management node in the current block chain network, and determining the time length of each node joining the current block chain network.
4. A method for managing blockchain nodes according to claim 1 or 3, characterized in that the method further comprises:
and if the scoring result of any node in the current block chain network is detected to be smaller than the preset scoring value and/or marked with dishonest confidence, removing the node from the current block chain network.
5. The method for managing a blockchain node according to claim 1, wherein the selecting a node having a duration satisfying a preset condition for joining the current blockchain network as a target node includes:
sequencing all nodes in the current block chain network based on the time length of each node added into the current block chain network;
selecting a preset number of nodes ranked at the head end or the tail end of the ranking result as the target nodes, or selecting the nodes with the duration of adding the current block link network in the ranking result not greater than a preset time threshold as the target nodes;
wherein the time length of any target node joining the current block chain network is less than the time length of other nodes except the target node joining the current block chain network.
6. The method for managing blockchain nodes according to claim 1, wherein the determining the contribution value of the target node in the current blockchain network based on the historical behavior record comprises:
and marking positive or negative scores on the historical behaviors of each target node, accumulating the scoring results of all the historical behaviors of each node to obtain the scoring result of the target node, and determining the contribution value of the target node in the current block chain network according to the scoring result of the target node.
7. The method for managing blockchain nodes according to claim 1, wherein the method further comprises:
receiving scoring requests of other nodes except the target node in the current block chain network;
taking a node sending a scoring request as a target node, and scoring and marking the node;
determining whether the target node can be used as an alternative management node of the current block chain network based on the marked times of the target node and/or the authority change of the target node.
8. An apparatus for managing blockchain nodes, comprising:
the node access unit is used for traversing all nodes in the current block chain network to obtain the time information of the state change of each node;
the joining duration calculation unit is used for obtaining the duration of joining each node into the current block link network based on the time information of the state change of each node;
the first permission giving unit is used for selecting a node with the duration meeting preset conditions as a target node based on the duration of each node joining the current block chain network, and giving a first permission to the target node; wherein the preset conditions include: the time length of the target node added into the current block chain network is not more than a preset time threshold, or the number of the target nodes is not more than a preset number threshold, and the time length of any one target node added into the current block chain network is less than the time length of other nodes except the target node added into the current block chain network;
the node scoring unit is used for acquiring historical behavior records of each target node in the current blockchain network and determining the contribution value of the target node in the current blockchain network based on the historical behavior records;
and the second authority endowing unit is used for updating the first authority of the target node into a second authority based on the contribution value of each target node in the current blockchain network, wherein the authority level of the second authority is higher than that of the first authority.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to carry out the steps of the method of managing blockchain nodes according to any one of claims 1 to 7.
10. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of managing blockchain nodes of any one of claims 1 to 7.
CN202011537856.4A 2020-12-23 2020-12-23 Block chain node management method and device, computer equipment and storage medium Active CN112738172B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011537856.4A CN112738172B (en) 2020-12-23 2020-12-23 Block chain node management method and device, computer equipment and storage medium
PCT/CN2021/097242 WO2022134471A1 (en) 2020-12-23 2021-05-31 Blockchain node management method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011537856.4A CN112738172B (en) 2020-12-23 2020-12-23 Block chain node management method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112738172A CN112738172A (en) 2021-04-30
CN112738172B true CN112738172B (en) 2022-03-08

Family

ID=75604762

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011537856.4A Active CN112738172B (en) 2020-12-23 2020-12-23 Block chain node management method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112738172B (en)
WO (1) WO2022134471A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738172B (en) * 2020-12-23 2022-03-08 平安科技(深圳)有限公司 Block chain node management method and device, computer equipment and storage medium
CN113259352A (en) * 2021-05-13 2021-08-13 深圳壹账通智能科技有限公司 Block chain node safety monitoring method and device, computer equipment and storage medium
CN117201488A (en) * 2022-05-31 2023-12-08 中国电信股份有限公司 Node management method, device, equipment and storage medium based on block chain
CN116502865A (en) * 2023-06-19 2023-07-28 江西财经大学 Intelligent management method and system for industrial enterprise production

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014135A (en) * 2010-12-03 2011-04-13 北京航空航天大学 Multilayer trust method for resisting selfish behavior in peer-to-peer (P2P) network
WO2019124610A1 (en) * 2017-12-21 2019-06-27 문인식 Authentication method using separation, then distributed storage and combination of personal information using blockchain
CN110490593B (en) * 2018-08-29 2022-04-19 华中科技大学 Block chain consensus method and system based on storage contribution value
GB2579635A (en) * 2018-12-07 2020-07-01 Dragon Infosec Ltd A node testing method and apparatus for a blockchain system
CN110533286B (en) * 2019-07-23 2023-04-18 平安科技(深圳)有限公司 Block chain-based coalition member management method and device and computer equipment
CN110493323B (en) * 2019-07-29 2020-12-01 华南理工大学 Block chain-based fairness file distribution method, system and storage medium
CN110427433B (en) * 2019-08-08 2023-04-07 上海中通吉网络技术有限公司 Block chain consensus method and storage medium
CN110502578A (en) * 2019-08-16 2019-11-26 江苏链路区块链技术有限公司 A kind of common recognition mechanism of rapid data cochain
CN110955721B (en) * 2019-10-23 2022-12-06 金蝶软件(中国)有限公司 Block link point state maintenance method and device, computer equipment and storage medium
CN111127206B (en) * 2019-12-25 2021-04-16 中国银联股份有限公司 Block chain data access control method and device based on intelligent contract
CN111818181B (en) * 2020-08-31 2020-12-08 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and computer readable storage medium
CN112737916B (en) * 2020-11-23 2022-01-07 腾讯科技(深圳)有限公司 Data processing method based on block chain network and related device
CN112738172B (en) * 2020-12-23 2022-03-08 平安科技(深圳)有限公司 Block chain node management method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
WO2022134471A1 (en) 2022-06-30
CN112738172A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN112738172B (en) Block chain node management method and device, computer equipment and storage medium
CN110611701B (en) Parameter configuration and transaction processing method based on block chain
CN108897628A (en) A kind of implementation method of distributed lock, device and electronic equipment
CN109117994B (en) Event prediction method and device and electronic equipment
US20210216527A1 (en) Parallel blockchain processing
CN105991596B (en) Access control method and system
CN107657357B (en) Data processing method and device
CN107451152B (en) Computing device, data caching and searching method and device
CN111694843A (en) Missing number detection method and device, electronic equipment and storage medium
CN115329011A (en) Data model construction method, data query method, data model construction device and data query device, and storage medium
CN111125747A (en) Commodity browsing privacy protection method and system for commercial website user
JPH0535484A (en) Fault diagnostic method
Zhang et al. Mac: A probabilistic framework for query answering with machine-crowd collaboration
US20230050048A1 (en) Isolating And Reinstating Nodes In A Distributed Ledger Using Proof Of Innocence
CN115907949A (en) Bank transaction data processing method and device
CN111201751A (en) Method and system for arbitrating data authenticity in blockchain
CN111352924B (en) Method and device for solving data inclination problem
CN108255710A (en) The method for detecting abnormality and its terminal of a kind of script
CN109636389B (en) Method, device, equipment and storage medium for determining block chaining-out time
CN112651820A (en) Case information processing method and device, server and storage medium
CN111209330A (en) Method and system for identifying consistent actor
Skiba et al. Abstract argumentation frameworks with fallible evidence
CN111583037B (en) Method and device for determining risk associated object and server
CN104657507A (en) Distributed system-based mode detection method and device of image data
CN111818107B (en) Network request response method, device, equipment and readable storage 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