Blockchain-based attribute access control method and device

By controlling the verification and submission logic of smart contracts on the performance scheduling node, the problem of performance degradation after the scale of blockchain nodes is expanded is solved, and the effects of reducing redundant operations and improving access control performance are achieved.

CN116502242BActive Publication Date: 2026-11-17CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210072065.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2026-11-17
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

Traditional attribute-based access control methods face performance degradation and increased redundant operations as the scale of blockchain nodes expands. This is especially true during the expansion of the Hyperledger Fabric network, where unnecessary redundant verification and commit operations between nodes within the organization affect the performance of access control.

Method used

By controlling the verification and submission logic of smart contracts on the performance scheduling node, only smart contract transactions specified by the scheduler are verified and submitted. The scheduling module dynamically adjusts the scheduler selection logic of each node according to the execution efficiency of the smart contracts, reducing redundant operations and improving performance.

Benefits of technology

It reduces network bandwidth consumption and disk I/O, improves access control performance, and enhances adaptability and robustness to changes in access traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116502242B_ABST
    Figure CN116502242B_ABST
Patent Text Reader

Abstract

This application relates to the field of blockchain technology, and provides a blockchain-based attribute access control method and apparatus, which is applied to a performance scheduling node. The method includes: receiving a block containing a specified transaction sent by a sorting node; selecting the specified transaction in the block to perform verification and commit operations according to the selection logic of a scheduler; wherein the selection logic of the scheduler is used to instruct the smart contract executed by the performance scheduling node; among the smart contracts to be invoked by the specified transaction, at least one smart contract is the smart contract indicated by the selection logic of the scheduler; the selection logic of the scheduler is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler. The blockchain-based attribute access control method and apparatus provided in this application can improve access control performance and enhance the adaptability and robustness of access control applications to changes in access traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, specifically to a blockchain-based attribute access control method and device. Background Technology

[0002] Attribute-based access control (ABAC) regulates access permissions based on attributes of subjects, resources, and context (or environment). It evaluates these attributes using predefined policies to make access decisions. ABAC primarily includes a policy information module, a policy decision module, a policy management module, a policy enforcement module, and an access auditing module. Traditional ABAC methods employ a centralized deployment, requiring the access control process to be executed through a central server. While blockchain-based attribute-based access control can achieve decentralization, it typically faces performance degradation and increased redundancy as the number of nodes grows. Summary of the Invention

[0003] To address the problems existing in the prior art, this application provides a blockchain-based attribute access control method and apparatus.

[0004] In a first aspect, embodiments of this application provide a blockchain-based attribute access control method applied to a performance scheduling node, comprising:

[0005] Receive blocks containing the specified transaction sent by the sorting node;

[0006] According to the scheduler's selection logic, the specified transaction in the block is selected to perform verification and commit operations;

[0007] The scheduler's selection logic is used to instruct the smart contract executed by the performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic; the scheduler's selection logic is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler.

[0008] Optionally, the selection logic of the scheduler is determined in the following way:

[0009] The scheduling module calculates the execution time of each smart contract within each preset time interval;

[0010] Based on the execution time and preset time threshold, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined.

[0011] Optionally, each smart contract includes a strategy information contract, a strategy decision contract, and a strategy management contract.

[0012] Optionally, the step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution time and a preset time threshold includes:

[0013] For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold within that time interval, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or,

[0014] If, within the current time interval, the first execution time is greater than a preset time threshold, and both the second and third execution times are less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the strategy information contract and the strategy management contract, and the remaining performance scheduling nodes will execute the strategy information contract, the strategy decision contract, and the strategy management contract; or...

[0015] If, within the current time interval, both the first and second execution times are greater than a preset time threshold, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, one-third of the performance scheduling nodes will execute the policy information contract and the policy management contract; the other one-third of the performance scheduling nodes will execute the policy decision contract and the policy management contract; and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract. Alternatively...

[0016] If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then it is determined that 1 / 3 of the performance scheduling nodes in each performance scheduling node will execute the strategy information contract in the next time interval, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract.

[0017] Wherein, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract.

[0018] Optionally, before receiving the block containing the specified transaction sent by the sorting node, the method further includes:

[0019] The scheduler's selection logic is sent to the sorting node so that the sorting node sends only blocks containing the specified transaction to the performance scheduling node.

[0020] Optionally, the method further includes:

[0021] Blocks containing unverified transactions are stored in the local block repository;

[0022] If it is determined that the selection logic of the scheduler has been updated, then the unverified transaction corresponding to the updated selection logic is selected from the local block repository, and the verification result of the selected unverified transaction is obtained from other performance scheduling nodes.

[0023] Secondly, embodiments of this application provide a blockchain-based attribute access control method applied to a scheduling module, comprising:

[0024] Based on the execution efficiency of each smart contract, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined.

[0025] The selection logic of the scheduler is sent to the scheduler of each performance scheduling node, so that after receiving a block containing a specified transaction sent by the sorting node, each performance scheduling node can select the specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler.

[0026] The scheduler's selection logic is used to instruct the smart contracts executed by each performance scheduling node; among the smart contracts that the specified transaction needs to invoke, at least one smart contract is the smart contract indicated by the scheduler's selection logic.

[0027] Optionally, the logic for dynamically determining the scheduler for each performance scheduling node based on the execution efficiency of each smart contract includes:

[0028] The execution time of each smart contract within each preset time interval is calculated separately;

[0029] Based on the execution time and preset time threshold, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined.

[0030] Optionally, each smart contract includes a strategy information contract, a strategy decision contract, and a strategy management contract.

