A data processing method and device, electronic equipment and storage medium
By using an off-chain computing contract listening and authorization mechanism, node devices can acquire and approve execution logic and generate authorization results, thus solving the data access control problem in off-chain computing tasks and improving security and functional independence.
Patent Information
- Application Number
- CN202210474321.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-04-29
AI Technical Summary
In existing blockchain networks, the identity authentication mechanism for off-chain computing tasks cannot effectively control the scope and timing of data access by authorized off-chain computing engines, posing security risks. Furthermore, it cannot distinguish the data access permissions of the same off-chain computing engine in different tasks, affecting functional independence.
By listening to authorization request events through off-chain computing contracts, node devices acquire and approve their own execution logic, generate authorization results, and initiate authorization transactions to the contract through blockchain nodes. They also listen for task events to call the off-chain computing engine to execute collaborative computing tasks and use a proxy access engine to control data interaction, ensuring that the scope and timing of data provision are within the authorized task.
It reduces security risks, achieves functional independence of the same off-chain computing engine in different tasks, and realizes trusted information interaction and collaborative computing through event listening and transaction feedback mechanisms.
Smart Images

Figure CN114896639B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification belong to the field of blockchain technology, and in particular relate to a data processing method, apparatus, electronic device and storage medium. Background Technology
[0002] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. In a blockchain system, data blocks are sequentially linked together to form a chain-like data structure, and a distributed ledger is cryptographically guaranteed to be immutable and unforgeable. Due to its decentralized, immutable, and autonomous characteristics, blockchain is receiving increasing attention and application.
[0003] Blockchain networks can undertake off-chain computing tasks defined by smart contracts. In this case, each blockchain node in the network, guided by events generated by the smart contract, calls its locally deployed off-chain computing engine to perform the off-chain computing task. For collaborative computing tasks, which require multiple nodes to work together, there is often a need for data on one node to be read by an off-chain computing engine on another external node. The node providing the data often needs to verify and authenticate the off-chain computing engine that is requesting the data to ensure that data is only provided to the legitimate off-chain computing engine. However, this identity-based authentication mechanism allows the authorized off-chain computing engine to access the data on the authorizing node even when it is not processing a collaborative computing task. On the one hand, it makes it impossible to control the scope and timing of the authorized party's data access, posing a certain security risk; on the other hand, it makes it impossible to distinguish the data access permissions of the same off-chain computing engine in different off-chain computing tasks, affecting the functional independence of the same off-chain computing engine in different off-chain computing tasks. Summary of the Invention
[0004] The purpose of this invention is to provide a data processing method, apparatus, electronic device, and storage medium.
[0005] According to a first aspect of one or more embodiments of this specification, a data processing method is proposed, applied to a first node device where a first blockchain node is deployed. The blockchain network to which the first blockchain node belongs deploys an off-chain computing contract, the off-chain computing contract maintaining the execution logic of the node devices where each participating node is located in the off-chain computing task; the method includes:
[0006] Upon detecting the authorization request event generated by the off-chain computing contract and determining that the first blockchain node belongs to the first participating node, the first execution logic of the first node device in the off-chain computing task is obtained.
[0007] The first execution logic is approved to generate the first authorization result corresponding to the off-chain computing task, and the first authorization transaction carrying the first authorization result is initiated to the off-chain computing contract through the first blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node respectively, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing.
[0008] Listen for the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; if it is determined that the first blockchain node belongs to the computing provider node corresponding to the collaborative computing task, call the off-chain computing engine deployed on the first node device to execute the collaborative computing task, the off-chain computing engine is used to: during the execution of the collaborative computing task, obtain the data read from the second node device by the proxy access engine deployed on the second node device where the data provider node corresponding to the collaborative computing task is located.
[0009] According to a second aspect of one or more embodiments of this specification, a data processing method is proposed, applied to a second node device deployed with a second blockchain node, wherein the blockchain network to which the second blockchain node belongs deploys an off-chain computing contract, and the off-chain computing contract maintains the execution logic of the node devices of each participating node corresponding to the off-chain computing task in the off-chain computing task; the method includes:
[0010] Upon detecting the authorization request event generated by the off-chain computing contract and determining that the second blockchain node belongs to the second participating node, the second execution logic of the second node device in the off-chain computing task is obtained.
[0011] The second execution logic is approved to generate a second authorization result corresponding to the off-chain computing task, and a second authorization transaction carrying the second authorization result is initiated to the off-chain computing contract through the second blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization approval.
[0012] The system listens for the first task event generated by the off-chain computing contract, which corresponds to a collaborative computing task related to the off-chain computing task. If it is determined that the second blockchain node belongs to the data provider node corresponding to the collaborative computing task, the system calls the proxy access engine deployed on the second node device to execute the collaborative computing task. The proxy access engine is used to: provide the data read from the second node device to the off-chain computing engine deployed on the first node device where the computing provider node corresponding to the collaborative computing task is located during the execution of the collaborative computing task.
[0013] According to a third aspect of one or more embodiments of this specification, a data processing apparatus is provided, applied to a first node device where a first blockchain node is deployed. The blockchain network to which the first blockchain node belongs deploys an off-chain computing contract, the off-chain computing contract maintaining the execution logic of the node devices where each participating node is located in the off-chain computing task; the apparatus includes:
[0014] The first execution logic acquisition unit is used to acquire the first execution logic of the first node device in the off-chain computing task when it hears the authorization application event generated by the off-chain computing contract and determines that the first blockchain node belongs to the first participating party node.
[0015] The first authorization transaction initiation unit is used to approve the first execution logic to generate the first authorization result corresponding to the off-chain computing task, and to initiate a first authorization transaction carrying the first authorization result to the off-chain computing contract through the first blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing.
[0016] The data acquisition unit is used to monitor the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; when it is determined that the first blockchain node belongs to the computing provider node corresponding to the collaborative computing task, the off-chain computing engine deployed on the first node device is invoked to execute the collaborative computing task, the off-chain computing engine is used to: during the execution of the collaborative computing task, acquire the data read from the second node device by the proxy access engine deployed on the second node device where the data provider node corresponding to the collaborative computing task is located.
[0017] According to a fourth aspect of one or more embodiments of this specification, a data processing apparatus is provided for use on a second node device deployed with a second blockchain node. The blockchain network to which the second blockchain node belongs has an off-chain computing contract deployed. The off-chain computing contract maintains the execution logic of the node devices of each participating node in the off-chain computing task. The apparatus includes:
[0018] The second execution logic acquisition unit is used to acquire the second execution logic of the second node device in the off-chain computing task when the authorization application event generated by the off-chain computing contract is detected and it is determined that the second blockchain node belongs to the second participating party node.
[0019] The second authorization transaction initiation unit is used to approve the second execution logic to generate the second authorization result corresponding to the off-chain computing task, and to initiate a second authorization transaction carrying the second authorization result to the off-chain computing contract through the second blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node respectively, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing.
[0020] A data providing unit is used to monitor the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; when it is determined that the second blockchain node belongs to the data provider node corresponding to the collaborative computing task, the unit calls the proxy access engine deployed on the second node device to execute the collaborative computing task, the proxy access engine being used to: during the execution of the collaborative computing task, provide the data read from the second node device to the off-chain computing engine deployed on the first node device where the computing provider node corresponding to the collaborative computing task is located.
[0021] According to a fifth aspect of one or more embodiments of this specification, an electronic device is provided, comprising:
[0022] processor;
[0023] Memory used to store processor-executable instructions;
[0024] The processor implements the method as described in the first or second aspect by running the executable instructions.
[0025] According to a sixth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first or second aspect.
[0026] In the embodiments described in this specification, after the node devices of each participating node in the off-chain computing task receive the authorization request event generated by the off-chain computing contract, they will review their respective execution logic in the off-chain computing task to generate the authorization result of the off-chain computing task, and initiate an authorization transaction carrying their respective authorization results to the off-chain computing contract to complete the authorization of the off-chain computing task. Only after the off-chain computing contract completes the authorization of the off-chain computing task will it allow the generation of task events related to the off-chain computing task. Thus, the event listening mechanism guides each node device to execute the collaborative computing tasks related to the off-chain computing task, enabling the second node device of the data provider node to perform collaborative computing tasks through the event listening mechanism. The access engine provides the data read from the second node device to the first node device where the computing provider node is located, thereby restricting the data interaction between node devices to the execution of authorized off-chain computing tasks. On the one hand, this limits the scope and timing of data acquisition by the data requester to the execution logic of the authorized off-chain computing tasks, reducing security risks. On the other hand, the execution logic of the same off-chain computing engine can be different in different off-chain computing tasks. This means that the data access permissions of the same off-chain computing engine in different off-chain computing tasks can be designed differently, thus achieving the functional independence of the same off-chain computing engine in different collaborative computing tasks. Attached Figure Description
[0027] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a flowchart of a data processing method provided in an exemplary embodiment.
[0029] Figure 2 This is a flowchart of another data processing method provided in an exemplary embodiment.
[0030] Figure 3 This is a schematic diagram of a scenario for node device interaction provided in an exemplary embodiment.
[0031] Figure 4 This is a schematic diagram of the structure of a device provided in an exemplary embodiment.
[0032] Figure 5 This is a block diagram of a data processing apparatus provided in an exemplary embodiment.
[0033] Figure 6 This is a block diagram of another data processing apparatus provided in an exemplary embodiment. Detailed Implementation
[0034] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0035] Figure 1 This is a flowchart illustrating a data processing method provided in an exemplary embodiment. The method is applied to a first node device deployed with a first blockchain node. The blockchain network to which the first blockchain node belongs has an off-chain computing contract deployed. The off-chain computing contract maintains the execution logic of the node devices of each participating node in the off-chain computing task. The method includes:
[0036] S102: Upon detecting the authorization request event generated by the off-chain computing contract and determining that the first blockchain node belongs to the first participating node, obtain the first execution logic of the first node device in the off-chain computing task.
[0037] The data processing method described in the embodiments of this specification is specifically applied to the first invocation engine deployed on the first node device. The first invocation engine undertakes functions such as listening to events generated by off-chain computing contracts, managing the orderly execution of off-chain computing tasks, invoking the resource engine on the first node device, and initiating transactions to off-chain computing contracts. It is a connector between on-chain resources and off-chain resources.
[0038] In the embodiments of this specification, the authorization application event records the description information of each participating node corresponding to the off-chain computing task. Each participating node corresponding to the off-chain computing task refers to each blockchain node deployed in the blockchain network where each node device involved in executing the off-chain computing task resides. It is easy to understand that not all blockchain nodes in the blockchain network belong to the participating nodes corresponding to the off-chain computing task, but each participating node corresponding to the off-chain computing task is definitely a blockchain node in the blockchain network. After the first node device listens to the authorization application event, it can determine whether the first blockchain node belongs to the participating node corresponding to the off-chain computing task by checking whether the identification information of its own deployed first blockchain node is included in the description information of each participating node recorded in the authorization application event. For example, if the first node device finds that the identification information of the first blockchain corresponds to the description information of the first participating node among the participating nodes, it will determine that the first blockchain node belongs to the first participating node; if it finds that the identification information of the first blockchain does not correspond to the description information of any participating node among the participating nodes, it will determine that the first blockchain node does not belong to the participating node corresponding to the off-chain computing task.
[0039] Once the first node device determines that the first blockchain node belongs to the first participating node, it judges that it needs to participate in the execution of an off-chain computation task. In order to know in advance the task logic that the first node device needs to execute during the subsequent execution of the off-chain computation task, the first node device will further obtain the first execution logic of the first node device in the off-chain computation task. The first execution logic involved in the embodiments of this specification includes: the invocation status of each resource engine deployed on the first node device and / or the data interaction status between the resource engines and other resource engines deployed by other node devices. Since off-chain computation tasks often involve the joint execution of multiple node devices, each participating node device will undertake a relatively independent task execution logic. Thus, the off-chain computation task is finally completed through the joint cooperation of each node device. Therefore, the execution logic of each participating node device (the node device that deploys the participating node corresponding to the off-chain computation task) in the off-chain computation task can be regarded as part of the overall execution logic of the off-chain computation task. For example, the first execution logic of the first node device in the off-chain computing task includes how the first node device should invoke the various resource engines (including the off-chain computing engine, data engine, etc.) deployed locally when it hears various task events related to the off-chain computing task generated by the off-chain computing contract, and what data interaction guidance information should be included in the corresponding call request when invoking these resource engines, so as to instruct the local resource engine to perform data interaction with which resource engines deployed on which other node devices for which data. By understanding its own first execution logic in the off-chain computing task, the first node device can know how it should participate in the execution of the off-chain computing task, and the data interaction with other node devices during the execution of the off-chain computing task, thus providing a material basis for the subsequent approval of the off-chain computing task.
[0040] In the embodiments described in this specification, the off-chain computing contract is used to trigger the generation of the authorization request event during the initialization phase of successful deployment or in response to an authorization request transaction. In these embodiments, when the off-chain computing contract is successfully deployed in the blockchain network, it triggers the execution of an initialization procedure, which includes generating an authorization request event. This allows each node's devices to return the authorization result for the off-chain computing task through a transaction feedback mechanism after listening to the authorization request event. Alternatively, an authorization request transaction can be actively initiated to the off-chain computing contract, causing the contract to trigger the generation of an authorization request event in response, which can then be listened to by each node's devices. This allows for multiple repeated authorizations of the off-chain computing task when authorization is required, addressing situations such as the addition of new participating nodes or updates to the off-chain computing task that necessitate re-determining the legality of the task.
[0041] In one embodiment, the authorization application event includes the execution logic of the node device where each participating node is located in the off-chain computing task; obtaining the first execution logic of the first node device in the off-chain computing task includes: reading the first execution logic of the first node device in the off-chain computing task from the authorization application event.
[0042] In the embodiments of this specification, the authorization application event records the execution logic of each node device of all participating nodes in the off-chain computing task. Specifically, the authorization application event records the identification information of each participating node and the corresponding execution logic. Each participating node device reads its own corresponding execution logic through the identification information of the blockchain node it deploys. For example, the first node device can match the first execution logic corresponding to the identification information of the first blockchain node from the authorization application event based on the identification information of the first blockchain node, thereby reading the first execution logic from the authorization application event.
[0043] In another embodiment, obtaining the first execution logic of the first node device in the off-chain computing task includes: initiating an execution logic query transaction to the off-chain computing contract, listening to the execution logic query event generated by the off-chain computing contract in response to the execution logic query transaction, and reading the first execution logic of the first node device in the off-chain computing task from the execution logic query event. The execution logic query event records the first execution logic of the first node device in the off-chain computing task or the execution logic of the node devices of each participating node in the off-chain computing task.
[0044] In this embodiment, the authorization request event does not record any execution logic related to the off-chain computing task. Upon receiving the authorization request event, the first node device will be instructed to actively retrieve its own first execution logic within the off-chain computing task. The first node device can initiate an execution logic query transaction to the off-chain computing contract, causing the contract to generate an execution logic query event in response. The execution logic requested by the execution logic query transaction, maintained by the off-chain computing contract, is recorded in the execution logic query event, allowing the first node device to listen and retrieve its first execution logic within the off-chain computing task. In this embodiment, the execution logic requested by the execution logic query transaction can be the first execution logic of the first node device in the off-chain computing task, or it can be the execution logic of each participating node device within the off-chain computing task.
[0045] The execution logic query transaction involved in the embodiments of this specification can be a consensus transaction or a local transaction. When the execution logic query transaction is a consensus transaction, it needs to be consensused on the blockchain network. All blockchain nodes in the blockchain network will execute the transaction and generate the corresponding execution logic query event, so each node device can listen to the execution logic query event. However, when the execution logic query transaction is a local transaction, it will not be consensused on the blockchain network. That is, only the first blockchain node deployed on the first node device will call the off-chain computing contract maintained by the first blockchain node to execute the execution logic query transaction. The execution logic query event generated will only be listened to internally by the first node device and will not be listened to by other node devices.
[0046] In the embodiments described herein, the off-chain computing contract verifies the identity of the initiator of the execution logic query transaction. This ensures that the initiating node device can only request to obtain its own execution logic in the off-chain computing task, and cannot request to obtain the execution logic of other node devices. For example, the first node device can only initiate an execution logic query transaction requesting to obtain the first execution logic. By setting the execution logic query transaction as a local transaction, and simultaneously applying the identity verification and execution logic restriction mechanism of the off-chain computing contract involved in the embodiments described herein, each participating node device can only query its own execution logic in the off-chain computing task, and cannot query the execution logic of other node devices in the off-chain computing task. This prevents each participating node device from fully understanding the overall execution logic of the off-chain computing task, and this information isolation method effectively reduces security risks.
[0047] S104: The first execution logic is approved to generate the first authorization result corresponding to the off-chain computing task, and the first authorization transaction carrying the first authorization result is initiated to the off-chain computing contract through the first blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node respectively, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing.
[0048] In the embodiments of this specification, after obtaining the first execution logic, the first node device can approve the first execution logic by calling the approval system deployed on the first node device to generate a first authorization result for the first execution logic as the first authorization result corresponding to the off-chain computing task. When approving the first execution logic, the first node device can determine whether it supports the execution of the first execution logic based on its own predefined data confidentiality policy and resource holding status. That is, if it is determined that the resource engine deployed by the first node device can meet the calling conditions of each resource engine involved in the first execution logic, and / or the data confidentiality policy of the first node device does not conflict with the data interaction between the first node device and / or the resource engines and other resource engines deployed by other node devices involved in the first execution logic, the first authorization result corresponding to the off-chain computing task generated by the first node device is used to indicate that the first node device has approved the authorization of the off-chain computing task; otherwise, the first authorization result is used to indicate that the first node device has failed to approve the authorization of the off-chain computing task.
[0049] After obtaining the first authorization result, the first node device will further initiate a first authorization transaction carrying the first authorization result to the off-chain computing contract through the first blockchain node. In addition, other participating nodes besides the first node device will also generate corresponding authorization results and initiate authorization transactions carrying the authorization results corresponding to the off-chain computing task to the off-chain computing contract. The off-chain computing contract responds to each authorized transaction and maintains the authorization results carried by these authorized exchanges. When the off-chain computing task maintains the authorization results returned by each participating node device of the corresponding participating node, and these authorization results are used to indicate that the off-chain computing task authorization is successful, the status of the off-chain computing task will be updated to authorized, allowing the execution of the off-chain computing task. This is reflected at the contract level by allowing the off-chain computing contract to generate task events related to the off-chain computing task. Specifically: when the status of the off-chain computing task is unauthorized, even if the off-chain computing contract is called by the exchange corresponding to the off-chain computing task, the off-chain computing contract will not respond to the transaction to generate any task events related to the off-chain computing task; while when the status of the off-chain computing task is authorized, if the off-chain computing contract is called by the exchange corresponding to the off-chain computing task, then the off-chain computing contract will respond to the transaction normally to generate task events related to the off-chain computing task, thereby guiding each participating node device to execute the off-chain computing task through the event listening mechanism.
[0050] In the embodiments described in this specification, each participating node only approves the execution logic corresponding to its own off-chain computing task, without needing to concern itself with the execution logic of other node devices. This achieves a distributed approval and authorization for off-chain computing tasks involving multiple node devices, reducing the approval burden on each participating node and ensuring information isolation. Since off-chain computing tasks can only be executed after approval and authorization, each participating node can directly execute the relevant task logic according to the requirements of the relevant task event, provided it is up-to-date with the task event related to the off-chain computing contract, without needing to repeatedly verify whether its local data confidentiality policy or resource holdings support the execution of the relevant task logic.
[0051] S106: Listen for the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; if it is determined that the first blockchain node belongs to the computing provider node corresponding to the collaborative computing task, call the off-chain computing engine deployed on the first node device to execute the collaborative computing task, the off-chain computing engine is used to: during the execution of the collaborative computing task, obtain the data read from the second node device by the proxy access engine deployed on the second node device where the data provider node corresponding to the collaborative computing task is located.
[0052] In the embodiments described in this specification, an off-chain computing contract is an on-chain carrier used to perform off-chain computing tasks. The off-chain computing contract defines several sub-tasks included in the off-chain computing task, describing the data flow and computational collaboration process of each node device within the task. Since the off-chain computing contract is deployed on a blockchain network, the participating nodes of the off-chain computing task defined by the contract are limited to the range of all blockchain nodes in the network. Clearly, multiple off-chain computing contracts can be deployed on the same blockchain network, and the number and performance of the participating nodes involved in different contracts can be flexibly configured. This allows for the deployment of off-chain computing tasks of different types, requirements, and scales within the same blockchain network.
[0053] To illustrate how off-chain computing contracts guide the implementation of their defined off-chain computing tasks, the following section will briefly introduce the implementation logic of off-chain computing tasks through the operation of a typical off-chain computing contract. Users can generate off-chain computing contract code through a visual contract orchestration system and deploy the off-chain computing contract on the blockchain network. This allows the off-chain computing contract to define the workflow of a type of off-chain computing task, which is manifested as several subtasks with execution dependencies. After the off-chain computing contract is successfully deployed, users with the necessary permissions can create and start an off-chain computing task by initiating a task creation transaction. Upon receiving the task creation transaction, the off-chain computing contract will create a task instance belonging to the initiating user. This task instance maintains the task completion status of the off-chain computing task, specifically reflecting the task completion status of each subtask within the off-chain computing task. After the off-chain computing contract responds to the task creation transaction and generates the corresponding task instance, it further triggers the execution of the first subtask corresponding to that instance. In the off-chain computing contract, this is manifested as the generation of an event for the participating node containing the first subtask. All blockchain nodes in the blockchain network can listen to this event, and the node devices of those blockchain nodes that determine themselves to be participating nodes in the first subtask will further invoke the off-chain computing resources and / or off-chain storage resources matched to that first subtask to execute it off-chain. Finally, after the participating node completes execution, it will further report to the off-chain computing... The off-chain computation contract initiates a result return transaction carrying the execution result of the first subtask, thereby causing the off-chain computation contract to update the task completion status of the corresponding task instance. For example, when the execution result of the first subtask is successful, the off-chain computation contract will mark the task completion status of the first subtask in the corresponding task instance as completed. This triggers the execution of the next batch of subtasks according to the predefined dependency order of the subtasks contained in the off-chain computation task, and generates an event containing the participating node description information of the next batch of subtasks for each blockchain node in the blockchain network to listen to. The subsequent process is similar to the process of handling the first subtask. In this way, a loop is formed: "Off-chain computation contract updates task completion status → Off-chain computation contract generates subtask event → Blockchain node listens to subtask event and the designated node device executes the subtask → Node device initiates a result return transaction of the subtask to the off-chain computation contract → Off-chain computation contract updates task completion status" until the task completion status of all subtasks in the task instance in the off-chain computation contract is completed, at which point it is determined that the off-chain computation task corresponding to the task instance has been completed.
[0054] It's easy to see that the tasks performed by the off-chain computing contract during the execution of off-chain computing tasks only include scheduling tasks such as creating task instances, receiving subtask results, and scheduling and issuing subtasks. They don't actually perform the real tasks defined and required by the off-chain computing task, such as data computation, data transfer, and data storage. These resource-intensive tasks are scheduled to be executed off-chain by the corresponding node devices. This achieves a blockchain-based distributed computing through event listening and transaction feedback mechanisms, anchoring off-chain computing tasks to off-chain computing contracts on the blockchain. This ensures full traceability of the task execution process while fully utilizing off-chain resources. Simultaneously, it enables trusted information exchange and collaborative computing between different node devices based on the blockchain. Furthermore, since off-chain computing tasks are defined in the form of contracts and their design is not constrained by on-chain resources, different off-chain computing contracts can be designed to meet different practical needs, thus expanding on-chain collaboration methods through off-chain resources.
[0055] In the embodiments of this specification, the off-chain computing contract maintains the task completion status corresponding to the off-chain computing task. The task completion status is used to describe the completion status of each sub-task included in the off-chain computing task. The blockchain events related to the off-chain computing task include the task events corresponding to each sub-task. When the collaborative computing task is a sub-task of the off-chain computing task, the listening to the first task event includes: listening to the first task event generated by the off-chain computing contract for the collaborative computing task when the task completion status meets the execution conditions corresponding to the collaborative computing task.
[0056] In this embodiment, the off-chain computing task is represented as a corresponding task instance on the off-chain computing contract. Its task completion status is maintained in the corresponding task instance of the off-chain computing contract, specifically by maintaining the completion status of each subtask within that task instance. In this embodiment, the blockchain events related to the off-chain computing task include task events corresponding to each subtask, and the collaborative computing task is a subtask of the off-chain computing task. Since the execution dependency order of the subtasks included in the off-chain computing task is predefined, this means that the execution conditions of each subtask, including the collaborative computing task, are also determined. Therefore, the off-chain computing contract can further determine the next collaborative computing task to be executed based on the completion status of each subtask included in the off-chain computing task, thereby initiating a task event for the collaborative computing task. Furthermore, it also includes: when the collaborative computing task is completed, a result return transaction containing the execution result corresponding to the collaborative computing task is initiated from the first blockchain node to the off-chain computing contract to update the task completion status of the off-chain computing task maintained by the off-chain computing contract. As mentioned earlier, when the first node device executes a subtask by calling resources and completes the execution, it will update the task completion status of the off-chain computing task maintained by the off-chain computing contract by initiating a result return transaction. This allows the off-chain computing contract to further determine the next subtask to be executed based on the execution dependency order of each subtask in the off-chain computing task, and generate a task event for the next subtask.
[0057] In the embodiments described in this specification, the entity that listens for task events generated by the off-chain computing contract and initiates result return transactions to the off-chain computing contract is specifically the scheduling engine deployed on the first node device.
[0058] As mentioned above, the task completion status is updated by the off-chain computing contract in response to the transaction corresponding to the off-chain computing task. The transaction corresponding to the off-chain computing task includes the task creation transaction corresponding to the off-chain computing task, or the result return transaction initiated by any node device after completing the execution of any sub-task among the sub-tasks.
[0059] In the embodiments described in this specification, the off-chain computing contract maintains the task completion status of one or more off-chain computing tasks. Typically, an off-chain computing contract defines only one type of off-chain computing task, but can create multiple task instances corresponding to that task. Each task instance records its corresponding task completion status. Therefore, the multiple task instances maintained on the off-chain computing contract can be triggered by different users initiating task creation contracts separately, or they can be triggered by the same user initiating multiple task creation contracts. However, these task instances all have the same execution logic, meaning that the task types of the tasks maintained by the off-chain computing contract are the same.
[0060] The proxy access engine involved in the embodiments of this specification can be a computing engine or a data engine. A computing engine, also known as an off-chain computing engine, refers to a service or subsystem that provides off-chain computing capabilities to node devices. A computing engine can often undertake one or more types of computing tasks, which is reflected in its support for the computing requirements corresponding to related sub-tasks. A data engine, also known as a database engine, refers to the core service program used to store, retrieve, process, and protect data. Using a database engine, access permissions can be controlled and transactions can be processed quickly, thereby meeting the requirements of most applications within an enterprise that need to process large amounts of data. A database engine is used to create relational databases for online transaction processing or online analytical processing of data. This includes creating tables for storing data and database objects (such as indexes, views, and stored procedures) for viewing, managing, and protecting data security. Different data engines support different data access methods or data types, thus reflecting their support for the data engine requirements corresponding to related sub-tasks.
[0061] In the embodiments of this specification, the first task event generated by the off-chain computing contract for the collaborative computing task, which is monitored by the first node device, records the descriptive information of the data provider node and the computing provider node corresponding to the collaborative computing task. The first task event includes the descriptive information of the participating nodes of the collaborative computing task. Specifically, this descriptive information refers to the identity information of the blockchain nodes on which the participating node devices are located, as specified by the collaborative computing task. The participating nodes corresponding to the collaborative computing task can be identified as the data provider node and / or computing provider node corresponding to the collaborative computing task according to their corresponding attribute characteristics. The data provider node corresponding to the collaborative computing task refers to the blockchain node in the blockchain network deployed on the node device that needs to provide data to other node devices during the execution of a collaborative computing task jointly completed by multiple node devices. This data is used by the off-chain computing engine deployed on other node devices as data required for executing the collaborative computing task and / or subsequent sub-tasks. The computing provider node corresponding to the collaborative computing task refers to the blockchain node in the blockchain network deployed on the node device that provides off-chain computing engine resources to execute the actual computing task during the execution of a collaborative computing task jointly completed by multiple node devices. It's easy to understand that any participating node in a collaborative computing task can be either a data provider node, a computing provider node, or both simultaneously. For example, for a participating node that is both a data provider node and a computing provider node in a collaborative computing task, the off-chain computing engine on its node device will simultaneously acquire local data from its own device and data from the data provider node's device during the execution of the collaborative computing task, in order to perform the collaborative computing task and / or other subsequent sub-tasks.
[0062] In the embodiments of this specification, the first task event also records the identification information of the off-chain computing engine participating in the execution of the collaborative computing task on the first node device where the computing provider node is located. This is to prompt the first node device to call the off-chain computing engine, and to instruct the second node device where the data provider node is located to send the read data to the off-chain computing engine when calling the proxy access engine. In addition, the first task event also records the task identifiers of the off-chain computing task and the collaborative computing task, so as to distinguish different tasks and sub-tasks. This is mainly to facilitate any node device to correctly identify the result of the collaborative computing task in the off-chain computing task when it completes the execution of the collaborative computing task and returns the result to the transaction. This allows the off-chain computing contract to correctly update the completion status of the collaborative computing task in the task instance of the corresponding off-chain computing task through the result return transaction, in order to deal with the situation where the same task contains multiple sub-tasks and the same off-chain computing contract creates multiple task instances of off-chain computing tasks at the same time. Of course, collaborative computing tasks also record the computations and data transfers they need to perform, and specify the source of the required data. This information is used to inform each node device of the task type and implementation method of the collaborative computing task, thereby guiding the node device to execute the collaborative computing task as expected after determining the available resources corresponding to the task type and implementation method of the collaborative computing task.
[0063] In the embodiments of this specification, since the first task event records the description information of the computing provider node, the first node device can determine that the first blockchain node belongs to the computing provider node if it determines that the identification information of the first blockchain node it deploys is included in the description information of the computing provider node recorded in the first task event; and determine that the first blockchain node does not belong to the computing provider node if it determines that the identification information of the first blockchain node is not included in the description information of the computing provider node recorded in the first task event.
[0064] In the embodiments of this specification, the first node device will only invoke the off-chain computing engine to execute the collaborative computing task if it determines that the first blockchain node belongs to the computing provider node corresponding to the collaborative computing task. Otherwise, if the first node device does not belong to the computing provider node corresponding to the collaborative computing task, the first node device will not invoke the off-chain computing engine to execute the collaborative computing task. Simultaneously, the first task event also records the identification information and / or communication address of the proxy access engine. The first node device writes the identification information and / or communication address of the proxy access engine into the invocation request for invoking the off-chain computing engine and sends the invocation request to the off-chain computing engine to invoke it. The off-chain computing engine thereby learns the identification information of the data provider node corresponding to the collaborative computing task and the identification information and / or communication address of the proxy access engine deployed in the second node device used to provide data, thus knowing that it needs to obtain data from the second node device via the proxy access engine.
[0065] In the embodiments of this specification, both the proxy access engine and the off-chain computing engine can only execute one subtask / collaborative computing task at a time. Therefore, the proxy access engine only has the permission to provide data within a specific range specified by the collaborative computing task during the time period of executing the collaborative computing task. Other off-chain computing engines can only request specific data from the proxy access engine during the period when they are executing the same collaborative computing task together with the proxy access engine. They cannot obtain data from the proxy access engine at any time, nor can they obtain arbitrary data from the proxy access engine. This implements a time limit and scope limit for data access based on collaborative computing tasks.
[0066] In the embodiments described in this specification, after the node devices of each participating node in the off-chain computing task receive the authorization request event generated by the off-chain computing contract, they will review their respective execution logic in the off-chain computing task to generate the authorization result of the off-chain computing task, and initiate an authorization transaction carrying their respective authorization results to the off-chain computing contract to complete the authorization of the off-chain computing task. Only after the off-chain computing contract completes the authorization of the off-chain computing task will it allow the generation of task events related to the off-chain computing task. Thus, the event listening mechanism guides each node device to execute the collaborative computing tasks related to the off-chain computing task, enabling the second node device of the data provider node to perform collaborative computing tasks through the event listening mechanism. The access engine provides the data read from the second node device to the first node device where the computing provider node is located, thereby restricting the data interaction between node devices to the execution of authorized off-chain computing tasks. On the one hand, this limits the scope and timing of data acquisition by the data requester to the execution logic of the authorized off-chain computing tasks, reducing security risks. On the other hand, the execution logic of the same off-chain computing engine can be different in different off-chain computing tasks. This means that the data access permissions of the same off-chain computing engine in different off-chain computing tasks can be designed differently, thus achieving the functional independence of the same off-chain computing engine in different collaborative computing tasks.
[0067] In the embodiments of this specification, when the off-chain computing engine is invoked by the first node, it specifies the task logic of the collaborative computing task that it needs to execute. This includes the process that the off-chain computing task needs to obtain data from the proxy access engine deployed on the corresponding second node device. Thus, the off-chain computing engine can obtain the data read by the proxy access engine from the second node device through at least two of the following strategies during the execution of the collaborative computing task.
[0068] In one embodiment, the off-chain computing engine does not actively request data from the proxy access engine during the execution of collaborative computing tasks. Instead, it waits for the proxy access engine to proactively push data to the off-chain computing engine. In this case, during the execution of collaborative computing tasks in response to calls from the second node device, the proxy access engine can read the data specified in the collaborative computing task from the second node device and proactively push the data to the off-chain computing engine under the first node device specified in the collaborative computing task, thereby enabling the off-chain computing engine to obtain the data. Since this embodiment adopts a mechanism where the proxy access engine proactively pushes data during the execution of collaborative computing tasks, the proxy access engine, as the data holder and authorizing party, learns about the relevant data acquisition needs of the off-chain computing engine deployed on the first node device based on the first task event generated by the trusted off-chain computing contract, and has the ability to proactively provide data. This allows the proxy computing engine to achieve secure data interaction by directly executing collaborative computing tasks according to their requirements without needing to perform repeated authentication when transmitting data externally. On the one hand, this limits the time for transmitting data externally to the execution of collaborative computing tasks; on the other hand, it also restricts the scope of data transmitted externally by the proxy computing engine to the collaborative computing task.
[0069] In another embodiment, during the execution of collaborative computing tasks, the off-chain computing engine will proactively send data access requests to the proxy access engine to obtain data from the second node device. However, this requires the proxy access engine to verify whether the data access request complies with the regulations and whether it is a necessary data interaction in the collaborative computing task. Only when the proxy access engine determines that the received data access request complies with the execution logic of the collaborative computing task and that responding to the data access request and transmitting data is a normal step in the execution of the collaborative computing task will it respond to the data access request and provide data to the off-chain computing engine.
[0070] Optionally, the off-chain computing engine is further configured to: send a data access request and the authorization credential corresponding to the data access request to the proxy access engine during the execution of the collaborative computing task; the proxy access engine is configured to: receive the data access request and the authorization credential during the execution of the collaborative computing task, and, if it is determined that the authorization credential is used to indicate that the data access request is for the collaborative computing task, send the data read from the second node device to the off-chain computing engine.
[0071] In this embodiment, during the execution of a collaborative computing task, if the off-chain computing engine needs to obtain data from the second node device, it will send a data access request to the proxy access engine deployed on the second node device. The data requested in this data access request is within the range of data required by the collaborative computing task. Simultaneously, to ensure the proxy access engine is convinced that the data access request is issued for the purpose of executing the collaborative computing task, the off-chain computing engine will also synchronously send the authorization credential corresponding to the data access request to the proxy access engine, proving that the data access request was issued during the execution of the collaborative computing task. After the first task event is listened to by the second node device, it will also trigger the second node device to call the locally deployed proxy access engine to execute the collaborative computing task. During the execution of the collaborative computing task, the proxy access engine will provide specific data from the second node device to the off-chain computing engine in the first node device according to the requirements of the collaborative computing task. Since this embodiment adopts a request-response passive data push mechanism, the proxy access engine will grant the off-chain computing engine specified by the collaborative computing task access to the data specified by the collaborative computing task on the second node device during the execution of the collaborative computing task. Upon receiving a data access request and authorization credential from the off-chain computing engine, the proxy access engine verifies the authorization credential. If it determines that the data access request pertains to the collaborative computing task—that is, if the data access request was issued during the execution of the collaborative computing task—then the proxy access engine will respond to the data access request. Within the data range defined by the collaborative computing task, it will read the data specified in the data access request from the second node device and return it to the off-chain computing engine. If it does not receive the authorization credential corresponding to the data access request, or if the received authorization credential does not indicate that the data access request pertains to the collaborative computing task, then the proxy access engine will not respond to the data access request and will not provide local data to the off-chain computing engine. This embodiment of the specification, by verifying the authorization credential, enables the proxy access engine to effectively distinguish whether the received data access request is legitimate under the passive push mechanism, thereby refusing to respond to data access requests from the off-chain computing engine for purposes other than executing the collaborative computing task, thus achieving secure data interaction.
[0072] Optionally, the first task event record contains the identification information of the collaborative computing task, and the authorization credential includes the identification information. The proxy access engine, when the authorization credential includes the identification information, determines that the authorization credential indicates that the data access request is for the collaborative computing task. In this embodiment, since the first task event can be monitored by both the first node device and the second node device, the identification information of the collaborative computing task can be carried in the first task event. This allows both the first node device and the second node device to obtain the identification information of the collaborative computing task. Furthermore, the identification information of different collaborative computing tasks is different from each other; therefore, this identification information can serve as consensus information between the off-chain computing engine and the proxy access engine to determine the collaborative computing task. The proxy access engine determines that the authorization credential indicates that the data access request is for the collaborative computing task when it determines that the authorization credential contains the identification information.
[0073] Optionally, the first task event record contains the task public key and task private key ciphertext corresponding to the collaborative computing task, wherein the task private key ciphertext is obtained by encrypting the task private key corresponding to the collaborative computing task using the public key corresponding to the off-chain computing engine; the authorization credential includes a first digital signature obtained by signing the data access request using the task private key, and the task private key is obtained by the off-chain computing engine by decrypting the task private key ciphertext using the private key corresponding to the off-chain computing engine; the proxy access engine is used to determine that the authorization credential is used to indicate that the data access request is for the collaborative computing task if the first digital signature is successfully verified using the task public key recorded in the first task event. In the embodiments described in this specification, when the off-chain computing contract generates the first task event corresponding to the collaborative computing task, it will synchronously generate a public-private key pair for the collaborative computing task, referred to as the task public key and task private key of the collaborative computing task. The task public key is directly recorded in the first task event and thus known to each node device through the event listening mechanism. The task private key is encrypted using the public key of the off-chain computing engine involved in the collaborative computing task that needs to obtain data across domains and is recorded in the first task event, that is, known to each node device in the form of task private key ciphertext. However, since the off-chain computing engine in the first node device has a private key corresponding to the off-chain computing engine used to decrypt the task private key ciphertext, after the first node device reads the task private key ciphertext in the first task event, it will put it into the call request used to call the off-chain computing engine, so that the off-chain computing engine can decrypt the task private key ciphertext with its own private key to obtain the task private key during the execution of the collaborative computing task. The only off-chain computing task capable of obtaining the task's private key signs the data access request using that private key to obtain a first digital signature as the authorization credential. Upon receiving the first digital signature from the authorization credential, the proxy access engine verifies the first digital signature using the task's public key obtained from the first task event on the first node device. If the verification is successful, the authorization credential is determined to indicate that the data access request is for the collaborative computing task. In this embodiment, since only the off-chain computing engine can obtain the task's private key, once the proxy access engine successfully verifies the first digital signature, it can be certain that the data access request was initiated by the off-chain computing engine possessing the task's private key. Therefore, the proxy access engine can determine that the data access request is for the collaborative computing task, and the initiator of the data access request must be the compliant executor of the collaborative computing task. Thus, the proxy access engine does not need to repeatedly verify the off-chain computing engine's identity information, accelerating the efficiency of the off-chain computing engine in obtaining cross-domain data in the passive push mechanism.
[0074] Optionally, the off-chain computing engine is further configured to: during the execution of the collaborative computing task, send a second digital signature obtained by signing the data access request using the private key corresponding to the off-chain computing engine to the proxy access engine; the proxy access engine is further configured to: during the execution of the collaborative computing task, verify the received second digital signature using the public key corresponding to the off-chain computing engine, and determine the validity of the authorization credential if the verification is successful and it is determined that the off-chain computing engine has access rights to the first node device. In this embodiment of the specification, the off-chain computing engine also needs to prove the validity of its identity to the proxy access engine through the second digital signature. After the proxy access engine verifies the second digital signature, it can confirm that the data access request originates from the off-chain computing engine. Therefore, when the collaborative computing task includes the logic of "providing the data requested by the data access request to the off-chain computing engine" and / or when the proxy access engine determines, based on a pre-maintained identity-based data access monitoring system, that "providing the data requested by the data access request to the off-chain computing engine" is permitted, it will confirm the validity of the authorization credential and further verify the authorization credential. The embodiments in this specification combine traditional identity-based data access permission provisioning strategies, bringing better security to cross-domain data interaction between different node devices.
[0075] Figure 2 This is a flowchart illustrating another data processing method provided in an exemplary embodiment. The method is applied to a second node device deployed with a second blockchain node. The blockchain network to which the second blockchain node belongs has an off-chain computing contract deployed. The off-chain computing contract maintains the execution logic of the node devices of each participating node in the off-chain computing task. The method includes:
[0076] S202: Upon detecting the authorization request event generated by the off-chain computing contract and determining that the second blockchain node belongs to the second participating node, obtain the second execution logic of the second node device in the off-chain computing task.
[0077] S204: Approve the second execution logic to generate the second authorization result corresponding to the off-chain computing task, and initiate a second authorization transaction carrying the second authorization result to the off-chain computing contract through the second blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node respectively, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing.
[0078] S206: Listen for the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; if it is determined that the second blockchain node belongs to the data provider node corresponding to the collaborative computing task, call the proxy access engine deployed on the second node device to execute the collaborative computing task, the proxy access engine being used to: provide the data read from the second node device to the off-chain computing engine deployed on the first node device where the computing provider node corresponding to the collaborative computing task is located during the execution of the collaborative computing task.
[0079] If the description information of the data provider node recorded in the first task event includes the identification information of the second blockchain node, then the second blockchain node is determined to belong to the data provider node. In this embodiment of the specification, the first task event for the collaborative computing task records the description information of the data provider node corresponding to the collaborative computing task. This means that if the description information of the data provider node includes the identification information of the second blockchain node it deploys, then the second node device can determine that its deployed second blockchain node belongs to the data provider node corresponding to the collaborative computing task. If the description information of the data provider node does not include the identification information of the second blockchain node, then the second node device can determine that its deployed second blockchain node does not belong to the data provider node corresponding to the collaborative computing task.
[0080] In the embodiments described in this specification, the second node device will only invoke the proxy access engine to execute the collaborative computing task if it determines that the second blockchain node belongs to the data provider node corresponding to the collaborative computing task. Otherwise, if the second node device does not belong to the data provider node corresponding to the collaborative computing task, the second node device will not invoke the proxy access engine to execute the collaborative computing task. After being invoked by the second node device, the proxy access engine will obtain the identification information of the computing provider node corresponding to the collaborative computing task and the identification information of the off-chain computing engine deployed in the first node device that needs to provide data to it, thereby instructing the proxy access engine to transmit the data read from the second node device to the corresponding off-chain computing engine.
[0081] Figure 3 This is a schematic diagram illustrating a scenario of node device interaction provided in an exemplary embodiment. For example... Figure 3 As shown, the first node device is equipped with the first blockchain node, the first scheduling engine, the off-chain computing engine, and the first data source in the blockchain network, while the second node device is equipped with the second blockchain node, the second scheduling engine, the proxy access engine, and the second data source in the blockchain network.
[0082] When an off-chain computing contract generates an authorization request event, and this event records the description information of the first and second blockchain nodes participating in the execution of the off-chain computing task, the first scheduling engine will listen to the authorization request event through the first blockchain node. Assuming that the authorization request event contains the execution logic of each participating node device in the off-chain computing task, the first scheduling engine will read the first execution logic of the first node device participating in the execution of the off-chain computing task from the authorization request event, audit the first execution logic to generate the first authorization result corresponding to the off-chain computing task, and then initiate a first authorization transaction carrying the first authorization result to the off-chain computing contract through the first blockchain node. Similarly, after listening to the authorization request event, the second scheduling engine can also read the second execution logic of the second node device participating in the execution of the off-chain computing task, audit the second execution logic to generate the second authorization result corresponding to the off-chain computing task, and initiate a second authorization transaction carrying the second authorization result to the off-chain computing contract through the second blockchain node.
[0083] In response to the first authorization transaction and the second authorization transaction, the off-chain computing contract obtains the first authorization result and the second authorization result carried therein. Assuming that both the first authorization result and the second authorization result are used to indicate that the authorization is successful, the off-chain computing contract will allow the off-chain computing contract to generate task events related to the off-chain computing task.
[0084] When the off-chain computing contract generates the first task event of a collaborative computing task, one of the subtasks of the off-chain computing task, the first task event will be monitored by both the first and second scheduling engines. Assume that the first task event simultaneously records the description information of the data provider node and the computing provider node corresponding to the collaborative computing task, as well as the identification information of the proxy access engine that needs to provide data, the identification information of the off-chain computing engine that needs to acquire data, and the identification information of the data to be provided. Here, the description information of the data provider node is the identification information of the second blockchain node, and the description information of the computing provider node is the identification information of the first blockchain node. Therefore, the second scheduling engine can determine that the second node device needs to provide data to the off-chain computing engine in the first node device. Thus, the second scheduling engine will call the proxy access engine to execute the collaborative computing task, actively transmitting the data obtained from the second data source to the off-chain computing engine in the first node device. On the other hand, the first scheduling engine can determine that the off-chain computing engine specified in the first task event deployed in the first node device needs to obtain data from the second node device. Therefore, the first scheduling engine will call the specified off-chain computing engine to execute the collaborative computing task. For example, the specified off-chain computing engine is a trusted computing engine running in a feasible execution environment, which needs to obtain data from the second node device to complete the relevant trusted computing operations defined in the collaborative computing task. At this time, the trusted computing engine will obtain the relevant data sent by the proxy access engine through the network connection with the proxy access engine deployed on the second node device, thereby further executing trusted computing operations to support the continued completion of the collaborative computing task.
[0085] Figure 4 This is a schematic structural diagram of a device provided in an exemplary embodiment. Please refer to... Figure 4 At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, memory 408, and non-volatile memory 410, and may also include other hardware required for its functions. One or more embodiments of this specification can be implemented in software, for example, the processor 402 reads the corresponding computer program from the non-volatile memory 410 into memory 408 and then runs it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0086] like Figure 5 As shown, Figure 5 This is a block diagram of a data processing apparatus provided in this specification according to an exemplary embodiment, which can be applied to, for example... Figure 4The device shown implements the technical solution of this specification; the device is applied to a first node device with a first blockchain node deployed thereon, the blockchain network to which the first blockchain node belongs deploys an off-chain computing contract, the off-chain computing contract maintains the execution logic of the node devices of each participating node in the off-chain computing task; the device includes:
[0087] The first execution logic acquisition unit 501 is used to acquire the first execution logic of the first node device in the off-chain computing task when it hears the authorization application event generated by the off-chain computing contract and determines that the first blockchain node belongs to the first participating node.
[0088] The first authorization transaction initiation unit 502 is used to approve the first execution logic to generate the first authorization result corresponding to the off-chain computing task, and to initiate a first authorization transaction carrying the first authorization result to the off-chain computing contract through the first blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing.
[0089] The data acquisition unit 503 is used to monitor the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; when it is determined that the first blockchain node belongs to the computing provider node corresponding to the collaborative computing task, the off-chain computing engine deployed on the first node device is invoked to execute the collaborative computing task, the off-chain computing engine is used to: during the execution of the collaborative computing task, acquire the data read from the second node device by the proxy access engine deployed on the second node device where the data provider node corresponding to the collaborative computing task is located.
[0090] Optionally, the authorization application event includes the execution logic of the node devices of each participating node in the off-chain computing task; the first execution logic acquisition unit 501 is specifically used for:
[0091] Read the first execution logic of the first node device in the off-chain computing task from the authorization request event.
[0092] Optionally, the first execution logic includes: the invocation status of each resource engine deployed on the first node device and / or the data interaction status between the resource engines and other resource engines deployed on other node devices.
[0093] Optionally, the first execution logic acquisition unit 501 is specifically used for:
[0094] An execution logic query transaction is initiated to the off-chain computing contract. The execution logic query event generated by the off-chain computing contract in response to the execution logic query transaction is listened to. The first execution logic of the first node device in the off-chain computing task is read from the execution logic query event. The execution logic query event records the first execution logic of the first node device in the off-chain computing task or the execution logic of the node devices of each participating node in the off-chain computing task.
[0095] Optionally, the off-chain computing contract may be used to trigger the generation of the authorization request event during the initialization phase of successful deployment or in response to an authorization request transaction.
[0096] Optionally, the off-chain computing contract maintains the task completion status corresponding to the off-chain computing task. The task completion status is used to describe the completion status of each sub-task included in the off-chain computing task, and the blockchain events related to the off-chain computing task include the task events corresponding to each sub-task. When the collaborative computing task belongs to a sub-task of the off-chain computing task, the first execution logic acquisition unit 501 is specifically used for:
[0097] The off-chain computing contract is monitored to generate a first task event for the collaborative computing task when the task completion status meets the execution conditions corresponding to the collaborative computing task.
[0098] Optionally, the task completion status is updated by the off-chain computing contract in response to the transaction corresponding to the off-chain computing task. The transaction corresponding to the off-chain computing task includes the task creation transaction corresponding to the off-chain computing task, or the result return transaction initiated by any node device after completing the execution of any sub-task among the sub-tasks.
[0099] Optionally, the first task event records description information of the data provider node and the computing provider node.
[0100] Optionally, the off-chain computing engine is further configured to: send a data access request and the authorization credential corresponding to the data access request to the proxy access engine during the execution of the collaborative computing task;
[0101] The proxy access engine is used to: receive the data access request and the authorization credential during the execution of the collaborative computing task, and, if it is determined that the authorization credential is used to indicate that the data access request is for the collaborative computing task, send the data read from the second node device to the off-chain computing engine.
[0102] Optionally, the first task event record contains identification information of the collaborative computing task, the authorization credential includes the identification information, and the proxy access engine is used to determine, when the authorization credential includes the identification information, that the authorization credential is used to indicate that the data access request is for the collaborative computing task.
[0103] Optionally, the first task event record contains the task public key and task private key ciphertext corresponding to the collaborative computing task, wherein the task private key ciphertext is obtained by encrypting the task private key corresponding to the collaborative computing task using the public key corresponding to the off-chain computing engine;
[0104] The authorization credential includes a first digital signature obtained by signing the data access request using the task private key, and the task private key is obtained by the off-chain computing engine by decrypting the task private key ciphertext using the private key corresponding to the off-chain computing engine;
[0105] The proxy access engine is used to determine, when the first digital signature is successfully verified using the task public key recorded in the first task event, that the authorization credential is used to indicate that the data access request is for the collaborative computing task.
[0106] Optionally, the off-chain computing engine is further configured to: during the execution of the collaborative computing task, send a second digital signature obtained by signing the data access request using the private key corresponding to the off-chain computing engine to the proxy access engine;
[0107] The proxy access engine is also used to: verify the received second digital signature using the public key corresponding to the off-chain computing engine during the execution of the collaborative computing task; and determine the validity of the authorization credential if the verification is successful and it is determined that the off-chain computing engine has access rights to the first node device.
[0108] like Figure 6 As shown, Figure 6 This is a block diagram of a data processing apparatus provided in this specification according to an exemplary embodiment, which can be applied to, for example... Figure 4 The device shown implements the technical solution of this specification; the device is applied to a second node device with a second blockchain node deployed thereon, the blockchain network to which the second blockchain node belongs deploys an off-chain computing contract, the off-chain computing contract maintains the execution logic of the node devices of each participating node in the off-chain computing task; the device includes:
[0109] The second execution logic acquisition unit 601 is used to acquire the second execution logic of the second node device in the off-chain computing task when it hears the authorization application event generated by the off-chain computing contract and determines that the second blockchain node belongs to the second participating node.
[0110] The second authorization transaction initiation unit 602 is used to approve the second execution logic to generate the second authorization result corresponding to the off-chain computing task, and to initiate a second authorization transaction carrying the second authorization result to the off-chain computing contract through the second blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node respectively, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing.
[0111] The data providing unit 603 is used to listen to the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; when it is determined that the second blockchain node belongs to the data provider node corresponding to the collaborative computing task, the proxy access engine deployed on the second node device is invoked to execute the collaborative computing task, the proxy access engine being used to: during the execution of the collaborative computing task, provide the data read from the second node device to the off-chain computing engine deployed on the first node device where the computing provider node corresponding to the collaborative computing task is located.
[0112] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0113] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0114] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a server system. Of course, this invention does not exclude the possibility that, with the future development of computer technology, the computer implementing the functions of the above embodiments can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0115] While one or more embodiments of this specification provide the operational steps of the methods described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or end product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes the elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.
[0116] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
[0117] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0118] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0120] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0121] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0122] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0123] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.
[0125] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0126] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit the scope of this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims.
Claims
1. A data processing method, applied to a first node device deployed with a first blockchain node, wherein the blockchain network to which the first blockchain node belongs deploys an off-chain computing contract, the off-chain computing contract maintaining the execution logic of the node devices of each participating node in the off-chain computing task; the method comprising: Upon detecting the authorization request event generated by the off-chain computing contract and determining that the first blockchain node belongs to the first participating node, the first execution logic of the first node device in the off-chain computing task is obtained. The first execution logic is approved to generate the first authorization result corresponding to the off-chain computing task, and the first authorization transaction carrying the first authorization result is initiated to the off-chain computing contract through the first blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node respectively, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing. Listen for the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; if it is determined that the first blockchain node belongs to the computing provider node corresponding to the collaborative computing task, call the off-chain computing engine deployed on the first node device to execute the collaborative computing task, the off-chain computing engine is used to: during the execution of the collaborative computing task, obtain the data read from the second node device by the proxy access engine deployed on the second node device where the data provider node corresponding to the collaborative computing task is located.
2. The method according to claim 1, wherein the authorization application event includes the execution logic of the node device where each participating node is located in the off-chain computing task; the step of obtaining the first execution logic of the first node device in the off-chain computing task includes: Read the first execution logic of the first node device in the off-chain computing task from the authorization request event.
3. The method according to claim 1, wherein the first execution logic comprises: The invocation status of each resource engine deployed on the first node device and / or the data interaction status between each resource engine and other resource engines deployed on other node devices.
4. The method according to claim 1, wherein obtaining the first execution logic of the first node device in the off-chain computing task comprises: An execution logic query transaction is initiated to the off-chain computing contract. The execution logic query event generated by the off-chain computing contract in response to the execution logic query transaction is listened to. The first execution logic of the first node device in the off-chain computing task is read from the execution logic query event. The execution logic query event records the first execution logic of the first node device in the off-chain computing task or the execution logic of the node devices of each participating node in the off-chain computing task.
5. The method according to claim 1, wherein the off-chain computing contract is used to trigger the generation of the authorization request event during the initialization phase of successful deployment or in response to an authorization request transaction.
6. The method according to claim 1, wherein the off-chain computing contract maintains the task completion status corresponding to the off-chain computing task, the task completion status is used to describe the completion status of each sub-task included in the off-chain computing task, and the blockchain events related to the off-chain computing task include the task events corresponding to each sub-task; when the collaborative computing task belongs to a sub-task of the off-chain computing task, the listening to the first task event includes: The off-chain computing contract is monitored to generate a first task event for the collaborative computing task when the task completion status meets the execution conditions corresponding to the collaborative computing task.
7. The method according to claim 6, wherein the task completion status is updated by the off-chain computing contract in response to the transaction corresponding to the off-chain computing task, wherein, The transactions corresponding to the off-chain computing tasks include task creation transactions corresponding to the off-chain computing tasks, or result return transactions initiated by any node device after completing the execution of any subtask among the subtasks.
8. The method according to claim 1, wherein the first task event records description information of the data provider node and the computing provider node.
9. The method according to claim 1, wherein the off-chain computing engine is further configured to: during the execution of the collaborative computing task, send the data access request and the authorization credential corresponding to the data access request to the proxy access engine; The proxy access engine is used to: receive the data access request and the authorization credential during the execution of the collaborative computing task, and, if it is determined that the authorization credential is used to indicate that the data access request is for the collaborative computing task, send the data read from the second node device to the off-chain computing engine.
10. The method according to claim 9, wherein the first task event record contains identification information of the collaborative computing task, the authorization credential includes the identification information, and the proxy access engine is used to determine, when the authorization credential includes the identification information, that the authorization credential is used to indicate that the data access request is for the collaborative computing task.
11. The method according to claim 9, wherein the first task event record contains the task public key and task private key ciphertext corresponding to the collaborative computing task, wherein, The task private key ciphertext is obtained by encrypting the task private key corresponding to the collaborative computing task using the public key corresponding to the off-chain computing engine; The authorization credential includes a first digital signature obtained by signing the data access request using the task private key, and the task private key is obtained by the off-chain computing engine by decrypting the task private key ciphertext using the private key corresponding to the off-chain computing engine; The proxy access engine is used to determine, when the first digital signature is successfully verified using the task public key recorded in the first task event, that the authorization credential is used to indicate that the data access request is for the collaborative computing task.
12. The method according to claim 9, wherein the off-chain computing engine is further configured to: during the execution of the collaborative computing task, send a second digital signature obtained by signing the data access request using the private key corresponding to the off-chain computing engine to the proxy access engine; The proxy access engine is also used to: verify the received second digital signature using the public key corresponding to the off-chain computing engine during the execution of the collaborative computing task; and determine the validity of the authorization credential if the verification is successful and it is determined that the off-chain computing engine has access rights to the first node device.
13. A data processing method, applied to a second node device deployed with a second blockchain node, wherein the blockchain network to which the second blockchain node belongs deploys an off-chain computing contract, the off-chain computing contract maintaining the execution logic of the node devices of each participating node in the off-chain computing task; the method includes: Upon detecting the authorization request event generated by the off-chain computing contract and determining that the second blockchain node belongs to the second participating node, the second execution logic of the second node device in the off-chain computing task is obtained. The second execution logic is approved to generate a second authorization result corresponding to the off-chain computing task, and a second authorization transaction carrying the second authorization result is initiated to the off-chain computing contract through the second blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization approval. The system listens for the first task event generated by the off-chain computing contract, which corresponds to a collaborative computing task related to the off-chain computing task. If it is determined that the second blockchain node belongs to the data provider node corresponding to the collaborative computing task, the system calls the proxy access engine deployed on the second node device to execute the collaborative computing task. The proxy access engine is used to: provide the data read from the second node device to the off-chain computing engine deployed on the first node device where the computing provider node corresponding to the collaborative computing task is located during the execution of the collaborative computing task.
14. A data processing apparatus, applied to a first node device on which a first blockchain node is deployed, wherein the blockchain network to which the first blockchain node belongs has an off-chain computing contract deployed, the off-chain computing contract maintaining the execution logic of the node devices of each participating node in the off-chain computing task; the apparatus comprising: The first execution logic acquisition unit is used to acquire the first execution logic of the first node device in the off-chain computing task when it hears the authorization application event generated by the off-chain computing contract and determines that the first blockchain node belongs to the first participating party node. The first authorization transaction initiation unit is used to approve the first execution logic to generate the first authorization result corresponding to the off-chain computing task, and to initiate a first authorization transaction carrying the first authorization result to the off-chain computing contract through the first blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing. The data acquisition unit is used to monitor the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; when it is determined that the first blockchain node belongs to the computing provider node corresponding to the collaborative computing task, the off-chain computing engine deployed on the first node device is invoked to execute the collaborative computing task, the off-chain computing engine is used to: during the execution of the collaborative computing task, acquire the data read from the second node device by the proxy access engine deployed on the second node device where the data provider node corresponding to the collaborative computing task is located.
15. A data processing apparatus is applied to a second node device deployed with a second blockchain node, wherein the blockchain network to which the second blockchain node belongs deploys an off-chain computing contract, the off-chain computing contract maintaining the execution logic of the node devices of each participating node in the off-chain computing task; the apparatus comprises: The second execution logic acquisition unit is used to acquire the second execution logic of the second node device in the off-chain computing task when the authorization application event generated by the off-chain computing contract is detected and it is determined that the second blockchain node belongs to the second participating party node. The second authorization transaction initiation unit is used to approve the second execution logic to generate the second authorization result corresponding to the off-chain computing task, and to initiate a second authorization transaction carrying the second authorization result to the off-chain computing contract through the second blockchain node. The off-chain computing contract is used to: respond to the authorization transactions initiated by each participating node respectively, and allow the off-chain computing contract to generate task events related to the off-chain computing task when each authorization result corresponding to the off-chain computing task is used to represent authorization passing. A data providing unit is used to monitor the first task event generated by the off-chain computing contract, the first task event corresponding to the collaborative computing task related to the off-chain computing task; when it is determined that the second blockchain node belongs to the data provider node corresponding to the collaborative computing task, the unit calls the proxy access engine deployed on the second node device to execute the collaborative computing task, the proxy access engine being used to: during the execution of the collaborative computing task, provide the data read from the second node device to the off-chain computing engine deployed on the first node device where the computing provider node corresponding to the collaborative computing task is located.
16. An electronic device comprising: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-13 by executing the executable instructions.
17. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1-13.
Citation Information
Patent Citations
Internet of Things system, equipment cooperation method, corresponding equipment, platform and node
CN110177107A
Contract deployment method and device
CN111090875A