CN112328694A - Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium - Google Patents

Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium Download PDF

Info

Publication number
CN112328694A
CN112328694A CN202011280622.6A CN202011280622A CN112328694A CN 112328694 A CN112328694 A CN 112328694A CN 202011280622 A CN202011280622 A CN 202011280622A CN 112328694 A CN112328694 A CN 112328694A
Authority
CN
China
Prior art keywords
node
trust
nodes
block chain
adjusting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011280622.6A
Other languages
Chinese (zh)
Inventor
代健武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202011280622.6A priority Critical patent/CN112328694A/en
Publication of CN112328694A publication Critical patent/CN112328694A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/602Providing cryptographic facilities or services
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a device for adjusting the trust degree of nodes in a block chain, an electron and a storage medium, wherein the method comprises the following steps: when it is monitored that a new node is added in the current block chain network, distributing initial trust to the new node based on the time length of the new node added in the current block chain; acquiring multiple items of performance data corresponding to each node including a new node in a current block chain network; normalizing the multiple items of performance data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes; calculating a trust regulation value of each node based on multiple evaluation factors corresponding to each node; and adjusting the trust degree of each node according to the trust adjusting value of each node. Therefore, by adopting the embodiment of the application, the block chain nodes on the block chain network are autonomously managed by introducing the trust degree adjusting mechanism, so that subjectivity and centralization caused by manual management are avoided, and the reliability of the block chain network is further improved.