[0031] Optionally, the step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution time and a preset time threshold includes:

[0032] For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold within that time interval, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or,

[0033] If, within the current time interval, the first execution time is greater than a preset time threshold, and both the second and third execution times are less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the strategy information contract and the strategy management contract, and the remaining performance scheduling nodes will execute the strategy information contract, the strategy decision contract, and the strategy management contract; or...

[0034] If, within the current time interval, both the first and second execution times are greater than a preset time threshold, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, one-third of the performance scheduling nodes will execute the policy information contract and the policy management contract; the other one-third of the performance scheduling nodes will execute the policy decision contract and the policy management contract; and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract. Alternatively...

[0035] If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then it is determined that 1 / 3 of the performance scheduling nodes in each performance scheduling node will execute the strategy information contract in the next time interval, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract.

[0036] Wherein, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract.

[0037] Optionally, before the step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution efficiency of each smart contract, the method further includes:

[0038] Receive access requests pushed by the strategy execution module, and determine each smart contract based on the access requests.

[0039] Thirdly, embodiments of this application provide a blockchain-based attribute access control device applied to a performance scheduling node, comprising:

[0040] The receiving unit is used to receive blocks containing specified transactions sent by the sorting node;

[0041] The selection unit is used to select the specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler;

[0042] The scheduler's selection logic is used to instruct the smart contract executed by the performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic; the scheduler's selection logic is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler.

[0043] Fourthly, embodiments of this application provide a blockchain-based attribute access control device applied to a scheduling module, comprising:

[0044] The second determining unit is used to dynamically determine the selection logic of the scheduler corresponding to each performance scheduling node based on the execution efficiency of each smart contract.

[0045] The second sending unit is used to send the selection logic of the scheduler to the scheduler of each performance scheduling node, so that after receiving the block containing the specified transaction sent by the sorting node, each performance scheduling node can select the specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler.

[0046] The scheduler's selection logic is used to instruct the smart contracts executed by each performance scheduling node; among the smart contracts that the specified transaction needs to invoke, at least one smart contract is the smart contract indicated by the scheduler's selection logic.

[0047] Fifthly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the steps of the blockchain-based attribute access control method described in the first or second aspect.

[0048] In a sixth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the blockchain-based attribute access control method described in the first or second aspect.

[0049] The blockchain-based attribute access control method and apparatus provided in this application control the smart contract verification and submission logic through a performance scheduling node. The node only verifies and submits transactions that call the smart contract indicated in the scheduler, which can avoid redundant verification and submission operations between nodes within the organization, reduce network bandwidth consumption and disk I / O, and improve access control performance. Furthermore, by using a scheduling module to determine the selection logic of the scheduler for each node based on the execution efficiency of the smart contract, the smart contracts executed by the performance scheduling node can be dynamically adjusted, thereby improving the adaptability and robustness of the access control application to changes in access traffic. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in 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, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is one of the flowcharts illustrating the blockchain-based attribute access control method provided in this application embodiment;

[0052] Figure 2 This is a schematic diagram of the structure of the performance scheduling node provided in the embodiments of this application;

[0053] Figure 3 This is a schematic diagram of the interaction between various modules in the blockchain-based attribute access control process provided in the embodiments of this application;

[0054] Figure 4 This is the second flowchart illustrating the blockchain-based attribute access control method provided in this application embodiment;

[0055] Figure 5 This is one of the structural schematic diagrams of the blockchain-based attribute access control device provided in the embodiments of this application;

[0056] Figure 6 This is a second schematic diagram of the structure of the blockchain-based attribute access control device provided in the embodiments of this application;

[0057] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. 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.

[0059] As application scale and network usage steadily increase, the performance of ABAC systems built using the Hyperledger Fabric blockchain platform will be limited by the performance of the Fabric network itself. While horizontal scaling of the Fabric network by adding more peer nodes can help reduce the load on endorsing nodes, this approach only works during the simulation phase due to numerous redundant operations in the verification and commit phases. Redundant operations are necessary between organizations that lack mutual trust, but not between nodes within an organization. These unnecessary redundant operations reduce the scalability of the Fabric network, impacting the performance of ABAC system data entry and authentication.

[0060] To address the aforementioned issues, the embodiments of this application provide a solution that can reduce redundant operations in the Fabric network consensus process and improve the performance of blockchain attribute access control when a blockchain-based ABAC system faces high traffic access.

[0061] Figure 1 This is one of the flowcharts illustrating a blockchain-based attribute access control method provided in an embodiment of this application. (Refer to...) Figure 1 This application provides a blockchain-based attribute access control method, which can be applied to performance scheduling nodes, and includes the following steps:

[0062] Step 100: Receive the block containing the specified transaction sent by the sorting node;

[0063] Step 101: According to the scheduler's selection logic, select the specified transaction in the block to perform verification and commit operations;

[0064] The scheduler's selection logic is used to instruct the smart contracts to be executed by the performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic; the scheduler's selection logic is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler.

[0065] Specifically, existing applications based on the Hyperledger Fabric framework exhibit poor scalability. When scaling horizontally by adding more nodes, numerous unnecessary redundant operations occur between nodes within the organization, significantly slowing down verification and commit operations and reducing the overall performance of the application.

[0066] This application's embodiments implement access control based on performance scheduling nodes. Figure 2 This is a schematic diagram of the structure of the performance scheduling node provided in the embodiments of this application, such as... Figure 2 As shown, the performance scheduling node mainly includes a scheduler, scheduler database, verifier, committer, state database, historical state database, and block repository.

