A consortium chain node risk assessment method and device
Patent Information
- Application Number
- CN202611049307.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本申请实施例提供了一种联盟链节点风险评估方法以及装置,旨在解决固定特征权重的赋值方式无法适配不同时间周期内节点行为的动态变化特性的技术问题
[0020]第四方面,本申请实施例还提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序当被处理器执行时可实现上述方法。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain, and in particular to a method and apparatus for risk assessment of consortium blockchain nodes. Background Technology
[0002] Consortium blockchains, as a permissioned blockchain technology for multiple participants, have been widely applied in various business scenarios such as supply chain finance, government collaboration, and industry traceability. All nodes on the chain are authorized and compliant participants, and the standardization of node behavior directly affects the credibility of the consortium blockchain data and the overall operational security. If nodes engage in improper behavior such as unauthorized interactions, abnormal data calls, or malicious tampering, it can easily trigger on-chain business security risks and hidden dangers. Therefore, conducting periodic risk monitoring of consortium blockchain nodes and accurately identifying abnormal node behavior are crucial prerequisites for ensuring the stable and reliable operation of the consortium blockchain.
[0003] Currently, the mainstream method for risk monitoring of consortium blockchain nodes is to extract a small number of behavioral characteristics of the nodes, combine them with manually set fixed feature weights to perform weighted calculations to obtain a credit score, and finally assess the risk level of the nodes based on the credit score.
[0004] However, the above-mentioned method of assigning fixed feature weights relies entirely on human experience and cannot adapt to the dynamic changes in node behavior over different time periods. This leads to biased risk assessment results and makes it difficult to objectively and accurately reflect the true risk level of nodes. Summary of the Invention
[0005] This application provides a method and apparatus for risk assessment of consortium blockchain nodes, aiming to solve the technical problem that the fixed feature weight assignment method cannot adapt to the dynamic changes in node behavior over different time periods.
[0006] In a first aspect, embodiments of this application provide a method for risk assessment of consortium blockchain nodes, which includes: Within the t-th time period, obtain the behavior data of the i-th node in the target consortium chain, where t is an integer greater than or equal to 1 and i is an integer greater than or equal to 1; Extract multiple target features from the behavioral data; Each of the target features is subjected to range normalization to obtain multiple standardized feature values, and the multiple standardized feature values correspond one-to-one with the multiple target features. The feature weight of each target feature among the multiple target features is calculated using the entropy weight method. Based on the multiple standardized feature values and the feature weight of each target feature among the multiple target features, the node behavior fingerprint score of the i-th node is calculated, and the node behavior fingerprint score is used to assess the risk level of the i-th node in the t-th time period.
[0007] Optionally, the step of calculating the feature weight of each target feature among the multiple target features using the entropy weight method includes: Calculate the information entropy of each target feature among the multiple target features to obtain multiple information entropies; The total information entropy is obtained by summing the entropies of the multiple information entropies. The total number of features is obtained by counting the number of features of the multiple target features. The feature weight of the target feature is calculated based on the information entropy of each target feature among the plurality of target features, the total information entropy, and the total number of features.
[0008] Optionally, the plurality of target features includes a first target feature, the plurality of information entropies includes target information entropy, the target information entropy is the information entropy of the first target feature, and the calculation of the information entropy of each target feature among the plurality of target features to obtain the plurality of information entropies includes: Within the t-th time period, the feature values of all nodes in the target consortium chain on the first target feature are obtained, resulting in multiple target feature values; The total target feature value is obtained by summing the multiple target feature values. Calculate the ratio of the feature value of the i-th node on the first target feature to the total target feature value; The target information entropy is calculated based on the stated proportion.
[0009] Optionally, the formula for calculating the feature weight of each target feature among the plurality of target features is as follows:
[0010] in, The feature weights for the j-th target feature are: Let the information entropy of the j-th target feature be , This represents the total information entropy.
[0011] Optionally, the The formula for calculating is: ,
[0012] in, Let be the feature value of the i-th node on the j-th target feature within the t-th time period. Let m be the total target feature value, and m be the total number of nodes participating in the evaluation in the target consortium blockchain. Let t be the ratio of the feature value of the i-th node on the j-th target feature to the total target feature value within the t-th time period.
[0013] Optionally, the method further includes: Obtain the historical credit score of the i-th node, where the historical credit score is the credit score of the i-th node within the (t-1)-th time period; Obtain the number of serious violations triggered by the i-th node within the t-th time period; Based on the historical credit score, the number of serious violations, and the node behavior fingerprint score, the current credit score of the i-th node is calculated. The current credit score is the credit score of the i-th node in the t-th time period, and the current credit score is used to assess the risk level of the i-th node in the t-th time period.
[0014] Optionally, the method further includes: Based on the current credit score and the preset credit threshold, identify the credit partition to which the i-th node belongs; Obtain the original credit partition of the i-th node; Determine whether the original credit partition is the same as the assigned credit partition; If the original credit partition is different from the home credit partition, then the original credit partition of the i-th node is switched to the home credit partition.
[0015] Optionally, the formula for calculating the current credit score of the i-th node is: ,
[0016] in, Let be the credit score of the i-th node during the t-th time period. Let i be the credit score of node i during the (t-1)th time period. As a factor of historical amnesia, The fingerprint score of the node behavior of the i-th node during the t-th time period. It is a non-linear exponential penalty function. and All are penalty coefficients. Let be the number of serious violations triggered by node i within time period t.
[0017] Optionally, the multiple target features include: block packaging success rate, consensus delay time, number of illegal smart contract calls, and number of invalid signatures.
[0018] Secondly, embodiments of this application also provide a consortium blockchain node risk assessment device, which includes a unit for performing the above-described method.
[0019] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0020] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0021] This application provides a method and apparatus for risk assessment of consortium blockchain nodes. The method includes: acquiring behavioral data of the i-th node in a target consortium blockchain within a time period t, where t is an integer greater than or equal to 1 and i is an integer greater than or equal to 1; extracting multiple target features from the behavioral data; performing range normalization on the feature data corresponding to each of the multiple target features to obtain multiple standardized feature values, wherein each standardized feature value corresponds one-to-one with the multiple target features; calculating the feature weight of each target feature using the entropy weight method; and calculating the node behavior fingerprint score of the i-th node based on the multiple standardized feature values and the feature weight of each target feature, wherein the node behavior fingerprint score is used to assess the risk level of the i-th node within the time period t. Therefore, the technical solution of this application abandons the traditional method of manually setting fixed feature weights. Instead, it uses the entropy weight method to dynamically calculate the feature weights of each target feature in each time period. This allows for the objective allocation of weights based on the actual distribution of node behavior data, adapting to the dynamic changes in the behavior of target consortium blockchain nodes in different time periods. At the same time, it eliminates the dimensional differences between multi-dimensional features through range normalization. Based on standardized feature values and dynamic feature weights, it quantifies the node behavior fingerprint score, which can comprehensively characterize the degree of abnormality in node behavior, effectively avoid the evaluation bias caused by manual weighting, and make the risk assessment results more consistent with the actual operating state of the node, significantly improving the objectivity and accuracy of the risk assessment of target consortium blockchain nodes. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0025] Figure 1 A flowchart illustrating a risk monitoring method for consortium blockchains provided in this application embodiment; Figure 2 A schematic block diagram of a consortium blockchain risk monitoring device provided in this application embodiment; Figure 3 A computer device provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0028] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0029] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0030] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0031] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0032] To address the technical problem that the fixed feature weight assignment method in the prior art cannot adapt to the dynamic changes in node behavior over different time periods, this application provides a consortium blockchain risk monitoring device that can dynamically adjust feature weights to adapt to the dynamic changes in node behavior over different time periods.
[0033] Figure 1 This is a flowchart illustrating a risk monitoring method for consortium blockchains provided in an embodiment of this application. In one embodiment, the method includes steps S101-S105.
[0034] S101. During the t-th time period, obtain the behavior data of the i-th node in the target consortium chain.
[0035] Where t is an integer greater than or equal to 1, and i is an integer greater than or equal to 1.
[0036] Typically, a target consortium blockchain contains multiple nodes. Taking the i-th node as an example in this application embodiment, it details how to conduct a risk assessment on the i-th node within the t-th time period.
[0037] S102. Extract multiple target features from behavioral data.
[0038] In one embodiment, the plurality of target features include: block packaging success rate, consensus delay time, number of illegal smart contract calls, and number of invalid signatures.
[0039] Block packaging success rate refers to the ratio of the number of times a single node successfully packages and uploads a block to the chain within a set time period to the total number of times the node initiates block packaging. It is used to characterize a node's block production capacity, operational stability, and compliance level in block production.
[0040] Consensus latency refers to the time it takes for a node to complete consensus confirmation from receiving transaction data to participating in the consensus process of a consortium blockchain. It reflects the node's consensus response efficiency. Abnormally high latency usually indicates that the node is experiencing risky behavior such as lag or malicious delays in consensus.
[0041] The number of illegal smart contract calls refers to the total number of times a node actively initiates calls to unauthorized, illegal, or security-vulnerable smart contracts within a set time period. It is used to measure the frequency of malicious interactions and illegal operations by nodes.
[0042] Invalid signature count refers to the total number of times that transaction data and consensus messages submitted by a node fail signature verification within a time period. Too many invalid signatures usually indicate that the node has problems such as identity forgery, malicious data tampering, or abnormal operation.
[0043] It should be noted that in this embodiment, multiple target features are combined into a feature vector, as detailed below:
[0044] in, This represents the nth target feature value of the i-th node.
[0045] S103. Perform range normalization on the feature data corresponding to each of the multiple target features to obtain multiple standardized feature values.
[0046] Multiple standardized feature values correspond one-to-one with multiple target features.
[0047] Specifically, the formula for calculating the standardized feature value is as follows: ,or
[0048] in, and These represent the maximum and minimum values of the node in the j-th dimension feature during the t-th time period, respectively.
[0049] It should be noted that when hour, The higher the value, the better. When hour, The smaller the value, the better.
[0050] S104. Use the entropy weight method to calculate the feature weight of each target feature among multiple target features.
[0051] It should be noted that within each weekly time period, the feature weight of each target feature in the multiple target features needs to be recalculated using the entropy weight method.
[0052] S105. Calculate the node behavior fingerprint score of the i-th node based on multiple standardized feature values and the feature weight of each target feature among multiple target features.
[0053] The node behavior fingerprint score is used to assess the risk level of the i-th node in the t-th time period.
[0054] It should be noted that in this embodiment of the application, the value range of the node behavior fingerprint score is set to [0, 1].
[0055] This application provides a method for risk assessment of consortium blockchain nodes. The method includes: acquiring behavioral data of the i-th node in a target consortium blockchain within a time period t, where t is an integer greater than or equal to 1 and i is an integer greater than or equal to 1; extracting multiple target features from the behavioral data; performing range normalization on the feature data corresponding to each of the multiple target features to obtain multiple standardized feature values, wherein each standardized feature value corresponds one-to-one with the multiple target features; calculating the feature weight of each target feature using the entropy weight method; and calculating the node behavior fingerprint score of the i-th node based on the multiple standardized feature values and the feature weight of each target feature, wherein the node behavior fingerprint score is used to assess the risk level of the i-th node within the time period t. Therefore, the technical solution of this application abandons the traditional method of manually setting fixed feature weights. Instead, it uses the entropy weight method to dynamically calculate the feature weights of each target feature in each time period. This allows for the objective allocation of weights based on the actual distribution of node behavior data, adapting to the dynamic changes in the behavior of target consortium blockchain nodes in different time periods. At the same time, it eliminates the dimensional differences between multi-dimensional features through range normalization. Based on standardized feature values and dynamic feature weights, it quantifies the node behavior fingerprint score, which can comprehensively characterize the degree of abnormality in node behavior, effectively avoid the evaluation bias caused by manual weighting, and make the risk assessment results more consistent with the actual operating state of the node, significantly improving the objectivity and accuracy of the risk assessment of target consortium blockchain nodes.
[0056] In one embodiment, S104 specifically includes the following steps: S1041-S1044.
[0057] S1041. Calculate the information entropy of each target feature among multiple target features to obtain multiple information entropies.
[0058] S1042. Sum the entropies of multiple information sources to obtain the total information entropy.
[0059] S1043. Count the number of features of multiple target features to obtain the total number of features.
[0060] S1044. Calculate the feature weight of the target feature based on the information entropy of each target feature, the total information entropy, and the total number of features among multiple target features.
[0061] Specifically, the formula for calculating the feature weight of each target feature among the multiple target features is as follows:
[0062] in, The feature weights for the j-th target feature are: Let the information entropy of the j-th target feature be , This represents the total information entropy.
[0063] It should be noted that, The smaller the value, the greater the difference between the nodes of the target alliance chain for the j-th target feature, and the higher the risk differentiation. The larger the value, the smaller the difference between the nodes of the target alliance chain for the j-th target feature, and the lower the risk differentiation.
[0064] In one embodiment, the plurality of target features includes a first target feature, the plurality of information entropies includes a target information entropy, and the target information entropy is the information entropy of the first target feature. S1041 specifically includes the following steps: S10411-S1044.
[0065] S10411. During the t-th time period, obtain the feature values of all nodes in the target alliance chain on the first target feature, and obtain multiple target feature values.
[0066] S10412. Sum the values of multiple target features to obtain the total target feature value.
[0067] S10413. Calculate the ratio of the feature value of the i-th node on the first target feature to the total target feature value.
[0068] S10414. Calculate the target information entropy based on the proportion.
[0069] In one embodiment, the The formula for calculating is: ,
[0070] in, Let be the feature value of the i-th node on the j-th target feature within the t-th time period. Let m be the total target feature value, and m be the total number of nodes participating in the evaluation in the target consortium blockchain. Let t be the ratio of the feature value of the i-th node on the j-th target feature to the total target feature value within the t-th time period.
[0071] In one embodiment, the method further includes: S106-S108.
[0072] S106. Obtain the historical credit score of the i-th node.
[0073] Historical credit score is the credit score of node i within the (t-1)-th time period. The historical credit score is used to assess the risk level of node i within the (t-1)-th time period.
[0074] It should be noted that when the i-th node is currently in the first time period, the historical credit score of the i-th node is 0.
[0075] S107. Obtain the number of serious violations triggered by the i-th node within the t-th time period.
[0076] This application embodiment counts the number of times the i-th node triggers a serious violation event within the t-th time window. Serious violations include, but are not limited to, double-spending attacks, initiating divergent proposals, and synchronizing conflicting data between different partition nodes.
[0077] S108. Calculate the current credit score of the i-th node based on its historical credit score, number of serious violations, and node behavior fingerprint score.
[0078] The current credit score is the credit score of node i within time period t. The current credit score is used to assess the risk level of node i within time period t.
[0079] In one embodiment, the formula for calculating the current credit score of the i-th node is: ,
[0080] in, Let be the credit score of the i-th node during the t-th time period. Let i be the credit score of node i during the (t-1)th time period. As a factor of historical amnesia, The fingerprint score of the node behavior of the i-th node during the t-th time period. It is a non-linear exponential penalty function. and All are penalty coefficients. Let be the number of serious violations triggered by node i within time period t.
[0081] Preferred, Setting it to 0.7 adjusts the degree to which the current credit score depends on historical credit history.
[0082] Preferred, Set to 0.05, Set to 1.2. The penalty coefficient ensures that the penalty is light when the number of violations is very small, but the penalty will increase exponentially once the number of violations increases, so that the node's credit score will drop rapidly.
[0083] In one embodiment, the method further includes: S109-S112.
[0084] S109. Based on the current credit score and the preset credit threshold, identify the credit partition to which the i-th node belongs.
[0085] S110. Obtain the original credit partition of the i-th node.
[0086] S111. Determine whether the original credit partition and the assigned credit partition are the same.
[0087] S112. If the original credit partition is different from the home credit partition, then switch the original credit partition of the i-th node to the home credit partition.
[0088] It should be noted that S109-S112 will be explained in detail below.
[0089] Preset credit thresholds include excellent thresholds. Warning threshold and circuit breaker threshold In this embodiment, nodes are divided into four credit partitions based on a preset credit threshold. These four credit partitions include a core trust zone, an observation zone, a restricted isolation zone, and a blacklist zone.
[0090] When the current credit score of the i-th node Greater than or equal to When the i-th node is assigned to the core trust zone, the node in the core trust zone has full rights to record transactions, propose consensus, and deploy smart contracts.
[0091] When the current credit score of the i-th node Less than Furthermore, the current credit score Greater than or equal to When the i-th node is assigned to the observation zone, the node in the observation zone does not have consensus proposal rights but retains verification rights. Transactions initiated by the node in the observation zone must be endorsed by the multi-signature of the core trust zone nodes.
[0092] When the current credit score of the i-th node Less than Furthermore, the current credit score Greater than or equal to When the i-th node is assigned to a restricted isolation zone, the node in the restricted isolation zone will be suspended from participating in the consensus network and downgraded to a read-only node. Simultaneously, its API request frequency will be limited.
[0093] When the current credit score of the i-th node Less than When the i-th node is in the blacklist, the smart contract is triggered to cancel the node's CA certificate and remove the node from the consortium blockchain network.
[0094] In one embodiment, the preset credit threshold is dynamically adjusted after each time period. Specifically, the adjustment process of the preset credit threshold is as follows: ac.
[0095] a. After each time period t ends, collect the current credit scores of all normal nodes (nodes not in the blacklist area) in the target consortium chain.
[0096] b. Calculate the average and standard deviation of the credit scores of all nodes based on the current credit scores of all normal nodes in the target consortium blockchain.
[0097] c. Dynamically adjust the preset credit threshold based on the mean and standard deviation.
[0098] Specifically, the formula for adjusting the preset credit threshold is as follows: , , , ,
[0099] Where m is the total number of normal nodes in the target consortium blockchain. , and All are threshold coefficients. Preferably, Set to 0.6, Set to 0.3, Set to -0.2.
[0100] See Figure 2 , Figure 2This is a schematic block diagram of a consortium blockchain node risk assessment device provided in an embodiment of this application. Corresponding to the above-described consortium blockchain node risk assessment method, this application also provides a consortium blockchain node risk assessment device. This consortium blockchain node risk assessment device includes a unit for executing the above-described consortium blockchain node risk assessment method, and can be configured in a terminal such as a desktop computer, tablet computer, or laptop computer. Specifically, the consortium blockchain node risk assessment device includes: Acquisition unit 201 is used to acquire the behavior data of the i-th node in the target consortium chain within the t-th time period, where t is an integer greater than or equal to 1 and i is an integer greater than or equal to 1. Extraction unit 202 is used to extract multiple target features from the behavioral data; Execution unit 203 is used to perform range normalization processing on the feature data corresponding to each of the plurality of target features to obtain a plurality of standardized feature values, wherein the plurality of standardized feature values correspond one-to-one with the plurality of target features; The first calculation unit 204 is used to calculate the feature weight of each target feature among the plurality of target features using the entropy weight method; The second calculation unit 205 is used to calculate the node behavior fingerprint score of the i-th node based on the plurality of standardized feature values and the feature weight of each target feature among the plurality of target features. The node behavior fingerprint score is used to assess the risk level of the i-th node in the t-th time period.
[0101] In one embodiment, the first computing unit 204 is specifically used for: Calculate the information entropy of each target feature among the multiple target features to obtain multiple information entropies; The total information entropy is obtained by summing the entropies of the multiple information entropies. The total number of features is obtained by counting the number of features of the multiple target features. The feature weight of the target feature is calculated based on the information entropy of each target feature among the plurality of target features, the total information entropy, and the total number of features.
[0102] In one embodiment, the plurality of target features includes a first target feature, the plurality of information entropies includes a target information entropy, the target information entropy being the information entropy of the first target feature, and the first calculation unit 204 is specifically used for: Within the t-th time period, the feature values of all nodes in the target consortium chain on the first target feature are obtained, resulting in multiple target feature values; The total target feature value is obtained by summing the multiple target feature values. Calculate the ratio of the feature value of the i-th node on the first target feature to the total target feature value; The target information entropy is calculated based on the stated proportion.
[0103] In one embodiment, the formula for calculating the feature weight of each target feature among the plurality of target features is as follows:
[0104] in, The feature weights for the j-th target feature are: Let the information entropy of the j-th target feature be , This represents the total information entropy.
[0105] In one embodiment, the The formula for calculating is: ,
[0106] in, Let be the feature value of the i-th node on the j-th target feature within the t-th time period. Let m be the total target feature value, and m be the total number of nodes participating in the evaluation in the target consortium blockchain. Let t be the ratio of the feature value of the i-th node on the j-th target feature to the total target feature value within the t-th time period.
[0107] In one embodiment, the acquisition unit 201 is further configured to: Obtain the historical credit score of the i-th node, where the historical credit score is the credit score of the i-th node within the (t-1)-th time period; Obtain the number of serious violations triggered by the i-th node within the t-th time period; The first computing unit 204 is also used for: Based on the historical credit score, the number of serious violations, and the node behavior fingerprint score, the current credit score of the i-th node is calculated. The current credit score is the credit score of the i-th node in the t-th time period, and the current credit score is used to assess the risk level of the i-th node in the t-th time period.
[0108] In one embodiment, the device further includes: The identification unit 206 is used to identify the credit partition to which the i-th node belongs based on the current credit score and a preset credit threshold. The acquisition unit 201 is further configured to: acquire the original credit partition of the i-th node; The device further includes: Judgment unit 207 is used to determine whether the original credit partition is the same as the home credit partition; The switching unit 208 is used to switch the original credit partition of the i-th node to the home credit partition if the original credit partition is different from the home credit partition.
[0109] In one embodiment, the formula for calculating the current credit score of the i-th node is: ,
[0110] in, Let be the credit score of the i-th node during the t-th time period. Let i be the credit score of node i during the (t-1)th time period. As a factor of historical amnesia, The fingerprint score of the node behavior of the i-th node during the t-th time period. It is a non-linear exponential penalty function. and All are penalty coefficients. Let be the number of serious violations triggered by node i within time period t.
[0111] In one embodiment, the plurality of target features include: block packaging success rate, consensus delay time, number of illegal smart contract calls, and number of invalid signatures.
[0112] like Figure 3 As shown, this application provides a computer device including a processor 31, a communication interface 32, a memory 33, and a communication bus 34. The processor 31, the communication interface 32, and the memory 33 communicate with each other through the communication bus 34. The memory 33 is used to store computer programs. In one embodiment of this application, the processor 31, when executing the program stored in the memory 33, implements the control method for risk assessment of consortium blockchain nodes provided in any of the foregoing method embodiments.
[0113] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0114] Therefore, this application embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the consortium blockchain node risk assessment method provided in any of the foregoing method embodiments.
[0115] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.
[0116] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0117] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0118] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0120] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0121] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Since these modifications and variations fall within the scope of the claims and their equivalents, this application also intends to include these modifications and variations.
[0122] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for risk assessment of consortium blockchain nodes, characterized in that, include: Within the t-th time period, obtain the behavior data of the i-th node in the target consortium chain, where t is an integer greater than or equal to 1 and i is an integer greater than or equal to 1; Extract multiple target features from the behavioral data; Each of the target features is subjected to range normalization to obtain multiple standardized feature values, and the multiple standardized feature values correspond one-to-one with the multiple target features. The feature weight of each target feature among the multiple target features is calculated using the entropy weight method. Based on the multiple standardized feature values and the feature weight of each target feature among the multiple target features, the node behavior fingerprint score of the i-th node is calculated, and the node behavior fingerprint score is used to assess the risk level of the i-th node in the t-th time period.
2. The method according to claim 1, characterized in that, The step of calculating the feature weight of each target feature among the multiple target features using the entropy weight method includes: Calculate the information entropy of each target feature among the multiple target features to obtain multiple information entropies; The total information entropy is obtained by summing the entropies of the multiple information entropies. The total number of features is obtained by counting the number of features of the multiple target features. The feature weight of the target feature is calculated based on the information entropy of each target feature among the plurality of target features, the total information entropy, and the total number of features.
3. The method according to claim 2, characterized in that, The plurality of target features include a first target feature, and the plurality of information entropies include target information entropy, wherein the target information entropy is the information entropy of the first target feature. The calculation of the information entropy of each target feature among the plurality of target features to obtain multiple information entropies includes: Within the t-th time period, the feature values of all nodes in the target consortium chain on the first target feature are obtained, resulting in multiple target feature values; The total target feature value is obtained by summing the multiple target feature values. Calculate the ratio of the feature value of the i-th node on the first target feature to the total target feature value; The target information entropy is calculated based on the stated proportion.
4. The method according to claim 3, characterized in that, The formula for calculating the feature weight of each target feature among the multiple target features is as follows: in, The feature weights for the j-th target feature are: Let the information entropy of the j-th target feature be , This represents the total information entropy.
5. The method according to claim 4, characterized in that, The The formula for calculating is: , in, Let be the feature value of the i-th node on the j-th target feature within the t-th time period. Let m be the total target feature value, and m be the total number of nodes participating in the evaluation in the target consortium blockchain. Let t be the ratio of the feature value of the i-th node on the j-th target feature to the total target feature value within the t-th time period.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the historical credit score of the i-th node, where the historical credit score is the credit score of the i-th node within the (t-1)-th time period; Obtain the number of serious violations triggered by the i-th node within the t-th time period; Based on the historical credit score, the number of serious violations, and the node behavior fingerprint score, the current credit score of the i-th node is calculated. The current credit score is the credit score of the i-th node in the t-th time period, and the current credit score is used to assess the risk level of the i-th node in the t-th time period.
7. The method according to claim 6, characterized in that, The method further includes: Based on the current credit score and the preset credit threshold, identify the credit partition to which the i-th node belongs; Obtain the original credit partition of the i-th node; Determine whether the original credit partition is the same as the assigned credit partition; If the original credit partition is different from the home credit partition, then the original credit partition of the i-th node is switched to the home credit partition.
8. The method according to claim 6, characterized in that, The formula for calculating the current credit score of the i-th node is: , in, Let be the credit score of the i-th node during the t-th time period. Let i be the credit score of node i during the (t-1)th time period. As a factor of historical amnesia, The fingerprint score of the node behavior of the i-th node during the t-th time period. It is a non-linear exponential penalty function. and All are penalty coefficients. Let be the number of serious violations triggered by node i within time period t.
9. The method according to claim 1, characterized in that, The target characteristics include: block packaging success rate, consensus delay time, number of illegal smart contract calls, and number of invalid signatures.
10. A risk assessment device for consortium blockchain nodes, characterized in that, include: The acquisition unit is used to acquire the behavior data of the i-th node in the target consortium chain within the t-th time period, where t is an integer greater than or equal to 1 and i is an integer greater than or equal to 1. An extraction unit is used to extract multiple target features from the behavioral data; An execution unit is used to perform range normalization processing on the feature data corresponding to each of the multiple target features to obtain multiple standardized feature values, wherein the multiple standardized feature values correspond one-to-one with the multiple target features. The first calculation unit is used to calculate the feature weight of each target feature among the plurality of target features using the entropy weight method; The second calculation unit is used to calculate the node behavior fingerprint score of the i-th node based on the plurality of standardized feature values and the feature weight of each target feature among the plurality of target features. The node behavior fingerprint score is used to assess the risk level of the i-th node in the t-th time period.