Description

Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of block chains, in particular to a method and a device for adjusting the trust degree of nodes in a block chain, an electronic device and a storage medium.
Background
Since the advent of the bitcoin system in 2009, which brought many innovations in computer science and electronic cash, decentralized cryptocurrency, represented by bitcoin and its derived competitive coins, received a great deal of attention. The currency system is characterized in that a distributed shared general ledger is constructed based on a block chain, so that the safety, reliability and decentralization characteristics of system operation are guaranteed. For the blockchain, how to prevent the ledger from being tampered, and how to ensure the data consistency among the nodes are all problems that need to be solved when the blockchain establishes the decentralized transaction, so that a consensus mechanism is generated.
At present, the consensus mechanism still needs to rely on an administrator to manage each node of the blockchain, and the administrator grasps the condition of each node and evaluates the condition of each node, and the evaluation result can include but is not limited to whether the node can be completely trusted, authority assignment is performed for the related node, whether the node should be kept in the current blockchain network, and the like. However, for users of each node, the current node management mode of the block chain is inevitably affected by subjective factors such as personal conditions, experience ability and the like of an administrator, and real fairness and reasonableness cannot be achieved; particularly, the trust level of a node is directly related to the transaction range, authority distribution and the like of an unfamiliar node, so that the existing scheme needs to be improved urgently.
Disclosure of Invention
Based on this, it is necessary to provide a method and an apparatus for adjusting trust of nodes in a blockchain, an electronic device, and a storage medium, for solving the problem of how to fairly determine and then satisfy the requirement of users of all nodes on network management of the blockchain.
A method for adjusting the trust level of a node in a blockchain comprises the following steps: when it is monitored that a target node is added in a current block chain network, allocating initial trust to the target node based on the time length of the target node added in the current block chain network; acquiring multiple items of performance data corresponding to each node including the target node in the current block chain network; normalizing the multiple items of performance data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes; calculating a trust regulation value of each node based on multiple evaluation factors corresponding to each node; and adjusting the trust degree of each node according to the trust adjusting value of each node.
In one embodiment, after the adjusting the trust level of each node according to the trust adjustment value of each node, the method further includes: and after the adjusted trust degrees of the nodes are arranged in a descending order or an ascending order, generating a trust degree evaluation list of the nodes.
In one embodiment, the assigning an initial trust level to the target node based on a duration of time for which the target node joined the current blockchain network includes: calculating the time length of the target node joining the current block chain network in real time; when the time length of joining the current block chain network is greater than a preset threshold value, generating an initial trust degree according to performance parameters carried by the target node; assigning the initial trust level to the target node.
In one embodiment, the obtaining multiple items of performance data corresponding to nodes including the target node in the current blockchain network includes: determining the connection relation among all nodes including the target node in the current block chain network; constructing a node graph based on the connection relation among all nodes including the target node; acquiring the priority corresponding to the connection path of each node in the node graph, and determining the optimal connection path based on the high-low sequence of the priority; and traversing a plurality of items of performance condition data corresponding to each node on the optimal connection path one by one based on the optimal connection path.
In one embodiment, the obtaining the priority corresponding to the connection path of each node in the node map includes: selecting a certain node from each node in the node graph as a starting point, and constructing a plurality of connecting paths between the selected certain node and other nodes; calculating the time length required by the traversal of the plurality of connecting paths; and determining the priority corresponding to the connection path of each node based on the time required by the traversal of the plurality of connection paths.
In one embodiment, before performing normalization processing on the multiple items of performance data corresponding to the nodes, the method further includes: and screening the multiple items of performance condition data corresponding to the nodes to generate the screened multiple items of performance condition data corresponding to the nodes.
In one embodiment, the calculating the trust adjustment value of each node based on the multiple evaluation factors corresponding to each node includes: calculating the weight values of various evaluation factors corresponding to each node; multiplying the calculated weight values of the multiple evaluation factors corresponding to each node by the evaluation factors to which the weight values belong, and then summing the weighted values to generate a trust regulation value of each node; or adding the multiple evaluation factors corresponding to each node to generate the trust adjustment value of each node.
An apparatus for adjusting trust of nodes in a blockchain, the apparatus comprising: the initial trust degree distribution module is used for distributing initial trust degrees to the target nodes based on the time length of the target nodes added into the current block chain network after monitoring that the target nodes are added into the current block chain network; the performance data acquisition module is used for acquiring a plurality of performance data corresponding to each node including the target node in the current block chain network; the evaluation factor generation module is used for carrying out normalization processing on the multiple items of performance condition data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes; the trust adjusting value calculating module is used for calculating the trust adjusting value of each node based on the multiple evaluation factors corresponding to each node; and the trust degree adjusting module is used for adjusting the trust degree of each node according to the trust adjusting value of each node.
An electronic device comprising a memory and a processor, wherein the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to perform the steps of the above method for adjusting trust level of a node in a blockchain.
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 method for adjusting trust of nodes in a blockchain.
According to the method, the device, the electronics and the storage medium for adjusting the node trust degree in the block chain, firstly, after a new node is added in a current block chain network, the device for adjusting the node trust degree in the block chain allocates an initial trust degree to the new node based on the time length for adding the new node into the current block chain, then obtains multiple items of performance condition data corresponding to each node including the new node in the current block chain network, then performs normalization processing on the multiple items of performance condition data corresponding to each node to generate multiple evaluation factors corresponding to each node, then calculates the trust adjustment value of each node based on the multiple evaluation factors corresponding to each node, and finally adjusts the trust degree of each node according to the trust adjustment value of each node. By introducing the trust degree adjusting mechanism, when a new node is added into the current block chain network, the trust degree of each node including the new node is adjusted again, the block chain nodes on the block chain network can be managed autonomously, active activity of each block chain is promoted, subjectivity and centralization caused by manual management are avoided, and the trust degree of the block chain network is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is an implementation environment diagram of a method for adjusting trust of nodes in a blockchain according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an electronic internal structure according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a method for adjusting the trust level of a node in a blockchain according to an embodiment of the present application;
FIG. 4 is a block chain network node state diagram provided in an embodiment of the present application;
fig. 5 is a schematic diagram illustrating another method for adjusting the trust level of a node in a blockchain according to an embodiment of the present application;
fig. 6 is a schematic diagram of an apparatus for adjusting trust of nodes in a blockchain according to an embodiment of the present disclosure;
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.
Fig. 1 is a diagram of an implementation environment of a method for adjusting trust levels of nodes in a blockchain according to an embodiment, as shown in fig. 1, in the implementation environment, including a server 110 and a blockchain 120.
The server 110 is a server device, for example, a server device for adjusting trust of a node in a blockchain, and the server 110 is installed with a tool for adjusting trust of a node in a blockchain. The block chain 120 is provided with a plurality of nodes formed by peer-to-peer network connection, and is used for respectively storing blocks including recorded data, and linking the blocks to form a block chain, when the trust level of a node in the block chain needs to be adjusted, the server 110 firstly allocates an initial trust level to a target node based on the time length for adding the target node into a current block chain network after monitoring that the target node is added into the current block chain network, the server 110 then acquires a plurality of items of performance condition data corresponding to each node including the target node in the current block chain network, the server 110 then normalizes the plurality of items of performance condition data corresponding to each node to generate a plurality of evaluation factors corresponding to each node, and the server 110 then calculates the trust adjustment value of each node based on the plurality of evaluation factors corresponding to each node, the server 110 finally adjusts the trust level of each node according to the trust adjustment value of each node.
It should be noted that the server 110 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The server 110 and the blockchain 120 may be connected through bluetooth, USB (Universal Serial Bus), or other communication connection methods, which is not limited herein.
FIG. 2 is a schematic diagram of an internal structure of an electron according to an embodiment. As shown in fig. 2, the electronics include a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The electronic nonvolatile storage medium stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions, when executed by the processor, can enable the processor to realize a method for adjusting the trust degree of the nodes in the block chain. The electronic processor is used to provide computational and control capabilities to support the operation of the entire electronic system. The electronic memory may have computer readable instructions stored thereon that, when executed by the processor, cause the processor to perform a method for adjusting trust levels of nodes in a blockchain. The electronic network interface is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the structure shown in fig. 2 is a block diagram of only a portion of the structure associated with the present application and does not constitute a limitation on the electronics to which the present application applies, and that a particular electronics may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
The method for adjusting the trust level of a node in a blockchain according to the embodiment of the present application will be described in detail below with reference to fig. 3 to 5. The method may be implemented in dependence on a computer program, operable on a device for adjusting trust of nodes in a blockchain based on von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Please refer to fig. 3, which provides a flowchart of a method for adjusting trust of nodes in a blockchain according to an embodiment of the present disclosure. As shown in fig. 3, the method of the embodiment of the present application may include the following steps:
s101, when it is monitored that a target node is added in a current block chain network, distributing initial trust to the target node based on the time length of the target node added in the current block chain network;
the block chain is a shared database, and the data or information stored in the shared database has the characteristics of unforgeability, whole-course trace, traceability, public transparency, collective maintenance and the like. The target node is a new node joining the current blockchain network. The initial trust level is generated according to the storage provided by the new node and the capacity of the transport block.
Generally, a node newly added to a current block chain network has no initial trust, and in order to ensure that the new node does not enter from a starting point of maliciously destroying the current block chain network, the initial trust needs to be allocated to the new node while the total number of nodes in a block chain is more stably increased under the condition of effectively protecting the security of the block chain.
In the embodiment of the application, when the node trust degree adjusting device in the block chain is used for updating, the device firstly monitors whether a new node is added into a current block chain network or not in real time, when the new node is added into the current block chain network, then calculates the time length for the new node to be added into the current block chain network in real time, when the time length for the new node to be added into the current block chain network is larger than a preset threshold parameter, generates an initial trust degree according to a performance parameter carried by a target node, and finally distributes the generated initial trust degree to the new node. For example, the preset threshold parameter may be 12 hours, 24 hours, or one week, and the specific time period setting is set by itself according to the actual scene, which is not limited herein.
In one possible implementation, the initial trust level is assigned to the new node after the new node joins the first set time. For example, an initial trust level may be assigned to a new node 24 hours after the new node joins. The range of the trust level in some embodiments of the present application may be, for example, an integer from 1 to 10, and the initial trust level assigned to the new node may be 3 or 4 according to the performance of the new node, for example, the new node may provide a larger storage amount and may have the capability of transporting more blocks, the initial trust level assigned to the new node may be 4, and if the performance of each aspect of the new node is relatively general, the initial trust level assigned to the new node may be 3.
Therefore, the initial trust level is generally a value with a medium degree of deviation, which not only can meet the basic requirement that the new node is trusted by other nodes to promote transaction and development, but also can avoid giving the node an excessively high trust level (if the trust level is 8-10, the trust level can be considered as high trust level, if the trust level is 5-7, the trust level can be considered as medium trust level, and if the trust level is 1-4, the trust level can be considered as low trust level), prevent the node from entering from the starting point of maliciously damaging the block chain, and further stably increase the total number of the nodes in the block chain under the condition of effectively protecting the safety of the block chain.
Further, within the preset threshold parameter time, voting for a new node joining the current blockchain network based on nodes already existing in the blockchain may be further included, and then, whether the new node is left or not may be determined according to a voting result. The method specifically includes two cases of reserving the new node or deleting the new node. In some embodiments of the present application, the voting result may be, for example, a voting rate, a voting amount, and the like, and the determination condition may be, for example: the new node is left when the voting rate exceeds 60%, otherwise, the new node is deleted, and the new node can also be left when the voting amount exceeds a first set amount (for example, 50), otherwise, the node is deleted. The present invention does not limit the specific determination condition, and other determination methods may be adopted on the basis of some embodiments of the present invention.
S102, acquiring multiple items of performance data corresponding to each node including the target node in the current block chain network;
the multiple items of performance data are performance parameters of each node in the current block chain network, such as how many times of block voting is participated, how many times of voting are different from the final block voting result, the number of times of transaction submission (for determining the liveness of the transaction), how many blocks are transmitted for other nodes/within a period of time, how many times of inquiry transaction is executed, how much storage space for a shared account of the memory block chain is provided for the whole block chain, the time for joining the current block chain, the historical trust evaluation trend, the comprehensive evaluation score provided by other nodes for the node, and the like.
In this embodiment of the present application, after the initial trust level is assigned to the new node based on step S101, all nodes in the blockchain network including the new node are traversed, and multiple items of performance data of each node are respectively obtained when each node is accessed in a traversal manner.
In general, the manner of traversing all nodes in a blockchain network may include, but is not limited to: and generating a node graph structure by using the connection relation among the nodes, and traversing the block chain network in a mode of traversing the node graph structure. The Graph structure (Graph) is a discrete structure formed by vertexes and edges connecting the vertexes, the vertexes in the Graph structure are used as nodes in the Graph structure, and the edges connecting the nodes represent the adjacent relation of the two nodes. The graph structure of the invention can be an undirected graph, and the traversal flow adopts an undirected graph traversal flow.
In a possible implementation manner, firstly, the connection relationship between nodes including a target node in a current block chain network is determined, then a node graph is constructed based on the connection relationship between the nodes including the target node, then the priority corresponding to the connection path of each node in the node graph is obtained, an optimal connection path is determined based on the high-low sequence of the priority, and finally, a plurality of items of performance data corresponding to each node on the optimal connection path are traversed one by one based on the optimal connection path.
Further, when the priority corresponding to the connection path of each node in the node map is obtained, a certain node is selected from each node in the node map as a starting point, a plurality of connection paths between the selected certain node and other nodes are constructed, the time length required by traversal of the plurality of connection paths is calculated, and finally the priority corresponding to the connection path of each node is determined based on the time length required by traversal of the plurality of connection paths.
For example, starting from any node in the node map, all nodes may be passed through one by one along the path, so that it may be known that there are multiple selectable paths, for example, paths formed between nodes in the block chain network shown in fig. 4. The method has the advantages that the node with low trust degree is easy to kick out the block chain, and the node with low trust degree is traversed in each traversal, so that the node can be prevented from being traversed if the node is kicked out before the traversal; moreover, the mode is also favorable for reducing the occurrence of the situation that a certain node is kicked out of the current block chain after being traversed, and further reducing the probability of the occurrence of the situation that the node needs to be traversed again because the node is kicked out.
S103, normalizing the multiple items of performance data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes;
wherein, the normalization processing is to perform normalization calculation through a normalization function. The plurality of evaluation factors correspond to the plurality of pieces of performance data of each node one to one, and are data evaluation results generated by the performance data.
Generally, when processing multiple items of performance data corresponding to each node through a normalization function, the processing procedure includes: scaling down the value of the performance data, scaling up the value of the performance data, outputting the normalization result after the value of the performance data is used as the input of a setting function (for example, the value can be scaled down after calculation of a multi-root), and the like. More specifically, some embodiments of the present invention may convert all performance data values to values between [ -0.1,0.1], i.e., -0.1 ≦ 0.1 for the normalized result.
In some embodiments of the present invention, the normalization processing method is used to change all the performance data into a relative value relationship, so as to achieve the technical purposes of reducing the numerical gap and simplifying the calculation.
In a possible implementation manner, after obtaining the multiple items of performance condition data of each node in the current block chain network based on step S102, the evaluation factors corresponding to the multiple items of performance condition data corresponding to each node are calculated by using a normalization function, and finally, multiple evaluation factors corresponding to each node are generated.
In another possible implementation manner, before normalization processing is performed on multiple items of performance condition data, preprocessing needs to be performed on the multiple items of performance condition data of each node, then, evaluation factors corresponding to the multiple items of performance condition data one to one are calculated through a normalization function, and finally, multiple evaluation factors corresponding to each node are generated. Wherein, the multiple evaluation factor parameters are the values between [ -0.1,0.1] obtained by calculating the multiple expression data corresponding to each node through the normalization function, namely, the value of the normalization result is less than or equal to-0.1 and less than or equal to 0.1. For example, the pieces of performance data corresponding to a certain node are parameter 1, parameter 2, parameter 3, parameter 4, …, and parameter n, and after processing parameters 1 to n by a normalization function, the evaluation factor of parameter 1 is 0.03, the evaluation factor of parameter 2 is-0.09, the evaluation factor of parameter 3 is 0.07, and the evaluation factor of parameter 4 is 0.
Specifically, when the performance data of each node is preprocessed, the multiple items of performance data corresponding to each node are screened, and the multiple items of performance data corresponding to each screened node are generated, wherein the screening process includes, but is not limited to, a data filtering process, a data standardization process, and the like. Wherein, the data filtering process may include: screening the numerical values of the various performance condition data, filtering or modifying the numerical values which do not meet the requirements into default values (which can be zero), wherein the screening mode can be, for example, comparing the numerical values of the various performance condition data with a corresponding preset numerical value range, if the numerical values are in the corresponding preset numerical value range, the data need to be reserved, otherwise, the numerical values are modified into the default values; the data normalization process may include: different units of different nodes are unified into the same unit, and the same unit can be a preset standard unit or a unit used by a certain node, for example, the average block/month of block transportation conditions of some nodes is standardized into an average block/day, and the like.
S104, calculating the trust adjusting value of each node based on the multiple evaluation factors corresponding to each node;
wherein, the trust degree adjusting value is used for automatically raising or lowering the trust degree of each node.
Generally, the trust of each node is automatically raised or lowered through the trust adjusting value to realize the autonomous management of the trust of the node, and the enthusiasm of each node in the block chain network to participate in activities such as transaction, voting and the like in the block chain is greatly stimulated, so that the block chain is favorably developed while subjective management and centralized management are avoided, and the number of the nodes of the block chain is favorably expanded.
In the embodiment of the present application, some embodiments of the present invention calculate the final trust adjustment value based on each weight, and the specific calculation manner is as follows. R ═ α 1 × f1+ α 2 × f2+ … … α n × fn, where R denotes a trust adjustment value, f1 denotes a first evaluation factor, f2 denotes a second evaluation factor, fn denotes an nth evaluation factor, n denotes the number of evaluation factors, α 1 denotes a weight corresponding to the first evaluation factor, α 2 denotes a weight corresponding to the second evaluation factor, and α n denotes a weight corresponding to the nth evaluation factor.
In a possible implementation manner, the trust adjustment values of all nodes in the blockchain nodes are correspondingly calculated based on multiple evaluation factors of each node, so that the trust adjustment values of each node are automatically raised or lowered, when the trust adjustment value in the current blockchain network is calculated, the weight values of the multiple evaluation factors corresponding to each node are firstly calculated, then the calculated weight values of the multiple evaluation factors corresponding to each node are multiplied by the evaluation factors to which the weight values belong, and then the sum is carried out, and finally the trust adjustment value of each node is generated.
In another possible implementation manner, in the step of directly adding the evaluation factors (including a positive number or a negative number) when calculating the trust adjustment value in the current blockchain network, the sum obtained by calculation may be used as the trust adjustment value. R ═ f1+ f2+ … … fn, where R denotes the confidence adjustment value, f1 denotes the first evaluation factor, f2 denotes the second evaluation factor, fn denotes the nth evaluation factor, and n denotes the number of evaluation factors.
And S105, adjusting the trust degree of each node according to the trust adjusting value of each node.
In a possible implementation manner, after obtaining the trust degree adjustment value of each node based on step S104, the trust degree of each node may be adjusted according to the obtained trust degree adjustment value of each node, for example, if the original trust degree value of a certain node is 7, the trust adjustment value is-1.2, the new trust degree is 6 (the result may be rounded), and if the original trust degree of a certain node is 2, but the trust adjustment value is +5.2, the new trust degree is 7 (the result may be rounded); therefore, the invention can dynamically adjust the trust level of the nodes in the blockchain network in the manner described above, and the trust level can be widely changed (for example, the trust level is originally less than 5 and is greater than 5 after evaluation, or the trust adjustment value is greater than 5). In view of the above, the invention provides a node trust evaluation system that is independent of the awareness, subjectivity and experience of the administrator, and the evaluation method is helpful for stimulating the nodes to actively participate in the activity of the block chain, so as to realize the autonomous and decentralized management of the nodes in the block chain, actively and actively contribute to the development of the block chain, and make the overall activity of the block chain higher.
And further, after the adjusted trust degrees of the nodes are arranged in a descending order or an ascending order, a trust degree evaluation list of the nodes is generated. And generating a trust degree evaluation list based on the obtained trust degree of each node, wherein each node can be listed in sequence from high to low or from low to high according to the trust degree in the evaluation list so as to make the trust degree distribution of the nodes clearer. More specifically, the evaluation list has a plurality of columns, the trust degrees of all the nodes in each column are in the same range, the nodes in each column can be used for respectively representing a set, and the trust degrees of all the nodes in the set are in the same level.
Further, when any node in the front-zone block chain network needs to establish new contact with other nodes, the node in the same column can be recommended preferably, so that the nodes can obtain the recognition of each other and long-term cooperation more easily; if no suitable node is recommended in the nodes in the same fence or the nodes in the same fence are previously associated with the node, the nodes in the adjacent fence where the nodes are located are preferably recommended, so that the difference between the nodes to be associated is reduced as much as possible in the trust degree aspect.
In the embodiment of the application, a node trust degree adjusting device in a block chain firstly allocates initial trust degrees to new nodes based on the time length for adding the new nodes into a current block chain after monitoring that the new nodes are added into the current block chain network, then acquires multiple items of performance condition data corresponding to the nodes including the new nodes in the current block chain network, then performs normalization processing on the multiple items of performance condition data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes, then calculates trust adjusting values of the nodes based on the multiple evaluation factors corresponding to the nodes, and finally adjusts the trust degrees of the nodes according to the trust adjusting values of the nodes. By introducing the trust degree adjusting mechanism, when a new node is added into the current block chain network, the trust degree of each node including the new node is adjusted again, the block chain nodes on the block chain network can be managed autonomously, active activity of each block chain is promoted, subjectivity and centralization caused by manual management are avoided, and the trust degree of the block chain network is further improved.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating another method for adjusting the trust level of a node in a blockchain according to an embodiment of the present disclosure. As shown in fig. 5, the method of the embodiment of the present application may include the following steps:
s201, when it is monitored that a target node is added in a current block chain network, calculating the time length of the target node added in the current block chain network in real time;
s202, when the time length of joining the current block chain network is greater than a preset threshold value, generating an initial trust level according to performance parameters carried by the target node;
s203, distributing the initial trust degree to the target node;
s204, determining the connection relation among all nodes including the target node in the current block chain network;
s205, constructing a node graph based on the connection relation among all nodes including the target node;
in general, a Graph structure (Graph) of a node Graph is a structure Graph of a discrete structure composed of vertices and edges connecting the vertices. In the invention, the vertex in the graph structure is taken as a node, and the edge connecting the nodes represents the adjacent relation of the two nodes. The graph structure of the present invention may be an undirected graph.
When a node graph is constructed, firstly, the connection relationship between nodes including a target node is determined, the connection relationship can be that when a certain node in a current block chain obtains the approval of another node and the long-term cooperation duration, when the cooperation duration is longer, the higher the trust degree of the another node and the certain node is, the nodes can be connected preferentially, the nodes in the block chain can be continuously traversed and connected by the mode, and finally, the node graph is generated.
S206, acquiring the priority corresponding to the connection path of each node in the node graph, and determining the optimal connection path based on the high-low sequence of the priority;
s207, traversing multiple items of performance data corresponding to each node on the optimal connection path one by one based on the optimal connection path;
s208, screening the multiple items of performance condition data corresponding to the nodes to generate the screened multiple items of performance condition data corresponding to the nodes;
generally, screening the values of the performance condition data includes filtering or modifying the unsatisfactory values to a default value (which may be zero), for example, comparing the values of the performance condition data with a corresponding preset value range, if the values are within the corresponding preset value range, the data need to be retained, otherwise, modifying the values to the default value.
S209, carrying out normalization processing on the screened multiple items of performance data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes;
s210, calculating the weight values of the multiple evaluation factors corresponding to the nodes, multiplying the calculated weight values of the multiple evaluation factors corresponding to the nodes with the evaluation factors to which the weight values belong, and then summing the weighted values to generate the trust regulation values of the nodes;
s211, adjusting the trust degree of each node according to the trust adjusting value of each node;
s212, after the adjusted trust degrees of the nodes are arranged in a descending order or an ascending order, a trust degree evaluation list of the nodes is generated.
In the embodiment of the application, a node trust degree adjusting device in a block chain firstly allocates initial trust degrees to new nodes based on the time length for adding the new nodes into a current block chain after monitoring that the new nodes are added into the current block chain network, then acquires multiple items of performance condition data corresponding to the nodes including the new nodes in the current block chain network, then performs normalization processing on the multiple items of performance condition data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes, then calculates trust adjusting values of the nodes based on the multiple evaluation factors corresponding to the nodes, and finally adjusts the trust degrees of the nodes according to the trust adjusting values of the nodes. By introducing the trust degree adjusting mechanism, when a new node is added into the current block chain network, the trust degree of each node including the new node is adjusted again, the block chain nodes on the block chain network can be managed autonomously, active activity of each block chain is promoted, subjectivity and centralization caused by manual management are avoided, and the trust degree of the block chain network is further improved.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Please refer to fig. 6, which illustrates a schematic structural diagram of a device for adjusting trust level of a node in a blockchain according to an exemplary embodiment of the present invention, applied to a server. The system for adjusting the trust level of the nodes in the blockchain can be realized by software, hardware or a combination of the software and the hardware to be all or part of electronics. The device 1 comprises an initial trust degree distribution module 10, a performance data acquisition module 20, an evaluation factor generation module 30, a trust regulation value calculation module 40 and a trust degree regulation module 50.
An initial trust level allocation module 10, configured to, after it is monitored that a target node is added to a current block chain network, allocate an initial trust level to the target node based on a duration for the target node to join the current block chain network;
an expression data obtaining module 20, configured to obtain multiple items of expression data corresponding to each node in the current blockchain network, including the target node;
an evaluation factor generation module 30, configured to perform normalization processing on the multiple items of performance data corresponding to the nodes, and generate multiple evaluation factors corresponding to the nodes;
a trust adjusting value calculating module 40, configured to calculate a trust adjusting value of each node based on multiple evaluation factors corresponding to each node;
and the trust degree adjusting module 50 is used for adjusting the trust degree of each node according to the trust adjusting value of each node.
It should be noted that, when the system for adjusting the trust level of a node in a blockchain provided in the foregoing embodiment executes the method for adjusting the trust level of a node in a blockchain, the division of each functional module is merely used for example, and in practical applications, the functions may be allocated to different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the system for adjusting the trust level of the node in the blockchain and the method for adjusting the trust level of the node in the blockchain provided by the embodiments belong to the same concept, and details of implementation processes are found in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the embodiment of the application, a node trust degree adjusting device in a block chain firstly allocates initial trust degrees to new nodes based on the time length for adding the new nodes into a current block chain after monitoring that the new nodes are added into the current block chain network, then acquires multiple items of performance condition data corresponding to the nodes including the new nodes in the current block chain network, then performs normalization processing on the multiple items of performance condition data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes, then calculates trust adjusting values of the nodes based on the multiple evaluation factors corresponding to the nodes, and finally adjusts the trust degrees of the nodes according to the trust adjusting values of the nodes. By introducing the trust degree adjusting mechanism, when a new node is added into the current block chain network, the trust degree of each node including the new node is adjusted again, the block chain nodes on the block chain network can be managed autonomously, active activity of each block chain is promoted, subjectivity and centralization caused by manual management are avoided, and the trust degree of the block chain network is further improved.
In one embodiment, an electronic device is provided, the electronic 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: when it is monitored that a target node is added in a current block chain network, allocating initial trust to the target node based on the time length of the target node added in the current block chain network; acquiring multiple items of performance data corresponding to each node including the target node in the current block chain network; normalizing the multiple items of performance data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes; calculating a trust regulation value of each node based on multiple evaluation factors corresponding to each node; and adjusting the trust degree of each node according to the trust adjusting value of each node.
In one embodiment, after the processor performs the adjustment of the trust level of each node according to the trust adjustment value of each node, the processor further performs the following steps: and after the adjusted trust degrees of the nodes are arranged in a descending order or an ascending order, generating a trust degree evaluation list of the nodes.
In one embodiment, when the processor performs the assignment of the initial trust level to the target node based on the time duration for the target node to join the current blockchain network, specifically, the following steps are performed: calculating the time length of the target node joining the current block chain network in real time; when the time length of joining the current block chain network is greater than a preset threshold value, generating an initial trust degree according to performance parameters carried by the target node; assigning the initial trust level to the target node.
In one embodiment, when the processor performs the step of acquiring multiple items of performance data corresponding to each node including the target node in the current blockchain network, the processor specifically performs the following steps: determining the connection relation among all nodes including the target node in the current block chain network; constructing a node graph based on the connection relation among all nodes including the target node; acquiring the priority corresponding to the connection path of each node in the node graph, and determining the optimal connection path based on the high-low sequence of the priority; and traversing a plurality of items of performance condition data corresponding to each node on the optimal connection path one by one based on the optimal connection path.
In an embodiment, when the processor performs acquiring the priority corresponding to the connection path of each node in the node map, the processor specifically performs the following steps: selecting a certain node from each node in the node graph as a starting point, and constructing a plurality of connecting paths between the selected certain node and other nodes; calculating the time length required by the traversal of the plurality of connecting paths; and determining the priority corresponding to the connection path of each node based on the time required by the traversal of the plurality of connection paths.
In one embodiment, before performing the normalization process on the multiple items of performance data corresponding to the nodes, the processor further performs the following steps: and screening the multiple items of performance condition data corresponding to the nodes to generate the screened multiple items of performance condition data corresponding to the nodes.
In one embodiment, when the processor calculates the trust adjustment value of each node based on the multiple evaluation factors corresponding to each node, the processor specifically performs the following steps: calculating the weight values of various evaluation factors corresponding to each node; multiplying the calculated weight values of the multiple evaluation factors corresponding to each node by the evaluation factors to which the weight values belong, and then summing the weighted values to generate a trust regulation value of each node; or adding the multiple evaluation factors corresponding to each node to generate the trust adjustment value of each node.
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: when it is monitored that a target node is added in a current block chain network, allocating initial trust to the target node based on the time length of the target node added in the current block chain network; acquiring multiple items of performance data corresponding to each node including the target node in the current block chain network; normalizing the multiple items of performance data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes; calculating a trust regulation value of each node based on multiple evaluation factors corresponding to each node; and adjusting the trust degree of each node according to the trust adjusting value of each node.
In one embodiment, after the processor performs the adjustment of the trust level of each node according to the trust adjustment value of each node, the processor further performs the following steps: and after the adjusted trust degrees of the nodes are arranged in a descending order or an ascending order, generating a trust degree evaluation list of the nodes.
In one embodiment, when the processor performs the assignment of the initial trust level to the target node based on the time duration for the target node to join the current blockchain network, specifically, the following steps are performed: calculating the time length of the target node joining the current block chain network in real time; when the time length of joining the current block chain network is greater than a preset threshold value, generating an initial trust degree according to performance parameters carried by the target node; assigning the initial trust level to the target node.
In one embodiment, when the processor performs the step of acquiring multiple items of performance data corresponding to each node including the target node in the current blockchain network, the processor specifically performs the following steps: determining the connection relation among all nodes including the target node in the current block chain network; constructing a node graph based on the connection relation among all nodes including the target node; acquiring the priority corresponding to the connection path of each node in the node graph, and determining the optimal connection path based on the high-low sequence of the priority; and traversing a plurality of items of performance condition data corresponding to each node on the optimal connection path one by one based on the optimal connection path.
In an embodiment, when the processor performs acquiring the priority corresponding to the connection path of each node in the node map, the processor specifically performs the following steps: selecting a certain node from each node in the node graph as a starting point, and constructing a plurality of connecting paths between the selected certain node and other nodes; calculating the time length required by the traversal of the plurality of connecting paths; and determining the priority corresponding to the connection path of each node based on the time required by the traversal of the plurality of connection paths.
In one embodiment, before performing the normalization process on the multiple items of performance data corresponding to the nodes, the processor further performs the following steps: and screening the multiple items of performance condition data corresponding to the nodes to generate the screened multiple items of performance condition data corresponding to the nodes.
In one embodiment, when the processor calculates the trust adjustment value of each node based on the multiple evaluation factors corresponding to each node, the processor specifically performs the following steps: calculating the weight values of various evaluation factors corresponding to each node; multiplying the calculated weight values of the multiple evaluation factors corresponding to each node by the evaluation factors to which the weight values belong, and then summing the weighted values to generate a trust regulation value of each node; or adding the multiple evaluation factors corresponding to each node to generate the trust adjustment value of each node.
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 adjusting the trust level of a node in a block chain is characterized by comprising the following steps:
when it is monitored that a target node is added in a current block chain network, allocating initial trust to the target node based on the time length of the target node added in the current block chain network;
acquiring multiple items of performance data corresponding to each node including the target node in the current block chain network;
normalizing the multiple items of performance data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes;
calculating a trust regulation value of each node based on multiple evaluation factors corresponding to each node;
and adjusting the trust degree of each node according to the trust adjusting value of each node.
2. The method according to claim 1, wherein after adjusting the trust level of each node according to the trust adjustment value of each node, further comprising:
and after the adjusted trust degrees of the nodes are arranged in a descending order or an ascending order, generating a trust degree evaluation list of the nodes.
3. The method of claim 1, wherein assigning an initial level of trust to the target node based on how long the target node joined the current blockchain network comprises:
calculating the time length of the target node joining the current block chain network in real time;
when the time length of joining the current block chain network is greater than a preset threshold value, generating an initial trust degree according to performance parameters carried by the target node;
assigning the initial trust level to the target node.
4. The method according to claim 1, wherein the obtaining multiple items of performance data corresponding to nodes in the current blockchain network including the target node comprises:
determining the connection relation among all nodes including the target node in the current block chain network;
constructing a node graph based on the connection relation among all nodes including the target node;
acquiring the priority corresponding to the connection path of each node in the node graph, and determining the optimal connection path based on the high-low sequence of the priority;
and traversing a plurality of items of performance condition data corresponding to each node on the optimal connection path one by one based on the optimal connection path.
5. The method according to claim 4, wherein the obtaining the priority corresponding to the connection path of each node in the node map comprises:
selecting a certain node from each node in the node graph as a starting point, and constructing a plurality of connecting paths between the selected certain node and other nodes;
calculating the time length required by the traversal of the plurality of connecting paths;
and determining the priority corresponding to the connection path of each node based on the time required by the traversal of the plurality of connection paths.
6. The method according to claim 1, wherein before the normalizing the plurality of items of performance data corresponding to the nodes, the method further comprises:
and screening the multiple items of performance condition data corresponding to the nodes to generate the screened multiple items of performance condition data corresponding to the nodes.
7. The method according to claim 1, wherein the calculating the trust adjustment value of each node based on the plurality of evaluation factors corresponding to each node comprises:
calculating the weight values of various evaluation factors corresponding to each node;
multiplying the calculated weight values of the multiple evaluation factors corresponding to each node by the evaluation factors to which the weight values belong, and then summing the weighted values to generate a trust regulation value of each node;
or
And adding the multiple evaluation factors corresponding to each node to generate a trust regulation value of each node.
8. An apparatus for adjusting trust level of nodes in a blockchain, the apparatus comprising:
the initial trust degree distribution module is used for distributing initial trust degrees to the target nodes based on the time length of the target nodes added into the current block chain network after monitoring that the target nodes are added into the current block chain network;
the performance data acquisition module is used for acquiring a plurality of performance data corresponding to each node including the target node in the current block chain network;
the evaluation factor generation module is used for carrying out normalization processing on the multiple items of performance condition data corresponding to the nodes to generate multiple evaluation factors corresponding to the nodes;
the trust adjusting value calculating module is used for calculating the trust adjusting value of each node based on the multiple evaluation factors corresponding to each node;
and the trust degree adjusting module is used for adjusting the trust degree of each node according to the trust adjusting value of each node.
9. An electronic 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 perform the steps of the method of adjusting trust of nodes in a blockchain 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 adjusting trust of nodes in a blockchain according to any one of claims 1 to 7.
CN202011280622.6A 2020-11-16 2020-11-16 Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium Pending CN112328694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011280622.6A CN112328694A (en) 2020-11-16 2020-11-16 Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011280622.6A CN112328694A (en) 2020-11-16 2020-11-16 Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112328694A true CN112328694A (en) 2021-02-05