[0067] Each performance scheduling node has a scheduler and uses this scheduler to process received blocks to identify which transactions require the performance scheduling node to perform verification and commit operations.

[0068] The scheduler database contains all the schedulers used by the performance scheduling nodes; the verification program and the submission program are used to perform verification and submission operations, respectively; the status database and the historical status database are used to record the real-time status data and historical status data of the performance scheduling nodes, respectively.

[0069] The core idea of ​​performance scheduling nodes is to selectively validate and commit transactions. If all performance scheduling nodes within an organization select a set of non-overlapping transactions, redundant operations between nodes can be avoided, Fabric network bandwidth utilization and disk I / O can be reduced, thereby improving the performance of the overall access control process.

[0070] The performance scheduling node only verifies and commits transactions that invoke smart contracts specified in the scheduler. When a transaction invokes multiple smart contracts, the performance scheduling node will also perform the verification and commit operations for that transaction as long as at least one of these smart contracts is specified by the scheduler.

[0071] Figure 3 This application provides a schematic diagram illustrating the interaction between modules in a blockchain-based attribute access control process. Figure 3 As shown, in this process, the access request sent by the client to the policy execution module is pushed to the scheduling module by the policy execution module, and the scheduling module then pushes the access request to the nodes on the blockchain. Among them, the sorting nodes on the blockchain (each performance scheduling node is connected to the sorting node, which is not shown in the diagram) can send the block containing the specified transaction to the corresponding performance scheduling node.

[0072] The scheduling module can set the execution logic of each performance scheduling node. Specifically, the scheduling module can dynamically determine the selection logic of the scheduler of each performance scheduling node based on the execution efficiency of each smart contract, and send the determined selection logic to each scheduler. Thus, after receiving the block sent by the sorting node, the performance scheduling node can select the specified transaction in the block to perform verification and commit operations according to the selection logic of its scheduler.

[0073] Optionally, before receiving the block containing the specified transaction sent by the sorting node, the method may further include:

[0074] Send the scheduler's selection logic to the sorting node so that the sorting node only sends blocks containing the specified transactions to the performance scheduler node.

[0075] Specifically, the embodiments of this application can adopt a block distribution method based on the scheduler. After receiving the selection logic sent by the scheduling module, the performance scheduling node can send its scheduler's selection logic to the sorting node, and allocate the scheduler's selection logic to the sorting node. This allows the sorting node to send appropriate transactions to each performance scheduling node through blocks, which can save network bandwidth utilization and disk I / O.

[0076] Each performance scheduling node sends its scheduler selection logic to the sorting nodes it is connected to. For each block of a performance scheduling node, the sorting node will apply the selection logic of the scheduler corresponding to this performance scheduling node and send only the transactions specified by the scheduler to the performance scheduling node.

[0077] Specifically, the main process of transaction operation of the performance scheduling node is as follows: (1) The scheduling module determines the selection logic and transmits the selection logic to the scheduler of each performance scheduling node so that each performance scheduling node selects the corresponding transaction to perform verification and commit operations; (2) The scheduler of the performance scheduling node changes the verification procedure and the commit procedure to apply the selection logic to the received block; (3) The performance scheduling node passes the selection logic to the sorting node so that the sorting node can also apply the scheduler's selection logic and send the required transaction only in the specified block.

[0078] In this embodiment of the application, access control is based on performance scheduling nodes. First, it is necessary to define the access policy smart contract. Optionally, each smart contract may include a policy information contract, a policy decision contract, and a policy management contract.

[0079] Specifically, the strategy information operation, strategy decision operation, and strategy management operation processes of this method are all carried out by multiple blockchain nodes using smart contracts. At the same time, the access control process is stored on the chain, and the smart contracts are used to automatically complete the query and verification processes, which can prevent clients from distrusting the access control policy.

[0080] The three main smart contracts are the policy information contract, the policy decision contract, and the policy management contract. User and resource attributes are stored in the policy information contract using JavaScript Object Notation (JSON) format. The policy information contract is responsible for updating attribute values ​​and checking for write conflicts. The policy management contract is responsible for managing and updating policies, which are stored in JSON format. Different organizations use different policy management contracts. The policy decision contract is responsible for evaluating the attributes and policies related to the request and deciding whether to allow access.

[0081] The following example illustrates the storage format of access control-related attributes and policy data.

[0082] Assume a network resource repository uses this method for resource access control based on user-related attributes and resource-related attributes. For each user, a User ID (UID) is used as the user identifier, and the user's attributes and attribute values ​​are also stored. For each resource, a Resource ID (RID) is used as the resource identifier. Attributes are identified using attribute IDs. Hyperledger itself uses CouchDB and LevelDB key-value databases for storage, storing entity IDs, resource IDs, and attribute IDs as keys.

[0083] Let U n A is the user entity U n The set of attributes, U n ID identifier user U n R n A is the resource entity R. n The set of attributes, R n ID identification resources R n P n SA and P n RA is the set of user and resource attributes required in a decision-making strategy. Policy ID (P) n The ID field identifies the policy. For each policy, this method links the policy rules with the set of determinant attributes (P). n SA, P n RA) are stored together.

[0084] U n A={U n ID, {{U n A1, value}, ..., {U n A n ,value}}}.

[0085] R n A={R n ID, {{R nA1, value}, ..., {R} n A n ,value}}}.

[0086] Let UA be the set of all user attributes, and RA be the set of attributes for all resource entities. Assuming the resource repository primarily stores electronic contracts, an example of the attributes stored for user U1A and contract object R1A would be:

[0087] U1A={u001, {status, true}, {accessLevel, m1}, {userGroup, manager}};

