A privacy protection method for off-chain calculation based on hierarchical excitation
Through the layered incentive mechanism and ring signature technology, the problems of unfair task allocation and insufficient privacy protection in off-chain computing are solved, the rational allocation of computing resources and the efficient and secure execution of tasks are achieved, and the dynamic changes of the blockchain system are adapted.
Patent Information
- Application Number
- CN202411552681.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-01
AI Technical Summary
In existing off-chain computing solutions, task allocation lacks fairness and flexibility, and the privacy protection of computing node identity and task allocation information is insufficient, which may lead to nodes being marginalized or attacked, affecting the enthusiasm of computing nodes and system security.
A hierarchical incentive mechanism is adopted. Through smart contracts and trusted execution environment, combined with ring signature technology, a hierarchical incentive mechanism is designed to fairly distribute tasks, protect the identity of computing nodes and the privacy of task allocation, and ensure the reasonable allocation of computing resources and timely processing of tasks.
It achieves fair distribution of computing tasks and rewards, improves the utilization rate of computing nodes and task execution efficiency, enhances the security and privacy protection of the system, and adapts to dynamic changes in computing needs.
Smart Images

Figure CN119420484B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of block chain, and particularly relates to a privacy protection method for off-chain calculation based on hierarchical incentive. BACKGROUND
[0002] With the rapid growth of blockchain technology, it faces great challenges in scalability and efficiency. Off-chain calculation solves the problems existing in the blockchain by moving the task processing out of the blockchain environment; on the one hand, it uses off-chain calculation nodes with sufficient computing resources and processing capacity to improve transaction processing speed, thereby improving the scalability and efficiency of the blockchain, especially in large-scale computing scenarios; on the other hand, through the combination of off-chain calculation and cryptography methods such as zero-knowledge proof, homomorphic encryption, secure multi-party computation, etc., the scalability of the blockchain is promoted while the data privacy is protected. In addition, the trusted execution environment (TEE) also provides a secure execution environment for off-chain calculation, ensuring that the code and data on the off-chain calculation node are immune to malicious tampering or theft. With the support of the above-mentioned cutting-edge technologies, off-chain calculation has been regarded as one of the promising technologies to enhance the scalability of the blockchain and support its wide application.
[0003] In addition to the above-mentioned cutting-edge technology for off-chain computing, incentive mechanisms play a special role in ensuring the trustworthy behavior and active participation of off-chain nodes. While off-chain computing improves the scalability of the blockchain, off-chain computing nodes may attempt to obtain additional profits through fraud, data tampering, or other dishonest behavior. To ensure the correct execution of computing tasks during off-chain computing, incentive mechanisms become a promising solution, effectively constraining the behavior of computing nodes, making malicious behavior costly, and honest behavior the optimal choice. In addition, incentive mechanisms can also encourage off-chain computing nodes to actively participate in off-chain computing, thereby ensuring sufficient computing resources for the blockchain. In recent years, related work has focused on researching incentive mechanisms for decentralized outsourcing computing, such as those in blockchain-based crowdsourcing and crowdsensing, which outsource computing tasks to workers outside the blockchain environment, while the blockchain is responsible for the management and public auditing of crowdsourcing and crowdsensing systems. According to the allocation method of computing resources, related work can be divided into two categories: market mechanisms and auction algorithms; in market mechanisms, computing nodes autonomously select computing tasks of interest, submit computing results to verification nodes after completing off-chain computing, and finally the blockchain is responsible for auditing and settlement; in auction algorithms, computing nodes compete for the right to execute computing tasks by bidding, and the blockchain selects the most suitable computing node according to different auction rules. However, in existing solutions, some solutions do not fully consider the fairness of task allocation, leading to the possibility of resource monopolization by some computing nodes, while other nodes may feel marginalized and unfairly treated, thereby reducing their participation enthusiasm and contribution. Some methods focus on fixed allocation strategies and pre-set incentive measures, making the incentive mechanism lack the necessary flexibility to adapt to changes in computing demand and the urgency of tasks, thereby affecting the stable participation of high-quality computing nodes and their response to complex and urgent tasks. In addition, while existing solutions provide anonymity for computing nodes using blockchain addresses, there is still a lack of privacy protection for computing node identity information and task allocation information, which may lead to the risk of identity association or leakage when nodes perform tasks, while making task allocation information vulnerable to attackers, increasing the risk of targeted attacks or manipulating task results.
[0004] Therefore, there is an urgent need to provide a layered incentive-based off-chain computing privacy protection method to improve the deficiencies in the prior art. SUMMARY
[0005] To solve the above problems in the prior art, the present application provides a layered incentive-based off-chain computing privacy protection method. The technical problem to be solved by the present application is solved by the following technical scheme:
[0006] In a first aspect, the present application provides a layered incentive-based off-chain computing privacy protection method, comprising:
[0007] The request node publishes the computing task to the blockchain through the smart contract;
[0008] The blockchain verifies the computing task and publishes the computing task;
[0009] The computing node selects the computing task matching the level of the computing node through the smart contract, and participates in the acquisition of the computing task;
[0010] Any computing node in the same computing node level is selected as an executor using a random selection algorithm, the computing nodes other than the executor in the same computing node level generate ring signatures using the public key and the private key encrypted auction information, after the ring signature verification passes, the computing node sends the auction information to the trusted execution environment of the executor, executes the task allocation process in the trusted execution environment, and feeds back the allocation result to the computing node;
[0011] The computing node completes the computing task and feeds back the computing result to the blockchain; wherein the executor can be simultaneously the computing node executing the task.
[0012] The beneficial effects of the present application are as follows:
[0013] The off-chain computing privacy protection method based on hierarchical incentive provided by the present application has the following beneficial effects:
[0014] 1. The present application proposes a hierarchical incentive framework, according to the attributes of the computing node and the computing task, the computing node and the computing task are divided into different levels, multiple levels synchronously execute the allocation of the computing task, through the design of the hierarchical incentive mechanism for the fair allocation of the task, the fair allocation of the computing task and the reward is ensured, the off-chain computing resources can be reasonably allocated, the dynamic changes of the computing node and the computing task in the blockchain system are adapted, and the utilization rate of the computing node and the task execution efficiency are improved.
[0015] 2. The present application designs a secure and privacy-protecting task allocation method, the identity privacy of the computing node and the information privacy of the task allocation are protected through the adoption of the ring signature technology and the trusted execution environment.
[0016] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a flowchart of the off-chain computing privacy protection system based on hierarchical incentive provided by the embodiment of the present application;
[0018] Figure 2 is a flowchart of the off-chain computing privacy protection method based on hierarchical incentive provided by the embodiment of the present application;
[0019] Figure 3is a schematic diagram of a privacy protection method for off-chain computing based on hierarchical incentives provided by an embodiment of the present application. DETAILED DESCRIPTION
[0020] The present application will be further described in detail below in conjunction with specific embodiments, but the embodiments of the present application are not limited thereto.
[0021] Please refer to Figure 1 , Figure 1 is a flowchart of a privacy protection system for off-chain computing based on hierarchical incentives provided by an embodiment of the present application. The present application involves three entities, namely a request node, a computing node and a blockchain node. The request node Computing node The computing task published by the request node is The computing task needs to be executed off-chain by the computing node; specifically, each computing task needs to be completed by a specific computing node, and different computing nodes have different professional knowledge and computing resources and can handle some computing tasks; in addition, different computing nodes may have different computing costs for executing the same task.
[0022] Request node, a system entity that requests data-intensive tasks from the blockchain, provides incentive measures in the form of certain compensation to encourage computing nodes to actively engage in off-chain computing to obtain high-quality blockchain services.
[0023] Computing node, based on its own computing capability and current availability, selects computing tasks that match its interests. The computing node executes the assigned computing task off-chain and generates a computing result. After the computing result is verified and packaged into the blockchain, the computing node will receive a reward from the request node. It is worth noting that some computing nodes need to deploy a trusted execution environment locally to execute the task assignment, and these computing nodes need to register the trusted execution environment on the blockchain to ensure a secure execution environment.
[0024] Blockchain node, responsible for verification operations related to tasks such as publishing computing tasks, assigning computing tasks and computing results, and also responsible for packaging verified transactions and generating blocks.
[0025] The system provided by the present application registers all request nodes and computing nodes in the blockchain to request system services related to tasks (such as publishing and requesting computing tasks); after completing the registration, the request node can upload the computing tasks to be processed to the blockchain and describe the tasks in detail. The blockchain node verifies and publishes these tasks; the task assignment process is executed in a secure manner in the trusted execution environment of the computing node, and the task assignment result will be returned to the computing node; the selected computing node completes the computing task and submits the computing result before the deadline; after the blockchain node successfully verifies the result, the smart contract will automatically transfer the reward to the computing node.
[0026] The system provided by the present invention ensures the safe and stable operation of the system by defining the economic model and security model of the system; wherein,
[0027] The present invention establishes an economic model to quantitatively analyze the utility of system entities, including the impact of rewards, costs and incentive mechanisms.
[0028] Requesting Node R i After completing the calculation task T k After the benefit V i k , the requesting node also needs to send the j Provide incentives And pay the transaction fee F to the blockchain node i k In order to ensure that all nodes have something to gain, it is possible to determine Therefore, R i The utility function The definition is as follows:
[0029]
[0030] By introducing Represents the computing task T k Is it assigned to compute node C? j Specifically, Indicates T k Assigned to C j , Indicates T k Not assigned to C j In addition, the introduction Indicates C j Is T completed? k ,here, Indicates C j Completed T k , Indicates C j Not completed T k .
[0031] Compute node C j From the requesting node R i receive C j Execute computing task T k The cost of express, Indicates C j To execute T k Therefore, assuming K is the total number of tasks, the utility function of the computing node can be The definition is as follows:
[0032]
[0033] Assuming the completion of the computing task T k will provide incentives for participants, while also bringing additional value to social welfare w k through improving time efficiency, high task execution rate or other social value indicators. Therefore, the social welfare function can be expressed as the sum of utility and social welfare, as follows:
[0034]
[0035] The present invention guarantees the security and efficiency of the system by establishing a security model.
[0036] 1. Blockchain security, assuming that the blockchain itself is secure, with no vulnerabilities or design flaws, and thus is a trustworthy platform that can perform its intended functions without being affected by potential attacks.
[0037] 2. Communication security, assuming that the information sent and received by both parties during transmission is not tampered with. In addition, the receiving party can verify that the received information content is exactly the same as the information content sent by the sending party. This assumption can be ensured by applying secure communication protocols such as Secure Sockets Layer and Transport Layer Security.
[0038] 3. Key security, assuming that the generation and distribution of relevant keys are secure and cannot be attacked or cracked. This can be achieved by using a secure key distribution scheme such as the Diffie-Hellman protocol to ensure secure transmission of keys between communication parties.
[0039] 4. Trusted execution environment security, assuming that the code executed in the TEE is completely trusted, which means that the TEE can securely process and store confidential data even under physical attacks. In addition, we also assume that there is a secure communication channel connecting the computing node and the TEE. This is usually achieved by using strong encryption protocols to ensure data security during transmission.
[0040] The threat model that the system of the present invention may receive includes the following:
[0041] 1. Collusion attack, multiple computing nodes collude with each other to gain unfair competitive advantage and benefit. The colluding nodes may manipulate the task allocation process to ensure that the most beneficial and easily managed tasks are allocated to them. In contrast, more complex or less profitable tasks are allocated to non-colluding nodes.
[0042] 2. Replay attack: Malicious computing nodes may impersonate legitimate nodes and strategically resubmit information to the system to mimic real activities and replay their results. This type of replay attack causes the system to repeat processing, generating unnecessary computational overhead.
[0043] 3. Free-rider attacks: Malicious computing nodes may choose to perform only a few tasks or submit false proofs of contribution in order to launch free-rider attacks. The attacker's goal is to maximize the benefits from the system while minimizing the resources and effort expended. As a result, despite minimal or no contribution, the attacker can receive the same rewards as honest nodes.
[0044] See Figure 2 and Figure 3 , Figure 2 This is a flow chart of the off-chain computing privacy protection method based on layered incentives provided by an embodiment of the present invention. Figure 3 This is a schematic diagram of an off-chain computing privacy protection method based on layered incentives provided by an embodiment of the present invention. The off-chain computing privacy protection method based on layered incentives provided by the present invention includes:
[0045] The computing node and the requesting node apply for registration request to the blockchain, specifically:
[0046] Requesting Node R i Submit a registration request to the blockchain;
[0047] Requesting Node R i Use encryption algorithm to generate registration information, namely public key pk i and private key sk i ;
[0048] Requesting Node R i Submit the public key pk to the blockchain through the smart contract i And the required registration information, blockchain public key pk i and required registration information for verification;
[0049] If the verification is successful, the blockchain will i Record and request node R i Assign identifier R n _id and trust value Tv i , to complete the request node R i Registration request on the blockchain.
[0050] Compute node C j Submit a registration request to the blockchain;
[0051] Compute node C j Use encryption algorithm to generate registration information, namely public key pkj and a private key sk j ;
[0052] a computing node C j submit the public key pk j and the required registration information to the blockchain through a smart contract j ;
[0053] If the verification is successful, the blockchain records the public key pk j and assigns an identifier C j _id and a trust value Tv j to the computing node C n to complete the registration request of the computing node on the blockchain.
[0054] Optionally, the public key and the private key are generated using an elliptic curve encryption algorithm when the requesting node and the computing node apply for the registration request to the blockchain.
[0055] After the registration of the requesting node and the computing node on the blockchain is completed, the requesting node and the computing node can participate in various network activities, such as publishing a task, querying a task, and bidding for a task.
[0056] S101, the requesting node publishes a computing task to the blockchain through a smart contract.
[0057] Specifically, in the embodiment, the requesting node publishes a computing task to the blockchain through a smart contract, including:
[0058] the requesting node R i interacts with the smart contract, and the smart contract uploads the computing task T k and the task requirements to the blockchain; wherein the task requirements include the resource consumption RC k of the computing task T k and the deadline DL k of the computing task T k ;
[0059] At the same time, in order to reduce the risk of denial of payment and denial of service attacks, the requesting node R i provides a deposit to the smart contract for the computing task T k published by it
[0060] The blockchain verifies the validity of the deposit and feeds back an identifier task_id to the requesting node R i until the blockchain verifies the computing task T k successfully, and the smart contract returns the deposit to the requesting node Ri .
[0061] S102, the blockchain verifies the computing task and publishes the computing task.
[0062] Specifically, in the task publishing stage, the request node publishes the computing task to the blockchain through the smart contract, so that the computing node can clearly understand the task requirements.
[0063] S103, the computing node selects the computing task matching its level through the smart contract and participates in the acquisition of the computing task.
[0064] Specifically, in the present embodiment, considering the unfair task allocation process of the existing scheme, nodes with a large amount of computing resources tend to obtain as many computing tasks and rewards as possible, while computing nodes with scarce resources are difficult to survive. On the one hand, unfair task allocation reduces the utilization rate of computing nodes, leading to a decline in node participation, which is not conducive to the participation of new nodes and the active contribution of computing nodes with limited resources. On the other hand, if most of the computing resources are monopolized by a few nodes, the entire network may fall into the risk of centralization. This is contrary to the core principle of decentralization of the blockchain, and may lead to the inherent problems of centralization, such as single point of failure. In view of this, the present application proposes the concept of hierarchical construction, which mainly divides the computing nodes and computing tasks into levels to improve the rationality of computing task allocation. According to the level values of the computing nodes and the computing tasks, they are divided into different node layers and task layers; first, the computing task level and the computing node level need to be constructed, including:
[0065] According to the level values of the plurality of pre-designed computing tasks, Z computing task levels are divided, and according to the level values of the plurality of pre-designed computing nodes, Z computing node levels are divided; the computing task level and the computing node level correspond one by one, the computing nodes in the corresponding computing node level acquire the computing tasks in the task level, and the computing task level set and the computing node level set are represented as
[0066] wherein, the expression of the level value of the pre-designed computing task is:
[0067]
[0068] wherein, indicates the level value of the pre-designed computing task, RC k indicates the resource consumption of the computing task, DL k indicates the deadline of the computing task, WT k indicates the waiting time, the waiting time indicates the pre-designed computing task T kThe interval from the publishing time to the current time reflects the system activity and node participation, ensuring that the computing tasks are processed in a timely and effective manner.
[0069] According to the influence of the trust value decay on the level value of the computing node C j , and the performance of the computing node C j in the last period, which is calculated according to the number of completed computing tasks, timeliness, and success rate of completing computing tasks, the timeliness quantifies the efficiency of the computing node C j in completing the computing task T k , the level value of the pre-designed computing node is obtained, and its expression is:
[0070]
[0071] wherein, represents the level value of the pre-designed computing node, β represents the decay factor, Δt represents the trust value Tv j update time interval, the trust value Tv j is the trust value of the last period, K represents the number of computing tasks, k represents the index of the computing task, SR j represents the success rate of the computing node C j in completing the computing task in the last period, i.e., the ratio of the number of completed computing tasks to the total number of computing tasks received, represents whether the computing node C j receives the computing task T k , is 1, indicating that it is received, is 0, indicating that it is not received, CT k represents the current time of the computing task T k , RT k represents the remaining time of the computing task T k , DL k represents the deadline of the computing task.
[0072] It can be understood that in the hierarchical construction stage, the computing node C j and the computing task T k are initially assigned a level value Ra. According to the level value, C j and T k are divided into specific computing node levels and computing task levels. Specifically, functions Layer C (Cj) and Layer T (Tk) are used to represent the node level of Cj and the task level of T k . C j can only execute computing tasks corresponding to the task level, while T kOnly the computing nodes in the matching node layer can access and execute the computing task. In addition, in order to adapt to the timeliness of the computing task and the dynamics of the computing nodes, a system variable of an update period ε is introduced, which is set in units of block height, which ensures that the update operation is closely synchronized with the blockchain state. The rank values of the computing nodes and the tasks are updated every period to ensure that the system adapts to changes in real time and adjusts the task allocation strategy accordingly. It should be noted that if the C j registers in the current period, it can only bid for the computing task in the next period.
[0073] In this embodiment, the computing node selects a computing task matching its rank through a smart contract, including:
[0074] For an update period ε, it is determined whether the deadline of the computing task T k will arrive before the next update period;
[0075] If not, the rank value of the computing task T k is obtained, the computing task layer Layer k (T T ) corresponding to the computing task T k is determined, and the corresponding computing node layer Layer C (C j ) is determined, and the computing nodes in the corresponding computing node layer Layer C (C j ) access the computing task T k ;
[0076] If so, the computing task is divided into a public layer Layer pub , and all computing nodes C j can access the computing task T k .
[0077] It can be understood that the hierarchical division ensures that the computing nodes in a node layer can only undertake the computing tasks in the corresponding task layer. It should be noted that the deadlines of some computing tasks are shorter than the update period ε, which means that these computing tasks will reach the deadline before the start of the next update period, and it may not be possible to attract computing nodes to participate in bidding. Considering that these tasks may not be suitable for division into task layers, these tasks are allocated to the public task layer Layer pub , so that all computing nodes can participate in bidding, thereby greatly increasing the chances of these computing tasks being selected.
[0078] In this embodiment, the computing nodes participate in the access of the computing tasks, including:
[0079] The computing node C j accesses the computing task Tk Providing a margin to a smart contract Smart contract locks margin For a computing node C that does not access successfully j , the margin is refunded to the computing node C through a smart contract j ; for a computing node C that accesses successfully j , after completing the computing task T k , the margin is refunded to the computing node C through a smart contract j .
[0080] S104, using a random selection algorithm to select any computing node in the same computing node level as an executor, the computing nodes in the same computing node level except the executor generate ring signatures using the public key and the private key encrypted auction information, after the ring signature verification passes, the computing nodes send the auction information to the trusted execution environment of the executor, execute the task allocation process in the trusted execution environment, and feed back the allocation result to the computing nodes.
[0081] Specifically, in this embodiment, the task allocation within each computing node layer is completed by a Vickrey-Clarke-Groves (VCG) combined auction. During the auction, the computing nodes can make combined bids for the computing tasks in the corresponding task layer, taking into account the cost and expected profit of completing the computing tasks. Before participating in the auction, each computing node must lock a security margin in the task settlement contract This can ensure the integrity of the nodes during the entire bidding process and prevent malicious bidding or withdrawal. For computing nodes that do not win the auction, the security margin will be automatically refunded through the task settlement contract. The computing nodes that complete the tasks will obtain rewards and margin refunds. In addition, the present application uses ring signature technology to protect the identity of the computing nodes and transfers the auction algorithm to the trusted execution environment for execution, in order to maintain the security of the task allocation process and the confidentiality of the allocation result. Next, take l z as an example to illustrate the privacy-protected task allocation process.
[0082] In this embodiment, considering that the prior art solutions lack comprehensive privacy protection, including the identity privacy of the computing nodes and the data privacy of the task allocation. The lack of identity information and data privacy exposes security threats, making the computing nodes vulnerable to attacks such as free riding and collusion. These threats provide convenience for attackers, allowing them to identify and lock specific nodes, conduct strategic manipulation, or malicious collaboration. The present application also includes:
[0083] Deploying a trusted execution environment locally on the computing nodes and registering the trusted execution environment on the blockchain;
[0084] The trusted execution environment integration auction algorithm is used to complete the task allocation process in the trusted execution environment.
[0085] Specifically, a computing node is randomly selected as an executor from the same computing node level according to the trust proportion, marked as The executor in the same computing node level and the computing node locally deploys a trusted execution environment, and a public key and a private key are generated in the trusted execution environment and the public key is disclosed; it should be noted that the higher the trust proportion, the greater the probability of being selected as an executor, and the trust proportion is the proportion of the trust value of the computing node to the total trust value of all computing nodes;
[0086] All computing nodes in the same computing node level participate in the acquisition of the computing task, marked as The computing node When applying for registration on the blockchain, the generated registration information is the public key pk u and the private key sk u , u∈(1,U), U represents the total number of computing nodes in the same computing node level;
[0087] The computing node generates auction information in the auction algorithm and calls the encryption function Enc(), which uses the private key to encrypt the auction information to generate ciphertext The ciphertext is used as a ring signature message, as a ring member;
[0088] The computing node calls the ring signature generation function SignGen(), which uses the public key pk u to generate Sign u , and verifies the authenticity of Sign u through the ring signature verification contract; if the verification is qualified, the ring signature verification contract sends the public key pk u and the ciphertext to the trusted execution environment of the executor , and the executor calls the decryption function Dec(), which uses the private key to decrypt the ciphertext
[0089] The executor allocates the computing task according to the collected auction information generated by the computing nodes in the same computing node level, and generates a task allocation result performer call the encryption function Enc() using the public key pk u allocation result encrypted to generate ciphertext and fed back to the computing node
[0090] computing node call the decryption function Dec() using the private key sk u ciphertext decrypted to retrieve
[0091] It can be understood that the computing node C j may perform two key events in l z . The first event occurs when C j is selected to execute the auction algorithm in the trusted execution environment, at which time the node is marked as The second event involves C j submitting bid information to participate in the auction and off-chain computation, denoted as u∈(1,U). Therefore, when C j is selected to execute the auction algorithm and participate in bidding at the same time, u = s. The probability of being selected is the ratio of its trust value Tv s to the sum of the trust values of all nodes in l Z , that is:
[0092]
[0093] S105, the computing node completes the computing task and feeds back the computing result to the blockchain; wherein the performer can be the computing node that executes the task.
[0094] Specifically, in this embodiment, considering that most of the prior art solutions adopt a fixed incentive strategy, they fail to flexibly adjust according to the real-time state of the computing node and the characteristics of the task, and the rigidity of such a mechanism may lead to the inability to effectively motivate all nodes when the system environment and node state change. Generally, the behavior of the node will change due to strategic adjustments and changes in economic benefits. Considering that computing tasks usually have different priorities, dynamically adjusting the incentive strategy, especially the incentive strategy for off-chain computation, can more effectively optimize task allocation and improve overall computing efficiency. The present application proposes a specific reward mechanism, specifically:
[0095] computing node After completing all computing tasks, the computing result is submitted to the smart contract. Then, the relevant requesting node needs to pay the smart contract, and the number of requesting nodes involved depends on the number of computing tasks allocated to the number of tasks. Once the result is verified, the smart contract returns and provides an incentive strategy while returning the security deposit to According to the VCG combination auction rule, the winning player's benefit depends on the impact of its participation on the potential benefits of other players. Specifically, the winning player (computing node C j ) obtains a benefit B j , which is calculated as follows:
[0096] Bj = hj - (bid(S) - bid(S / {j}));
[0097] In the above formula, bid(S) is the total value of all winners, i.e., the sum of all winning bids. bid(S / {j}) represents the maximum total value of the remaining winners after excluding Cj. In addition, hj is defined as the maximum total value of bids by other computing nodes when Cj does not participate in the auction. According to the formula, the benefit B j can be obtained. will receive a small portion of B j as a reward for promoting task allocation, i.e.,
[0098]
[0099] Here, p represents the basic reward ratio to prevent unexpectedly high rewards due to a high trust value ratio. After the request node R i completes the payment, the task publishing contract returns the deposit and returns the calculation result to R i .
[0100] In summary, the present application provides a privacy protection method for off-chain computing based on a hierarchical incentive, which has the following beneficial effects:
[0101] (1) The present application proposes a hierarchical incentive framework, which divides computing nodes and computing tasks into different levels according to their attributes, synchronously executes the allocation of computing tasks in multiple levels, designs a hierarchical incentive mechanism for fair task allocation, ensures the fair allocation of computing tasks and rewards, reasonably allocates off-chain computing resources, adapts to the dynamic changes of computing nodes and computing tasks in the blockchain system, and improves the utilization rate of computing nodes and the efficiency of task execution.
[0102] (2) The present application designs a flexible incentive mechanism that dynamically adjusts rewards based on node contribution, task resource consumption, and time limit, etc., so that tasks are adapted to suitable computing nodes, thereby improving computing efficiency.
[0103] (3), the application designs a task allocation method for security and privacy protection, identity privacy and information privacy of task allocation of a computing node are protected by adopting ring signature technology and a trusted execution environment.
[0104] In an optional embodiment of the application, the layered incentive-based off-chain computing privacy protection method provided in the above embodiments of the application can be applied to medical data management and sharing, smart grid energy management, and large-scale data crowdsourcing computing.
[0105] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or operations have any such actual relationship or order. Also, the terms "comprises", "comprising", or any other variations thereof are intended to cover a non-exclusive inclusion, so that an item or device that includes a list of elements does not only include those elements, but also includes other elements not explicitly listed. Without more limitations, an element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the item or device that includes the element. The terms "connected" or "coupled" or similar terms are not limited to a physical or mechanical connection or coupling, but can include an electrical connection or coupling, whether direct or indirect. The terms "upper", "lower", "left", "right", and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only used for the convenience of description and simplification of description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the application.
[0106] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in the present specification.
[0107] The above is a further detailed description of the application in conjunction with specific preferred embodiments, and the specific implementation of the application cannot be limited to these descriptions. For those skilled in the art, without departing from the concept of the present application, a number of simple deductions or substitutions can be made, which should be considered as falling within the scope of protection of the present application.
Claims
1. A privacy protection method for off-chain computing based on layered incentives, characterized by: include: The requesting node publishes computing tasks to the blockchain through smart contracts; The blockchain verifies the computing task and publishes the computing task; The computing node selects the computing task that matches its level through the smart contract and participates in the acceptance of the computing task; Selecting any computing node from the same computing node hierarchy as an executor using a random selection algorithm, generating a ring signature using the auction information encrypted by the computing nodes other than the executor in the same computing node hierarchy using the public key and the private key, and after the ring signature is verified, sending the auction information to the trusted execution environment of the executor, executing a task allocation process in the trusted execution environment, and feeding back the allocation result to the computing node; The computing node completes the computing task and feeds back the computing result to the blockchain; wherein the executor may also be the computing node that executes the task; It also includes: building a computing task hierarchy and a computing node hierarchy; According to the level values of multiple preset calculation tasks, The computing task level is divided into The computing task level corresponds to the computing node level one by one, and the computing nodes in the corresponding computing node level can receive the computing tasks in the task level. The computing task level set and the computing node level set are expressed as ; The expression of the level value of the preset computing task is: ; in, Indicates the level value of the preset calculation task, Indicates the resource consumption of the computing task, Indicates the deadline of the computation task, Indicates the waiting time, which indicates the preset computing task The interval from the release time to the current time; The expression of the level value of the preset calculation node is: ; in, Indicates the level value of the preset calculation node, represents the decay factor, Trust value Update time interval, the trust value is the trust value of the previous cycle, Indicates the number of computing tasks, Indicates the index of the computing task, Indicates the calculation node of the previous cycle The success rate of completing the calculation task, Represents a compute node Whether to accept computing tasks , Represents a computing task Current time, Represents a computing task The remaining time, Indicates the deadline of the computation task; The computing node selects the computing task that matches its level through a smart contract, including: For an update cycle , determine the computing task Whether the deadline arrives before the next update cycle; If not, get the computation task The level value determines the computing task Corresponding computing task level , and determine the corresponding computing node level , the corresponding computing node level The computing nodes in the ; If reached, the computing task is divided into the public level , all computing nodes Can accept the computing task .
2. The off-chain computing privacy protection method based on layered incentives according to claim 1 is characterized in that: Also includes: The requesting node Submitting a registration request to the blockchain; The requesting node Use encryption algorithm to generate registration information, namely public key and private key ; The requesting node Submit the public key to the blockchain via a smart contract and the required registration information, the blockchain for the public key Verify the required registration information; If the verification is successful, the blockchain Record and request the node Assign identifier and trust value , to complete the request node A registration request on said blockchain.
3. The off-chain computing privacy protection method based on layered incentives according to claim 1 is characterized in that: Also includes: The computing node Submitting a registration request to the blockchain; The computing node Use encryption algorithm to generate registration information, namely public key and private key ; The computing node Submit the public key to the blockchain via a smart contract and the required registration information, the blockchain for the public key Verify the required registration information; If the verification is successful, the blockchain Record and calculate the node Assign identifier and trust value , to complete the registration request of the computing node in the blockchain.
4. The off-chain computing privacy protection method based on layered incentives according to claim 1 is characterized in that: The requesting node publishes a computing task to the blockchain through a smart contract, including: The requesting node Interact with the smart contract, which will and task requirements are uploaded to the blockchain; wherein the task requirements include computing tasks Resource consumption and computing tasks Deadline ; At the same time, the requesting node The computing tasks issued for it Provide security deposit to said smart contract , the smart contract locks the deposit ; The blockchain verifies the security deposit validity and to the requesting node Feedback Identifier , until the blockchain performs the computational task If the verification is successful, the smart contract will Return to the requesting node .
5. The off-chain computing privacy protection method based on layered incentives according to claim 1 is characterized in that: The computing nodes participate in the allocation process of computing tasks, including: The computing node Accept the computing task Provide security deposit to said smart contract , the smart contract locks the deposit ; For the computing node that was not successfully accessed , the margin Return to the computing node through the smart contract ; For the computing node that is successfully accessed , after completing the calculation task After that, the deposit Return to the computing node through the smart contract .
6. The off-chain computing privacy protection method based on layered incentives according to claim 1 is characterized in that: Also includes: Deploy a trusted execution environment locally on the computing node, and register the trusted execution environment on the blockchain; The computing task allocation process is completed in the trusted execution environment, and the allocation result is returned to the computing node.
7. The off-chain computing privacy protection method based on layered incentives according to claim 1 is characterized in that: The method comprises: selecting any computing node from the same computing node hierarchy using a random selection algorithm as an executor; generating a ring signature using auction information encrypted by a public key and a private key by computing nodes other than the executor in the same computing node hierarchy; sending the auction information to the trusted execution environment of the executor after the ring signature is verified; executing a task allocation process in the trusted execution environment; and feeding back the allocation result to the computing node; Randomly select the computing node as the executor from the same computing node level according to the trust ratio, marked as , the executors in the same computing node hierarchy The computing node locally deploys a trusted execution environment and generates a public key in the trusted execution environment. and private key , and the public key public; All the computing nodes in the same computing node layer participate in the access of the computing task, marked as , the computing node When applying for registration request to the blockchain, the registration information generated is the public key and private key , , Indicates the total number of compute nodes in the same compute node level; The computing node Generate auction information , and call the encryption function , using the private key Regarding the auction information Encrypt and generate ciphertext , the ciphertext Used as a ring signature message, As a ring member; The computing node Call the ring signature generation function , using the public key ,generate , and verify the contract through ring signature If the verification is qualified, the ring signature verification contract will verify the authenticity of the public key and the ciphertext Send to executor Trusted execution environment, the executor Call the decryption function , using the private key For the ciphertext Decrypt to retrieve ; The executor Assign computing tasks based on the auction information collected from computing nodes in the same computing node level and generate task assignment results , the executor Calling the encryption function , using the public key Assign the results to the task Encrypt and generate ciphertext , and fed back to the computing node ; The computing node Call the decryption function , using the private key For the ciphertext Decrypt to retrieve .
8. The off-chain computing privacy protection method based on layered incentives according to claim 1 is characterized in that: After the computing node completes the computing task, the method further includes: The computing node Complete the calculation task After that, the calculation result is submitted to the blockchain through the smart contract, and the requesting node executes the settlement process through the smart contract; The smart contract sends a and compute nodes Provide incentive strategies and Return to the computing node ; The computing node Profit The expression is: ; The executor The expression of the profit is: ; in, represents the total value of all winners, Indicates that the computing node is removed After that, the maximum total value of the remaining winners is, Represents a compute node The maximum total value of bids from other computing nodes when not participating in the computing task. Indicates the base reward rate.
Citation Information
Patent Citations
Blockchain-based personalized k-anonymity privacy protection motivation method
CN107483211A
Excitation method for K anonymous position privacy protection based on blockchain smart contract
CN110557375A