Family

ID=74318747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011280622.6A Pending CN112328694A (en) 2020-11-16 2020-11-16 Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112328694A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256149A (en) * 2021-06-11 2021-08-13 武汉龙津科技有限公司 Block chain node reputation adjusting method and device, electronic equipment and storage medium
CN113438327A (en) * 2021-08-30 2021-09-24 湖南三湘银行股份有限公司 Consensus algorithm implementation method based on block chain
CN114785526A (en) * 2022-06-16 2022-07-22 德德市界(深圳)科技有限公司 Multi-user multi-batch weight distribution calculation and storage processing system based on block chain
CN117670329A (en) * 2024-02-01 2024-03-08 中国信息通信研究院 Trust-based transaction method and device in blockchain network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256149A (en) * 2021-06-11 2021-08-13 武汉龙津科技有限公司 Block chain node reputation adjusting method and device, electronic equipment and storage medium
CN113438327A (en) * 2021-08-30 2021-09-24 湖南三湘银行股份有限公司 Consensus algorithm implementation method based on block chain
CN113438327B (en) * 2021-08-30 2021-11-30 湖南三湘银行股份有限公司 Consensus algorithm implementation method based on block chain
CN114785526A (en) * 2022-06-16 2022-07-22 德德市界(深圳)科技有限公司 Multi-user multi-batch weight distribution calculation and storage processing system based on block chain
CN117670329A (en) * 2024-02-01 2024-03-08 中国信息通信研究院 Trust-based transaction method and device in blockchain network
CN117670329B (en) * 2024-02-01 2024-05-14 中国信息通信研究院 Trust-based transaction method and device in blockchain network