[0088] R1A={c001,{type,leverageContract},{userGroup,manager}}.

[0089] An example of access policy P1 is as follows:

[0090] P1={policy01, U1A, R1A, {status==true∧accessLevel≥1∧user.userGroup=

[0091] =resource.userGroup}}.

[0092] All access control-related attributes and policy data are stored in JSON format, facilitating migration and expansion to other applications. Based on a given policy, user, resource, and its attributes, the system determines whether an access request passes validation. In this example, if the user has a valid ID, meets the required access level, and the user group matches, the access request is allowed.

[0093] The main flow of the entire access control process is as follows:

[0094] 1. The client sends an access request to the policy execution module.

[0095] 2. The strategy execution module pushes the access request to the scheduling module.

[0096] 3. The scheduling module sets the contracts that need to be verified and submitted for the scheduler of the performance scheduling node, and pushes the required operations to each performance scheduling node. Each performance scheduling node executes the verification and submission logic specified by the scheduler.

[0097] 4. The blockchain system executes the strategy decision contract and calls the strategy management contract and strategy information contract to query relevant strategies and attributes.

[0098] 5. After obtaining the relevant information, the strategy decision contract assesses whether access is allowed and sends the assessment result to the strategy execution module.

[0099] 6. Evaluation results of the strategy execution module.

[0100] The blockchain-based attribute access control method provided in this application controls the smart contract verification and submission logic through a performance scheduling node. The node only verifies and submits transactions that call the smart contract indicated in the scheduler, which can avoid redundant verification and submission operations between nodes within the organization, reduce network bandwidth consumption and disk I / O, and improve access control performance. Furthermore, by using a scheduling module to determine the selection logic of the scheduler for each node based on the execution efficiency of the smart contract, the smart contracts executed by the performance scheduling node can be dynamically adjusted, thereby improving the adaptability and robustness of the access control application to changes in access traffic.

[0101] Optionally, the scheduler selection logic is determined in the following way:

[0102] The scheduling module calculates the execution time of each smart contract within each preset time interval;

[0103] The selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and preset time threshold.

[0104] Specifically, in this embodiment, the selection logic of the scheduler corresponding to the performance scheduling node is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to each scheduler. For example, when the execution frequency and latency of a certain smart contract increase significantly, a single performance scheduling node can be allowed to execute the contract, reducing the execution of such contracts by other performance scheduling nodes; when the system has the highest requirements for authentication performance, each performance scheduling node only executes the transaction verification and commit operation related to a single contract.

[0105] During the actual execution process, the scheduling module can pre-set the contract execution time verification interval T. interval In each T interval Within this process, the execution time of each smart contract is calculated. For example, the sum of the execution times of the strategy decision contract by each performance scheduling node is the execution time of the strategy decision contract. Then, based on the execution time of each smart contract and a pre-set execution time threshold T, the execution time is calculated... max The selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined, and then a request is sent to each performance scheduling node process through Google Remote Procedure Calls (gRPC) to allocate or update the selection logic of the scheduler.

[0106] Optionally, the selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and a preset time threshold, including:

[0107] For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or,

[0108] If, within the current time interval, the first execution time is greater than a preset time threshold, while the second and third execution times are both less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0109] If, within the current time interval, both the first and second execution times are greater than preset time thresholds, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, the other 1 / 3 of the performance scheduling nodes will execute the policy decision contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0110] If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the strategy information contract, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract.

[0111] Among them, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract.

[0112] Specifically, assuming that each performance scheduling node only executes contracts related to attribute access control methods, and the time threshold for executing these contracts is T. max The contract execution time verification interval is T. interval The execution times of strategy information contract C1, strategy decision contract C2, and strategy management contract C3 are T, respectively. c1 Tc2 and T c3 Assume there are m performance scheduling nodes, and the i-th performance scheduling node executes N contracts. ai (3≥N ai ≥1).

[0113] 1. Let N ai =3, each performance scheduling node executes C1, C2 and C3, at this time the contract executes the operation without reducing redundancy.

[0114] 2. Every time T passes interval Verify the contract execution time T c1 T c2 T c3 Whether it is within the threshold range, and the order of execution time.

[0115] a) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 <T max T c2 <T max T c3 <T max T c1 >T c2 >T c3 Then the next T interval Each scheduling node continues to execute the three contracts.

[0116] b) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 >T max T c2 <T max T c3 <T max And T c1 >T c2 >T c3 Then the next T interval Select m / 3 performance scheduling nodes to execute C1 and C3, and the other nodes to execute the three contracts.

[0117] c) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 >T max T c2 >T max T c3 <T max And T c1 >T c2 >T c3 Then the next T intervalSelect m / 3 performance scheduling nodes to execute C1 and C3, select another m / 3 performance nodes to execute C2 and C3, and the other nodes execute the three contracts.

[0118] d) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 >T max T c2 >T max T c3 >T max Then the next T interval Select m / 3 performance scheduling nodes, these nodes execute C1; select another m / 3 performance nodes, these nodes execute C2; ​​and the other nodes execute C3.

[0119] Optionally, the method further includes:

[0120] Blocks containing unverified transactions are stored in the local block repository;

[0121] If the scheduler's selection logic is updated, then select the unverified transaction corresponding to the updated selection logic from the local block repository, and obtain the verification result of the selected unverified transaction from other performance scheduling nodes.

