A node credit grading method based on a consortium chain
By authenticating the identities of consortium blockchain nodes and setting up a credit rating mechanism, node permissions can be dynamically adjusted, solving the problem of fixed node permissions in existing technologies and improving the management efficiency of consortium blockchains.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2026-03-24
AI Technical Summary
In existing consortium blockchains, the permissions of each node remain largely unchanged after the network is established, making it impossible to dynamically control permissions based on the node's creditworthiness, resulting in inefficient permission management.
By authenticating the nodes of the consortium blockchain and assigning them initial credit scores, and by setting up a credit calculation contract and a category assessment contract on the consortium blockchain, the permissions of the nodes are dynamically adjusted according to the credit scores, and the nodes are divided into consensus nodes, candidate nodes, and reserve nodes, and given different data permissions.
It enables dynamic adjustment of a node's data permissions in the consortium blockchain based on its creditworthiness, improving the efficiency of node permission management and reducing the need for manual evaluation and modification.
Smart Images

Figure CN116155898B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of consortium blockchain technology, and in particular to a node credit rating method based on consortium blockchain. Background Technology
[0002] A consortium blockchain is a blockchain jointly managed by multiple organizations. Each node in a consortium blockchain typically corresponds to a specific entity or organization, and joining or leaving the network requires authorization. Each organization or organization manages one or more nodes, and its data can only be read, written, and sent by different organizations within the system. Within a consortium blockchain, multiple pre-selected nodes are designated as ledger keepers. The generation of each block is jointly determined by all pre-selected nodes. Other nodes can participate in transactions but do not interfere with the ledger process. Therefore, access control for each node is crucial for the smooth operation of the consortium blockchain. In existing consortium blockchains, the permissions of each node remain largely unchanged after network establishment, except for manual control, and dynamic control of permissions based on node credit is not possible. Summary of the Invention
[0003] Therefore, the purpose of this invention is to provide a node credit rating method based on consortium blockchain to solve or at least partially solve the above-mentioned problems existing in the prior art.
[0004] To achieve the above-mentioned objectives, this invention provides a node credit rating method based on a consortium blockchain, the method comprising the following steps:
[0005] S101. Establish a consortium blockchain, which includes several initial nodes;
[0006] S102. Perform identity authentication for each initial node and newly joined node in the consortium blockchain, and assign an initial credit score to each node based on the identity authentication results.
[0007] S103. Based on the node's credit score, divide each node into consensus nodes, candidate nodes, and reserve nodes, and assign different data permissions to different types of nodes.
[0008] S104. Set up a credit score calculation contract on the consortium blockchain. The credit score calculation contract is automatically executed at preset intervals. It is used to calculate the credit score of each node according to the preset credit score calculation strategy and reassign the credit score of each node according to the calculation results.
[0009] S105. Set up a category assessment contract on the consortium blockchain. The category assessment contract is automatically executed after the points calculation contract is completed. It is used to reset the category of each node based on the current credit score of each node according to the preset category assessment strategy. For nodes whose categories have changed, their consensus permissions are modified accordingly.
[0010] Further, the alliance chain is provided with a node authentication contract, and the node authentication contract is used for authenticating the identities of the initial nodes and the newly added nodes, and specifically includes the following steps:
[0011] S201, obtaining identity authentication content submitted by a node;
[0012] S202, checking the authenticity of the identity authentication content;
[0013] S203, judging the identity type of each node according to the checking result of the previous step;
[0014] S204, assigning an initial credit score to the node according to the identity type of the node.
[0015] Further, the authenticity of the identity authentication content is checked, and specifically includes the following steps:
[0016] S301, identifying whether the identity authentication content submitted by the node is a first type of identity or a second type of identity;
[0017] S302, for a node of the first type of identity, obtaining an identity authentication password further submitted by the node, combining and comparing the identity authentication password and the identity authentication content, if the comparison is correct, determining that the identity authentication content is authentic, and if the comparison is incorrect, determining that the identity authentication content cannot be verified;
[0018] S303, for a node of the second type of identity, establishing a DIKW graph based on the identity authentication content submitted by the node and the way and IP address of the node for sending the identity authentication content, and verifying the authenticity of the identity authentication content based on the DIKW graph.
[0019] Further, the authenticity of the identity authentication content of the node is verified based on the DIKW graph, and specifically includes the following steps:
[0020] S401, typing the identity authentication content submitted by the node of the second type of identity to obtain identity information resources reflecting the identity of the node of the second type;
[0021] S402, typing the way and IP address of the node of the second type of identity for sending the identity authentication content to obtain corresponding type resources, and the type resources include data resources and information resources;
[0022] S403, calculating the computational cost required for modal conversion of the type resources obtained in step S402 to obtain the identity information resources;
[0023] S404, judging whether the computational cost obtained in step S403 is less than a preset threshold, if yes, determining that the identity authentication content of the node is authentic, and if not, determining that the identity authentication content of the node cannot be verified.
[0024] Further, the integral calculation contract calculates the credit score of the node, specifically including the following steps:
[0025] S501, record the operation of each node to generate a corresponding operation record file, upload the operation record file to the data storage system, obtain the file fingerprint returned by the data storage system, upload the hash value of the operation record file and the file fingerprint to the alliance chain for storage;
[0026] S502, obtain the operation score calculation strategy of the corresponding identity according to the identity of the node;
[0027] S503, when calculating the credit score of the node, obtain the operation record file of the node from the data storage system, traverse the operation record file, calculate the score of each operation record in the operation record file based on the operation score calculation strategy obtained in step S502, and calculate the final score of all operation records, add the final score to the current credit score of the node to obtain the new credit score of the node.
[0028] Further, in step S503, after obtaining the operation record file of the node from the data storage system, the hash value and the file fingerprint corresponding to the operation record file are obtained from the alliance chain, and the integrity of the operation record file is verified according to the hash value and the file fingerprint.
[0029] Further, in step S503, when calculating the score of each operation record in the operation record file of the node, if a deduction item occurs, the operation record made by other nodes of the same identity type at the same time is obtained through the data storage system, the occurrence frequency of the operation record same as the deduction item is counted, if the occurrence frequency is greater than a preset threshold, the deduction value is adjusted to zero, and if the occurrence frequency is less than the preset threshold, the deduction item is maintained unchanged.
[0030] Further, in the consensus protocol confirmation stage of the alliance chain, the consensus process is only participated by the consensus nodes, and the main node elected from the consensus nodes judges the consensus result.
[0031] Compared with the prior art, the beneficial effects of the present application are:
[0032] The application provides a node credit grading method based on a consortium chain, identity authentication is performed on each initial node and a newly added node of the consortium chain after the consortium chain is established, initial credit points are given to each node according to the identity authentication result of the node, each node is divided into a consensus node, a standby node and a candidate node based on the credit points of the nodes, different data permissions are given to nodes of different types, an integral calculation contract and a category evaluation contract are set on the consortium chain, the credit points of the nodes of the consortium chain are recalculated regularly, and the node categories are redivided according to the latest credit points of the nodes, so that the method can dynamically adjust the data permissions of each node in the consortium chain according to the credit points of the nodes, without artificial evaluation and manual modification, and the node permission management efficiency of the consortium chain can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only preferred embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0034] Figure 1 It is a whole process schematic diagram of a node credit grading method based on a consortium chain provided by the embodiment of the application. DETAILED DESCRIPTION
[0035] The principles and characteristics of the application will be described below in combination with the drawings, and the listed embodiments are only used to explain the application, and are not used to limit the scope of the application.
[0036] With reference to Figure 1 The embodiment provides a node credit grading method based on a consortium chain, and the method comprises the following steps:
[0037] S101, a consortium chain is established, and the consortium chain comprises a plurality of initial nodes.
[0038] S102, identity authentication is performed on each initial node and a newly added node of the consortium chain, and initial credit points are given to each node according to the identity authentication result of the node.
[0039] S103, each node is divided into a consensus node, a candidate node and a standby node according to the credit points of the nodes, and different data permissions are given to nodes of different types. In the embodiment, a consensus process is performed between the consensus nodes, and the generation of a block is realized by a master node selected from the consensus nodes. The candidate node can be upgraded to a consensus node when a condition is met. The standby node is a node whose identity is not completely clear, and the standby node can be upgraded to a candidate node when the identity is clear and meets a condition.
[0040] S104, set a credit calculation contract on the alliance chain, the credit calculation contract is automatically executed every preset time interval, and is used for calculating the credit of each node according to a preset credit calculation strategy, and reassigning the credit of each node according to the calculation result.
[0041] S105, set a category evaluation contract on the alliance chain, the category evaluation contract is automatically executed after the credit calculation contract is executed, and is used for resetting the category of the node according to the current credit of each node based on a preset category evaluation strategy, and modifying the consensus right of the node whose category is changed.
[0042] In the embodiment, the alliance chain is also provided with a node authentication contract, and the node authentication contract is used for authenticating the identity of the initial node and the newly added node, and the authentication specifically includes the following steps:
[0043] S201, obtain the identity authentication content submitted by the node. The identity authentication content is used to describe the basic information of the organization or organization corresponding to the node, such as name, location, responsible person, etc.
[0044] S202, check the authenticity of the identity authentication content.
[0045] S203, determine the identity type of each node according to the checking result of the previous step. According to the identity of the organization or organization corresponding to the node, the identity type of the node can include government node, bank node, insurance company node, third-party private organization node, etc.
[0046] S204, give the node an initial credit according to the identity type of the node. In the embodiment, the initial credit of the node of different identity types is not the same, for example, the initial credit of the government node is higher than that of the bank node and the insurance company node, and the initial credit of the provincial insurance company node is higher than that of the municipal insurance company node. The initial credit of the node of different identity types can be adjusted according to actual needs, and the embodiment does not make specific limitation.
[0047] In the above embodiment, the authenticity of the identity authentication content is checked, which specifically includes the following steps:
[0048] S301, identify whether the identity authentication content submitted by the node is a first type of identity or a second type of identity. In the embodiment, the node which does not belong to the same organizational structure as the main node is determined as the second type of identity, and the node which belongs to the same organizational structure as the main node is determined as the first type of identity.
[0049] S302, for a node of a type of identity, obtaining an identity authentication password further submitted by the node, combining and comparing the identity authentication password and the identity authentication content, if the comparison is correct, determining that the identity authentication content is authentic, if the comparison is incorrect, determining that the identity authentication content cannot be verified. For a node of a type of identity belonging to the same organizational structure as the main node, the main node sends an identity authentication password to the node in advance when the node joins the alliance chain, and when checking the authenticity of the identity authentication content of the node, the node of the type of identity submits the identity authentication password to the node authentication contract for checking, if the identity authentication password checking is correct, the authenticity of the identity authentication content submitted by the node of the type of identity can be determined, if the identity authentication password checking is incorrect, the node of the type of identity is prompted to re-submit the identity authentication password. Before the identity authentication password of the node of the type of identity is checked correctly, the node of the type of identity can only serve as a preliminary node.
[0050] S303, for a node of a type of identity, based on the identity authentication content submitted by the node and the way and IP address of the node sending the identity authentication content, establishing a DIKW graph, and verifying the authenticity of the identity authentication content based on the DIKW graph.
[0051] Specifically, verifying the authenticity of the identity authentication content of the node based on the DIKW graph includes the following steps:
[0052] S401, typing the identity authentication content submitted by the node of the type of identity, and obtaining identity information resources reflecting the identity of the node of the type.
[0053] S402, typing the way and IP address of the node of the type of identity sending the identity authentication content, and obtaining corresponding type resources, the type resources including data resources and information resources.
[0054] S403, calculating the computational cost required for modal conversion of the type resources obtained in step S402 to obtain identity information resources. The modal conversion includes same-modal conversion and different-modal conversion. The same-modal conversion is the mutual conversion between type resources of the same type, for example, information resources are converted into information resources; the different-modal conversion is the mutual conversion between type resources of different types, for example, data resources are converted into information resources. The significance of this step is to calculate the computational difficulty of inferring the identity authentication content of the node of the type of identity according to the way and IP address of the node of the type of identity sending the identity authentication content, if the computational difficulty is too high, it means that the way and IP address of the node of the type of identity sending the identity authentication content are not enough to infer the identity authentication content; if the computational difficulty is too low, it means that the identity authentication content of the node of the type of identity can be easily inferred according to the way and IP address of the node sending the identity authentication content.
[0055] S404, determine whether the calculation cost obtained in step S403 is less than a preset threshold value, if less than the preset threshold value, determine that the identity authentication content of the node is real, otherwise determine that the identity authentication content of the node cannot be verified. The node whose identity authentication content cannot be verified can only be used as a standby node.
[0056] In this embodiment, the credit score of the node is calculated by the integral calculation contract, specifically including the following steps:
[0057] S501, record the operation of each node to generate a corresponding operation record file, upload the operation record file to the data storage system, obtain the file fingerprint returned by the data storage system, upload the hash value of the operation record file and the file fingerprint to the alliance chain for storage.
[0058] S502, obtain the operation score calculation strategy of the corresponding identity according to the identity of the node.
[0059] S503, when calculating the credit score of the node, obtain the operation record file of the node from the data storage system, traverse the operation record file, calculate the score of each operation record in the operation record file based on the operation score calculation strategy obtained in step S502, and calculate the final score of all operation records, add the final score to the current credit score of the node to obtain the new credit score of the node.
[0060] In step S503, after obtaining the operation record file of the node from the data storage system, the hash value and file fingerprint corresponding to the operation record file are obtained from the alliance chain, and the integrity of the operation record file is verified according to the hash value and file fingerprint. If the hash value and file fingerprint are inconsistent with the obtained operation record file, the operation record file is not used and the data storage system is required to check the data modification record; if the hash value and file fingerprint are consistent with the obtained operation record file, it is determined that the operation record file is complete and normal, and the credit score of the node can be calculated according to the operation record file.
[0061] As a preferred example, in step S503, when calculating the score of each operation record in the operation record file of the node, if a deduction item appears, the operation record made by other nodes of the same identity type at the same time is obtained through the data storage system, the number of operation records of the same type as the deduction item is counted, if the number of operation records is greater than a preset threshold value, the deduction value is adjusted to zero, if the number of operation records is less than a preset threshold value, the deduction item is maintained.
[0062] Since the request and reply stages in the conventional PBFT algorithm are the interaction between the system and the client, and the data block is directly generated by the master node in the consensus process of the alliance chain, without the participation of a special client, the request and reply stages in the consistency protocol can be omitted. In the confirmation stage in the consistency protocol, the consensus process originally participated by all nodes is changed to only be participated by the consensus nodes. The improved master node election method and the traceability of the alliance chain can guarantee the legality of the block synchronization process. The confirmation process originally requiring two-way interaction is simplified to be directly judged by the master node on the consensus result, so that the interaction process with a complexity of O(n2) can be reduced, the consensus efficiency is improved, and the algorithm complexity is greatly reduced.
[0063] The above merely describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A node credit rating method based on consortium blockchain, characterized in that, The method includes the following steps: S101. Establish a consortium blockchain, which includes several initial nodes; S102. Perform identity authentication for each initial node and newly joined node in the consortium blockchain, and assign an initial credit score to each node based on the identity authentication results. S103. Based on the node's credit score, divide each node into consensus nodes, candidate nodes, and reserve nodes, and assign different data permissions to different types of nodes. S104. Set up a credit score calculation contract on the consortium blockchain. The credit score calculation contract is automatically executed at preset intervals. It is used to calculate the credit score of each node according to the preset credit score calculation strategy and reassign the credit score of each node according to the calculation results. S105. Set up a category assessment contract on the consortium blockchain. The category assessment contract is automatically executed after the points calculation contract is completed. It is used to reset the category of each node based on the current credit score of each node according to the preset category assessment strategy. For nodes whose categories have changed, their consensus permissions are modified accordingly. The consortium blockchain is equipped with a node authentication contract, which is used to authenticate the identities of initial nodes and newly joined nodes. The specific steps include: S201. Obtain the identity authentication content submitted by the node; S202. Verify the authenticity of the identity authentication content; S203. Based on the verification results of the previous step, determine the identity type of each node; S204. Assign an initial credit score to the node based on its identity type; Verifying the authenticity of identity verification information includes the following steps: S301. Identify whether the identity authentication content submitted by the identification node is a Class I identity or a Class II identity; S302. For a node with a certain type of identity, obtain its further submitted identity authentication password, and compare its identity authentication password with its identity authentication content. If the comparison is correct, the identity authentication content is determined to be authentic. If the comparison is incorrect, the identity authentication content is determined to be unverifiable. S303. For nodes with type II identities, establish a DIKW graph based on the identity authentication content submitted by such nodes, the method of sending the identity authentication content, and the IP address, and verify the authenticity of their identity authentication content based on the DIKW graph.
2. The node credit rating method based on consortium blockchain according to claim 1, characterized in that, The authenticity of node identity authentication content is verified based on the DIKW graph, specifically including the following steps: S401. Type the identity authentication content submitted by the second-type identity nodes to obtain identity information resources that reflect the identity of the second-type nodes; S402. The method and IP address of the identity authentication content sent by the second-type identity node are categorized to obtain the corresponding type resources, which include data resources and information resources. S403. Calculate the computational cost required to perform modal conversion on the type resources obtained in step S402 to obtain identity information resources; S404. Determine whether the computation cost obtained in step S403 is less than a preset threshold. If it is less than the preset threshold, determine that the identity authentication content of the node is genuine; otherwise, determine that its identity authentication content cannot be verified.
3. The node credit rating method based on consortium blockchain according to claim 1, characterized in that, The credit score calculation contract calculates the node's credit score, specifically including the following steps: S501. Record the operations of each node, generate corresponding operation log files, upload the operation log files to the data storage system, obtain the file fingerprint returned by the data storage system, and upload the hash value and file fingerprint of the operation log files to the consortium blockchain for storage. S502, Obtain the operation score calculation strategy based on the node's identity; S503. When calculating the credit score of a node, the node's operation record file is obtained from the data storage system. The operation record file is traversed, and the score of each operation record in the operation record file is calculated based on the operation score calculation strategy obtained in step S502. The final score of all operation records is calculated, and the final score is added to the node's current credit score to obtain the node's new credit score.
4. The node credit rating method based on consortium blockchain according to claim 3, characterized in that, In step S503, after obtaining the node's operation record file from the data storage system, the hash value and file fingerprint corresponding to the operation record file are obtained from the consortium blockchain, and the integrity of the operation record file is verified based on the hash value and file fingerprint.
5. The node credit rating method based on consortium blockchain according to claim 3, characterized in that, In step S503, when calculating the score of each operation record in the operation record file of the calculation node, if a deduction item occurs, the operation records made by other nodes of the same identity type at the same time are obtained through the data storage system. The number of times the operation record with the same deduction item appears is counted. If the number of occurrences is greater than a preset threshold, the deduction value is adjusted to zero. If the number of occurrences is less than the preset threshold, the deduction item remains unchanged.
6. The node credit rating method based on consortium blockchain according to claim 1, characterized in that, During the consensus protocol confirmation phase of the consortium blockchain, the consensus process is only participated in by the consensus nodes, and the master node elected from the consensus nodes determines the consensus result.
Citation Information
Patent Citations
Data processing method and device based on block chain
CN112822267A
Distributed file storage sharing system based on alliance chain
CN113360458A
Trusted alliance chain node management method taking credit as core
CN115021968A