Similar Documents

Publication Publication Date Title
CN112328694A (en) Method and device for adjusting node trust degree in block chain, electronic equipment and storage medium
US10152353B2 (en) Account activity level based-system resource allocating method and device
KR101287448B1 (en) Fuzzy control based virtual machine auto scaling system and method
CN107958349B (en) Task allocation method and device, computer equipment and storage medium
US10652360B2 (en) Access scheduling method and apparatus for terminal, and computer storage medium
CN109787915B (en) Flow control method and device for network access, electronic equipment and storage medium
KR102438621B1 (en) Dynamic capacity optimization for shared computing resources
CN113326126A (en) Task processing method, task scheduling device and computer equipment
US8868746B2 (en) Allocation of central application resources based on social agreements
CN109976901B (en) Resource scheduling method, device, server and readable storage medium
CN104809132A (en) Method and device for acquiring social relation type of network subject
CN110740194B (en) Micro-service combination method based on cloud edge fusion and application
CN110852882A (en) Packet consensus method, apparatus, device, and medium for blockchain networks
CN113312239B (en) Data detection method, device, electronic equipment and medium
CN112494935B (en) Cloud game platform pooling method, electronic equipment and storage medium
CN112559847A (en) Method and device for searching nodes in network graph, electronic equipment and storage medium
CN114897426A (en) Case division information processing method and device, computer equipment and storage medium
JP7396505B2 (en) Model generation program, model generation method, and model generation device
CN115794396A (en) Resource allocation method, system and electronic equipment
US20220115145A1 (en) Method, device, and equipment for user grouping, and computer-readable storage medium
CN112256420B (en) Task allocation method and device and electronic equipment
CN114756380A (en) Cloud server deployment method and device, electronic equipment and storage medium
CN115034887A (en) Cash transfer control method, system, equipment and storage medium
CN114217825A (en) Method, apparatus, machine-readable storage medium and processor for decision engine
CN112435021A (en) Transaction request processing method, device, equipment and medium based on artificial intelligence

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