[0122] Specifically, the transaction dependency extraction program in the performance scheduling node reads a block from the queue. This program invokes the transaction of the smart contract specified by the scheduler and adds it to the pending transaction dependency graph. When the submitting program reads the block, it marks transactions that do not invoke the smart contract specified by the scheduler as unverified and stores the entire block in the local block repository. When the scheduling module updates the scheduler's selection logic, the performance scheduling node can retrieve all transactions associated with the newly added smart contract from its local block repository and then obtain the verification results from the block repositories of other performance scheduling nodes, thus avoiding re-verification.

[0123] The following is an example of implementing access control procedure commit operations using a performance scheduling node:

[0124] Assume there are two performance scheduling nodes, P and Q. The policy decision contract is deployed on node P, and the policy information contract is deployed on node Q. A distributed simulation is needed to enable the policy decision contract on P to call the policy information contract on Q. The response returned by the policy information contract contains the contract's read and write records of its state, and this response is returned to node P. The scheduler database contains schedulers used by all nodes, and the schedulers determine which node's other contract should be called by a specific smart contract on the performance scheduling node.

[0125] Assume that performance scheduling nodes are allocated based on the strategy decision contract, strategy information contract, and strategy management contract. Each performance scheduling node executes only a single contract-related transaction verification and commit operation. After the distributed simulation process is completed, distributed verification and distributed commit are used to complete the entire on-chain process. Suppose that transaction T needs to call the strategy decision contract, strategy information contract, and strategy management contract, and there are performance scheduling nodes P1, P2, ..., P... n Each node P i With scheduler D i Correspondingly, scheduler D i Contains a single smart contract S i If a transaction needs to call all three smart contracts, during the verification phase, the transaction is considered valid if it simultaneously passes the policy checks and serialization checks of all smart contracts. Therefore, when committing the transaction, all n performance scheduling nodes need to consistently provide valid results during the verification phase.

[0126] Each performance scheduling node P i Verification and Smart Contracts i The relevant parts of the transaction are processed, and the results are then broadcast to all other nodes. Once a node receives valid results from all smart contracts, it determines that the transaction is valid and commits it. If a node receives an invalid result, it can declare the transaction invalid without waiting for further results. Because the nodes within the organization trust each other, there are no security issues.

[0127] Figure 4 This is a second schematic flowchart illustrating the blockchain-based attribute access control method provided in this application embodiment. (Refer to...) Figure 4 This application provides a blockchain-based attribute access control method, which can be applied to a scheduling module and includes the following steps:

[0128] Step 400: Based on the execution efficiency of each smart contract, dynamically determine the selection logic of the scheduler corresponding to each performance scheduling node;

[0129] Step 401: Send the scheduler's selection logic to the scheduler of each performance scheduling node, so that after receiving the block containing the specified transaction sent by the sorting node, each performance scheduling node can select the specified transaction in the block to perform verification and commit operations according to the scheduler's selection logic.

[0130] The scheduler's selection logic is used to instruct each performance scheduling node to execute the smart contract; among the smart contracts that a specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic.

[0131] Specifically, existing applications based on the Hyperledger Fabric framework exhibit poor scalability. When scaling horizontally by adding more nodes, numerous unnecessary redundant operations occur between nodes within the organization, significantly slowing down verification and commit operations and reducing the overall performance of the application.

[0132] This application's embodiments are based on performance scheduling nodes for access control. The core idea of ​​performance scheduling nodes is to selectively verify and commit transactions. If all performance scheduling nodes within an organization select a set of non-overlapping transactions, redundant operations between nodes within the organization can be avoided, reducing Fabric network bandwidth utilization and disk I / O, thereby improving the performance of the overall access control process.

[0133] The scheduling module can set the execution logic of each performance scheduling node. Specifically, the scheduling module can dynamically determine the selection logic of the scheduler of each performance scheduling node based on the execution efficiency of each smart contract, and send the determined selection logic to each scheduler. Thus, after receiving the block sent by the sorting node, the performance scheduling node can select the specified transaction in the block to perform verification and commit operations according to the selection logic of its scheduler.

[0134] The blockchain-based attribute access control method provided in this application controls the smart contract verification and submission logic through a performance scheduling node. The node only verifies and submits transactions that call the smart contract indicated in the scheduler, which can avoid redundant verification and submission operations between nodes within the organization, reduce network bandwidth consumption and disk I / O, and improve access control performance. Furthermore, by using a scheduling module to determine the selection logic of the scheduler for each node based on the execution efficiency of the smart contract, the smart contracts executed by the performance scheduling node can be dynamically adjusted, thereby improving the adaptability and robustness of the access control application to changes in access traffic.

[0135] Optionally, based on the execution efficiency of each smart contract, the selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined, including:

[0136] The execution time of each smart contract within each preset time interval is calculated separately;

[0137] The selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and preset time threshold.

[0138] Specifically, in this embodiment, the selection logic of the scheduler corresponding to the performance scheduling node is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to each scheduler. For example, when the execution frequency and latency of a certain smart contract increase significantly, a single performance scheduling node can be allowed to execute the contract, reducing the execution of such contracts by other performance scheduling nodes; when the system has the highest requirements for authentication performance, each performance scheduling node only executes the transaction verification and commit operation related to a single contract.

[0139] During the actual execution process, the scheduling module can pre-set the contract execution time verification interval T. interval In each T interval Within this process, the execution time of each smart contract is calculated. For example, the sum of the execution times of the strategy decision contract by each performance scheduling node is the execution time of the strategy decision contract. Then, based on the execution time of each smart contract and a pre-set execution time threshold T, the execution time is calculated... max The system dynamically determines the scheduler selection logic for each performance scheduling node, and then uses gRPC to send requests to each performance scheduling node process to allocate or update the scheduler selection logic. Optionally, each smart contract may include a policy information contract, a policy decision contract, and a policy management contract.

[0140] Optionally, the selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and a preset time threshold, including:

[0141] For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or,

[0142] If, within the current time interval, the first execution time is greater than a preset time threshold, while the second and third execution times are both less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0143] If, within the current time interval, both the first and second execution times are greater than preset time thresholds, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, the other 1 / 3 of the performance scheduling nodes will execute the policy decision contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0144] If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the strategy information contract, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract.

[0145] Among them, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract.

[0146] Specifically, assuming that each performance scheduling node only executes contracts related to attribute access control methods, and the time threshold for executing these contracts is T. max The contract execution time verification interval is T. interval The execution times of strategy information contract C1, strategy decision contract C2, and strategy management contract C3 are T, respectively. c1 T c2 and T c3 Assume there are m performance scheduling nodes, and the i-th performance scheduling node executes N contracts. ai (3≥N ai ≥1).

[0147] 1. Let N ai =3, each performance scheduling node executes C1, C2 and C3, at this time the contract executes the operation without reducing redundancy.

[0148] 2. Every time T passes interval Verify the contract execution time T c1 ,T c2 ,T c3 Whether it is within the threshold range, and the order of execution time.

[0149] a) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 <T max T c2 <T maxT c3 <T max T c1 >T c2 >T c3 Then the next T interval Each scheduling node continues to execute the three contracts.

[0150] b) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 >T max T c2 <T max T c3 <T max And T c1 >T c2 >T c3 Then the next T interval Select m / 3 performance scheduling nodes to execute C1 and C3, and the other nodes to execute the three contracts.

[0151] c) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 >T max T c2 >T max T c3 <T max And T c1 >T c2 >T c3 Then the next T interval Select m / 3 performance scheduling nodes to execute C1 and C3, select another m / 3 performance nodes to execute C2 and C3, and the other nodes execute the three contracts.

[0152] d) If this T interval Within this timeframe, the cumulative execution time of the three contracts respectively satisfies T. c1 >T max T c2 >T max T c3 >T max Then the next T interval Select m / 3 performance scheduling nodes, these nodes execute C1; select another m / 3 performance nodes, these nodes execute C2; ​​and the other nodes execute C3.

[0153] Optionally, before dynamically determining the scheduler selection logic for each performance scheduling node based on the execution efficiency of each smart contract, the method further includes:

[0154] Receive access requests pushed by the strategy execution module, and determine each smart contract based on the access requests.

[0155] Specifically, the access request sent by the client to the policy execution module can be pushed to the scheduling module by the policy execution module. The scheduling module can determine the transaction corresponding to the access request and the smart contract to be called based on the access request, thereby determining which smart contracts need to be statistically analyzed for execution efficiency. Based on the execution efficiency of these smart contracts, the scheduling module can dynamically determine the selection logic of the scheduler corresponding to each performance scheduling node.

[0156] The methods provided in the various embodiments of this application are based on the same concept. Therefore, the implementation of the methods on the performance scheduling node side and the scheduling module side can refer to each other, and repeated details will not be repeated.

[0157] The following describes the blockchain-based attribute access control device provided in the embodiments of this application. The blockchain-based attribute access control device described below and the blockchain-based attribute access control method described above can be referred to in correspondence.

[0158] Figure 5 This is one of the structural schematic diagrams of a blockchain-based attribute access control device provided in an embodiment of this application. (Refer to...) Figure 5 This application provides a blockchain-based attribute access control device, which can be applied to a performance scheduling node and may include:

[0159] The first receiving unit 500 is used to receive a block containing a specified transaction sent by the sorting node;

[0160] The first selection unit 510 is used to select a specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler;

[0161] The scheduler's selection logic is used to instruct the smart contracts to be executed by the performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic; the scheduler's selection logic is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler.

[0162] Optionally, the scheduler selection logic is determined in the following way:

[0163] The scheduling module calculates the execution time of each smart contract within each preset time interval;

[0164] The selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and preset time threshold.

[0165] Optionally, each smart contract includes a strategy information contract, a strategy decision contract, and a strategy management contract.

[0166] Optionally, the selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and a preset time threshold, including:

[0167] For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or,

[0168] If, within the current time interval, the first execution time is greater than a preset time threshold, while the second and third execution times are both less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0169] If, within the current time interval, both the first and second execution times are greater than preset time thresholds, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, the other 1 / 3 of the performance scheduling nodes will execute the policy decision contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0170] If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the strategy information contract, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract.

[0171] Among them, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract.

[0172] Optionally, the device further includes:

[0173] The first sending unit 520 is used to send the scheduler's selection logic to the sorting node, so that the sorting node sends only the blocks containing the specified transactions to the performance scheduling node.

[0174] Optionally, the device further includes:

[0175] The first storage unit 530 is used to store blocks containing unverified transactions in the local block repository;

[0176] The first acquisition unit 540 is used to determine if the scheduler's selection logic has been updated, then select an unverified transaction corresponding to the updated selection logic from the local block repository, and obtain the verification result of the selected unverified transaction from other performance scheduling nodes.

[0177] Figure 6 This is a second schematic diagram of the structure of a blockchain-based attribute access control device provided in an embodiment of this application. (Refer to...) Figure 6 This application provides a blockchain-based attribute access control device, which can be applied to a scheduling module and may include:

[0178] The second determining unit 600 is used to dynamically determine the selection logic of the scheduler corresponding to each performance scheduling node based on the execution efficiency of each smart contract.

[0179] The second sending unit 610 is used to send the selection logic of the scheduler to the scheduler of each performance scheduling node, so that after each performance scheduling node receives the block containing the specified transaction sent by the sorting node, it can select the specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler.

[0180] The scheduler's selection logic is used to instruct each performance scheduling node to execute the smart contract; among the smart contracts that a specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic.

[0181] Optionally, based on the execution efficiency of each smart contract, the selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined, including:

[0182] The execution time of each smart contract within each preset time interval is calculated separately;

[0183] The selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and preset time threshold.

[0184] Optionally, each smart contract includes a strategy information contract, a strategy decision contract, and a strategy management contract.

[0185] Optionally, the selection logic for the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution time and a preset time threshold, including:

[0186] For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or,

[0187] If, within the current time interval, the first execution time is greater than a preset time threshold, while the second and third execution times are both less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0188] If, within the current time interval, both the first and second execution times are greater than preset time thresholds, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the policy information contract and the policy management contract, the other 1 / 3 of the performance scheduling nodes will execute the policy decision contract and the policy management contract, and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract; or...

[0189] If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then in the next time interval, it is determined that 1 / 3 of the performance scheduling nodes will execute the strategy information contract, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract.

[0190] Among them, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract.

[0191] Optionally, the device further includes:

[0192] The second receiving unit 620 is used to receive access requests pushed by the strategy execution module and determine each smart contract based on the access requests.

[0193] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call the computer program in the memory 730 to execute the steps of the blockchain-based attribute access control method provided in the above embodiments, such as: receiving a block containing a specified transaction sent by a sorting node; selecting the specified transaction in the block to perform verification and commit operations according to the scheduler's selection logic; wherein the scheduler's selection logic is used to instruct the smart contract executed by the performance scheduling node; among the smart contracts to be invoked by the specified transaction, at least one smart contract is the smart contract indicated by the scheduler's selection logic; the scheduler's selection logic is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler; or, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined based on the execution efficiency of each smart contract; sending the scheduler's selection logic to the scheduler of each performance scheduling node, so that each performance scheduling node, after receiving the block containing the specified transaction sent by the sorting node, selects the specified transaction in the block to perform verification and commit operations according to the scheduler's selection logic; wherein the scheduler's selection logic is used to instruct the smart contract executed by each performance scheduling node; among the smart contracts to be invoked by the specified transaction, at least one smart contract is the smart contract indicated by the scheduler's selection logic.

[0194] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion 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, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0195] It should be noted that the electronic device provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0196] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the blockchain-based attribute access control method provided in the above embodiments.

[0197] It should be noted that the computer program product provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0198] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to execute the steps of the blockchain-based attribute access control method provided in the above embodiments.

[0199] It should be noted that the processor-readable storage medium provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0200] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0201] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0202] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A blockchain-based attribute-based access control method, characterized in that, Applied to performance scheduling nodes, including: Receive blocks containing the specified transaction sent by the sorting node; According to the scheduler's selection logic, the specified transaction in the block is selected to perform verification and commit operations; The scheduler's selection logic is used to instruct the smart contract executed by the performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic; the scheduler's selection logic is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler. The selection logic of the scheduler is determined in the following way: The scheduling module calculates the execution time of each smart contract within each preset time interval; Based on the execution time and preset time threshold, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined; The step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution time and a preset time threshold includes: For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold within that time interval, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or, If, within the current time interval, the first execution time is greater than a preset time threshold, and both the second and third execution times are less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the strategy information contract and the strategy management contract, and the remaining performance scheduling nodes will execute the strategy information contract, the strategy decision contract, and the strategy management contract; or... If, within the current time interval, both the first and second execution times are greater than a preset time threshold, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, one-third of the performance scheduling nodes will execute the policy information contract and the policy management contract; the other one-third of the performance scheduling nodes will execute the policy decision contract and the policy management contract; and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract. Alternatively... If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then it is determined that 1 / 3 of the performance scheduling nodes in each performance scheduling node will execute the strategy information contract in the next time interval, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract. Wherein, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract; Before receiving the block containing the specified transaction sent by the sorting node, the method further includes: The scheduler's selection logic is sent to the sorting node so that the sorting node sends only blocks containing the specified transaction to the performance scheduling node. 2.The blockchain-based attribute access control method of claim 1, wherein, The smart contracts include a strategy information contract, a strategy decision contract, and a strategy management contract. 3.The blockchain-based attribute access control method of claim 1, wherein, The method further includes: Blocks containing unverified transactions are stored in the local block repository; If it is determined that the selection logic of the scheduler has been updated, then the unverified transaction corresponding to the updated selection logic is selected from the local block repository, and the verification result of the selected unverified transaction is obtained from other performance scheduling nodes. 4.A blockchain-based attribute-based access control method, characterized in that, Applied to the scheduling module, including: Based on the execution efficiency of each smart contract, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined. The selection logic of the scheduler is sent to the scheduler of each performance scheduling node, so that after receiving a block containing a specified transaction sent by the sorting node, each performance scheduling node can select the specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler. The scheduler's selection logic is used to instruct the smart contracts executed by each performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic. The selection logic for dynamically determining the scheduler corresponding to each performance scheduling node based on the execution efficiency of each smart contract includes: The execution time of each smart contract within each preset time interval is calculated separately; Based on the execution time and preset time threshold, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined; The step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution time and a preset time threshold includes: For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold within that time interval, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or, If, within the current time interval, the first execution time is greater than a preset time threshold, and both the second and third execution times are less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the strategy information contract and the strategy management contract, and the remaining performance scheduling nodes will execute the strategy information contract, the strategy decision contract, and the strategy management contract; or... If, within the current time interval, both the first and second execution times are greater than a preset time threshold, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, one-third of the performance scheduling nodes will execute the policy information contract and the policy management contract; the other one-third of the performance scheduling nodes will execute the policy decision contract and the policy management contract; and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract. Alternatively... If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then it is determined that 1 / 3 of the performance scheduling nodes in each performance scheduling node will execute the strategy information contract in the next time interval, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract. Wherein, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract. 5.The blockchain-based attribute access control method of claim 4, wherein, The smart contracts include a strategy information contract, a strategy decision contract, and a strategy management contract. 6.The blockchain-based attribute access control method of claim 4, wherein, Before the step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution efficiency of each smart contract, the method further includes: Receive access requests pushed by the strategy execution module, and determine each smart contract based on the access requests.

7. A blockchain-based attribute access control device, characterized in that, Applied to performance scheduling nodes, including: The first receiving unit is used to receive blocks containing specified transactions sent by the sorting node; The first selection unit is used to select the specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler; The scheduler's selection logic is used to instruct the smart contract executed by the performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic; the scheduler's selection logic is dynamically determined by the scheduling module based on the execution efficiency of each smart contract and sent to the scheduler. The selection logic of the scheduler is determined in the following way: The scheduling module calculates the execution time of each smart contract within each preset time interval; Based on the execution time and preset time threshold, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined; The step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution time and a preset time threshold includes: For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold within that time interval, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or, If, within the current time interval, the first execution time is greater than a preset time threshold, and both the second and third execution times are less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the strategy information contract and the strategy management contract, and the remaining performance scheduling nodes will execute the strategy information contract, the strategy decision contract, and the strategy management contract; or... If, within the current time interval, both the first and second execution times are greater than a preset time threshold, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, one-third of the performance scheduling nodes will execute the policy information contract and the policy management contract; the other one-third of the performance scheduling nodes will execute the policy decision contract and the policy management contract; and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract. Alternatively... If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then it is determined that 1 / 3 of the performance scheduling nodes in each performance scheduling node will execute the strategy information contract in the next time interval, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract. Wherein, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract; The device further includes: The first sending unit is used to send the scheduler's selection logic to the sorting node, so that the sorting node sends only the block containing the specified transaction to the performance scheduling node.

8. A blockchain-based attribute access control device, characterized in that, Applied to the scheduling module, including: The second determining unit is used to dynamically determine the selection logic of the scheduler corresponding to each performance scheduling node based on the execution efficiency of each smart contract. The second sending unit is used to send the selection logic of the scheduler to the scheduler of each performance scheduling node, so that after receiving the block containing the specified transaction sent by the sorting node, each performance scheduling node can select the specified transaction in the block to perform verification and commit operations according to the selection logic of the scheduler. The scheduler's selection logic is used to instruct the smart contracts executed by each performance scheduling node; among the smart contracts that the specified transaction needs to call, at least one smart contract is the smart contract indicated by the scheduler's selection logic. The selection logic for dynamically determining the scheduler corresponding to each performance scheduling node based on the execution efficiency of each smart contract includes: The execution time of each smart contract within each preset time interval is calculated separately; Based on the execution time and preset time threshold, the selection logic of the scheduler corresponding to each performance scheduling node is dynamically determined; The step of dynamically determining the scheduler selection logic for each performance scheduling node based on the execution time and a preset time threshold includes: For any given time interval, if the first execution time, the second execution time, and the third execution time are all less than a preset time threshold within that time interval, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that each performance scheduling node will execute the strategy information contract, the strategy decision contract, and the strategy management contract in the next time interval; or, If, within the current time interval, the first execution time is greater than a preset time threshold, and both the second and third execution times are less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, 1 / 3 of the performance scheduling nodes will execute the strategy information contract and the strategy management contract, and the remaining performance scheduling nodes will execute the strategy information contract, the strategy decision contract, and the strategy management contract; or... If, within the current time interval, both the first and second execution times are greater than a preset time threshold, and the third execution time is less than the preset time threshold, and the first execution time is greater than the second execution time, and the second execution time is greater than the third execution time, then it is determined that in the next time interval, one-third of the performance scheduling nodes will execute the policy information contract and the policy management contract; the other one-third of the performance scheduling nodes will execute the policy decision contract and the policy management contract; and the remaining performance scheduling nodes will execute the policy information contract, the policy decision contract, and the policy management contract. Alternatively... If the first execution time, the second execution time, and the third execution time are all greater than the preset time threshold in the current time interval, then it is determined that 1 / 3 of the performance scheduling nodes in each performance scheduling node will execute the strategy information contract in the next time interval, the other 1 / 3 of the performance scheduling nodes will execute the strategy decision contract, and the remaining performance scheduling nodes will execute the strategy management contract. Wherein, the first execution time is the execution time corresponding to the strategy information contract, the second execution time is the execution time corresponding to the strategy decision contract, and the third execution time is the execution time corresponding to the strategy management contract.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the blockchain-based attribute access control method according to any one of claims 1 to 3, or implements the steps of the blockchain-based attribute access control method according to any one of claims 4 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the blockchain-based attribute access control method according to any one of claims 1 to 3, or the steps of the blockchain-based attribute access control method according to any one of claims 4 to 6.

Citation Information

Patent Citations

  • Block chain accessing method and system, block chain node device and user terminal

    CN107819829A

  • Method and device for executing an intelligent contract in a block chain

    CN109872157A