A data processing method and device, electronic equipment and storage medium
By monitoring task events generated by off-chain computing contracts, node devices execute collaborative computing tasks and generate de-identified information, thus solving the problems of data leakage and control of data usage rights in blockchain networks, and achieving the protection of data usage rights and the reduction of risks.
Patent Information
- Application Number
- CN202210473020.5
- 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 technologies, the execution results of off-chain computing tasks defined by smart contracts in blockchain networks are at risk of data leakage after being stored on the blockchain, and the parties involved in collaborative computing tasks cannot control their data usage rights.
By monitoring task events generated by off-chain computing contracts, node devices with participating nodes execute collaborative computing tasks, obtain partial components of the execution results, and generate anonymized information containing only partial execution results. The blockchain node then initiates a result return transaction to the off-chain computing task contract, ensuring that data users obtain the components from all participating node devices before obtaining the complete execution results.
It safeguards the data usage rights of all parties involved in collaborative computing tasks, reduces the risk of data leakage, and ensures flexible control over the authorized targets and scope of data users.
Smart Images

Figure CN114896635B_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 to complete the off-chain computing task, the execution result is publicly available after being stored on the blockchain. Theoretically, any third party can access this information on the blockchain without the permission of the parties involved in the collaborative computing task, posing a risk of data leakage. Furthermore, the parties involved in the collaborative computing task cannot know or control who needs to access the data results, which infringes on their data usage rights. 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 to which a first blockchain node is deployed, wherein the blockchain network to which the first blockchain node belongs is deployed with an off-chain computing contract; the method includes:
[0006] Listen to the task events generated by the off-chain computing contract for the collaborative computing task. The task events record the description information of at least two participating nodes corresponding to the collaborative computing task.
[0007] If it is determined that the first blockchain node belongs to the participating node, the first off-chain computing engine deployed on the first node device is invoked to execute the collaborative computing task to obtain the first constituent element of the execution result corresponding to the collaborative computing task, and the first de-identified information corresponding to the first constituent element is generated. The first constituent element only contains part of the information of the execution result.
[0008] The first blockchain node initiates a first result return transaction containing the first de-identified information to the off-chain computing task contract.
[0009] According to a second aspect of one or more embodiments of this specification, a data processing method is proposed, applied to a first blockchain node, wherein the blockchain network to which the first blockchain node belongs is deployed with an off-chain computing contract; the method includes:
[0010] The off-chain computing contract is invoked to execute the transaction corresponding to the off-chain computing task, so as to generate a task event for the collaborative computing task. The task event records the description information of at least two participating nodes corresponding to the collaborative computing task.
[0011] The system receives a first result return transaction containing first de-identified information initiated by a first participant node device that has deployed the participant node. It then calls the off-chain computing contract to execute the first result return transaction and maintains the first de-identified information in the off-chain computing contract. The first de-identified information is generated by the first participant node device based on the first constituent element of the execution result corresponding to the collaborative computing task. The first constituent element is obtained by the first participant node device, upon listening to the task event and determining that it has deployed the participant node, by calling the first off-chain computing engine deployed by the first participant node device to execute the collaborative computing task. The first constituent element only contains a portion of the execution result information.
[0012] The system receives a result usage transaction initiated by the data user for the execution result, and calls the off-chain computing contract to execute the result usage transaction to generate a result usage event that records the identity information of the data user and the description information of the execution result. The result usage event is used to enable the first participating node device to provide the first component to the data user when it hears the result usage event and determines that the data user has the right to use the first component of the execution result.
[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 to which a first blockchain node is deployed, the blockchain network to which the first blockchain node belongs deploying an off-chain computing contract; the apparatus includes:
[0014] An event listening unit is used to listen to task events generated by the off-chain computing contract for collaborative computing tasks. The task events record description information of at least two participating nodes corresponding to the collaborative computing task.
[0015] The task execution unit is used to, when it is determined that the first blockchain node belongs to the participating party node, call the first off-chain computing engine deployed on the first node device to execute the collaborative computing task to obtain the first constituent element of the execution result corresponding to the collaborative computing task, and generate the first de-identified information corresponding to the first constituent element. The first constituent element only contains part of the information of the execution result.
[0016] The result return unit is used to initiate a first result return transaction containing first de-identified information to the off-chain computing task contract through the first blockchain node.
[0017] According to a fourth aspect of one or more embodiments of this specification, a data processing apparatus is provided, applied to a first blockchain node, wherein the blockchain network to which the first blockchain node belongs is deployed with an off-chain computing contract; the apparatus includes:
[0018] An event generation unit is used to call the off-chain computing contract to execute the transaction corresponding to the off-chain computing task, so as to generate a task event for the collaborative computing task. The task event records the description information of at least two participating nodes corresponding to the collaborative computing task.
[0019] The result maintenance unit is used to receive a first result return transaction containing first de-identified information initiated by a first participant node device that has deployed the participant node, call the off-chain computing contract to execute the first result return transaction, and maintain the first de-identified information in the off-chain computing contract. The first de-identified information is generated by the first participant node device based on the first constituent element of the execution result corresponding to the collaborative computing task. The first constituent element is obtained by the first participant node device calling the first off-chain computing engine deployed by the first participant node device to execute the collaborative computing task when it hears the task event and determines that it has deployed the participant node. The first constituent element only contains part of the execution result information.
[0020] The result usage unit is used to receive a result usage transaction initiated by the data user for the execution result, and to call the off-chain computing contract to execute the result usage transaction to generate a result usage event that records the identity information of the data user and the description information of the execution result. The result usage event is used to enable the first participating node device to provide the first component to the data user when it hears the result usage event and determines that the data user has the right to use the first component of the execution result.
[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, by monitoring task events generated by the off-chain computing contract for collaborative computing tasks, each node device with participating nodes can execute the collaborative computing task to obtain a portion of the components of the execution result corresponding to the collaborative computing task. These components are then anonymized and stored on the blockchain as de-identified information in the off-chain computing contract, ensuring that the off-chain computing contract does not directly maintain the execution result in plaintext. Simultaneously, for data users who need the complete execution result, they must obtain the components of the execution result from each node device participating in the collaborative computing task before integrating them into the final result. This ensures that the participants in the collaborative computing task can clearly understand the authorized recipients of the execution result and flexibly control the scope of authorization, thus protecting the data usage rights of the relevant participants in the collaborative computing task. Attached Figure Description
[0027] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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 data processing method 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 deploying off-chain computing contracts; the method includes:
[0036] S102: Listen to the task events generated by the off-chain computing contract for the collaborative computing task. The task events record the description information of at least two participating nodes corresponding to the collaborative computing task.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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. When the collaborative computing task is a sub-task of the off-chain computing task, the step of listening to the task event generated by the off-chain computing contract for the collaborative computing task includes: listening to the 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.
[0041] In this embodiment, the off-chain computing task is represented as a corresponding task instance on the off-chain computing contract. Its completion status is maintained within 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 collaborative computing task is a subtask of the off-chain computing task. Since the execution dependency order of the subtasks within 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 within the off-chain computing task, thereby initiating a task event for the collaborative computing task. In this embodiment, the entity listening to the task events generated by the off-chain computing contract is specifically the first scheduling engine deployed on the first node device.
[0042] In the embodiments of this specification, the task event generated by the off-chain computing task contract and monitored by the first node device records the description information of at least two participating nodes corresponding to the collaborative computing task. The description information of the at least two participating nodes corresponding to the collaborative computing task recorded in the task event refers to the identity information of the blockchain nodes involved in the collaborative computing task. The first node device can determine that its own deployed first blockchain node is a participating node in the collaborative computing task if the description information of the at least two participating nodes contains the identification information of its own deployed first blockchain node. In this case, the first node device needs to respond to and execute the collaborative computing task. However, if the description information of the at least two participating nodes does not contain the identification information of the first blockchain node, the first node device can determine that its own deployed first blockchain node is not a participating node in the collaborative computing task, and therefore, the first node device will not respond to or execute the collaborative computing task. In addition, the task event also records the task identifiers of off-chain computing tasks and collaborative computing tasks to distinguish different tasks and subtasks. This is mainly to facilitate the subsequent result provider node devices to correctly identify the execution result of the collaborative computing task within the off-chain computing task when they need to return a result transaction. This allows the off-chain computing task contract to correctly update the completion status of the collaborative computing task within the off-chain computing task through the result return transaction, in order to handle situations where the same off-chain computing task contains multiple subtasks or where the same user creates multiple off-chain computing tasks simultaneously. Of course, the collaborative computing task also records the computations and data transfer operations it needs to perform, and specifies the source of the required data. This information is used to inform each node device of the task type and its implementation method of the collaborative computing task, thereby guiding the participating node devices to execute the collaborative computing task as expected after determining the available resources.
[0043] 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 a task creation transaction or a result return transaction initiated by any node device after completing the execution of any subtask among the subtasks. In the embodiments of this specification, the off-chain computing contract maintains the task completion status corresponding to 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 to the off-chain computing contract, 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.
[0044] S104: If it is determined that the first blockchain node belongs to the participating node, the first off-chain computing engine deployed on the first node device is invoked to execute the collaborative computing task to obtain the first constituent element of the execution result corresponding to the collaborative computing task, and the first desensitized information corresponding to the first constituent element is generated. The first constituent element only contains part of the information of the execution result.
[0045] As mentioned above, when the first node device determines that the first blockchain node belongs to the participating node, it needs to execute the collaborative computing task. At this time, the first node device will query the off-chain computing engine deployed by the first node device that supports the execution of the collaborative computing task according to the task requirements corresponding to the collaborative computing task recorded in the task event. After the first node device finds that the first off-chain computing engine deployed locally supports the execution of the collaborative computing task, it will carry the relevant parameters carried in the task event in the call request and send the call request to the first off-chain computing engine to instruct the first off-chain computing engine to execute the collaborative computing task. The call request also includes description information of other off-chain computing engines that participate in the execution of the collaborative computing task.
[0046] After the collaborative computing task involved in the embodiments of this specification is completed by each participating node device, each participating node device will not generate a unified execution result corresponding to the collaborative computing task. Instead, the results generated by each participating node device when executing the collaborative computing task are not completely consistent, and the result generated by each participating node device is only a part of the information of the execution result corresponding to the collaborative computing task. This part of the information is called the constituent elements of the execution result. Only when all the constituent elements of the execution result are collected can the complete execution result be obtained. All the constituent elements of the execution result are distributed to different participating node devices for generation and maintenance respectively. For example, the participating nodes in a collaborative computing task include a first blockchain node, a second blockchain node, and a third blockchain node, which are deployed by the first node device, the second node device, and the third node device, respectively. After the three node devices complete the collaborative computing task, they will generate different results. That is, the first node device will generate and maintain a first component, the second node device will generate and maintain a second component, and the third node device will generate and maintain a third component. The first component, the second component, and the third component all contain part of the execution result information corresponding to the collaborative computing task. Only by integrating the first component, the second component, and the third component can the execution result corresponding to the collaborative computing task be obtained.
[0047] After the first off-chain computing engine completes the collaborative computing task, the first node device will obtain the first constituent element of the execution result corresponding to the collaborative computing task generated by the first off-chain computing engine. This first constituent element only contains partial information of the execution result. This means that the first node device does not obtain the complete execution result, but only holds the first constituent element representing a portion of the execution result information. Furthermore, when the data user subsequently requests the execution result related to the collaborative computing task, it can only provide the data user with the first constituent element. In the embodiments of this specification, the entity that determines whether the first blockchain node belongs to the participating node and calls the first off-chain computing engine deployed on the first node device to execute the collaborative computing task is specifically the first scheduling engine deployed on the first node device.
[0048] In the embodiments of this specification, the first constituent element includes: plaintext splitting information obtained by splitting the execution result, ciphertext splitting information obtained by splitting the encrypted result obtained by encrypting the execution result, or coded splitting information obtained by splitting the encoded state result obtained by encoding the execution result. In one case, the first constituent element can be obtained by simply splitting the plaintext of the execution result, meaning that the data user directly obtains part of the execution result of the collaborative computing task upon obtaining the first constituent element. In another case, the first constituent element can also be ciphertext splitting information obtained by splitting the encrypted result obtained by encrypting the execution result. In this case, the execution result is first encrypted into an encrypted result, and then the first constituent element is obtained by splitting this encrypted result. This means that if the data user only obtains the first constituent element, it will not reveal any information about the execution result due to its ciphertext state (although the first constituent element objectively contains information about the execution result, this information can only be revealed when all other constituent elements of the execution result are collected). Only when the data user obtains all the constituent elements of the execution result can the execution result be revealed. First, all constituent elements are concatenated into a single ciphertext result. Then, the ciphertext result is decrypted into the execution result. This avoids the situation where data users can directly obtain a partial execution result when they only have access to some constituent elements, thus reducing the risk of data leakage. In another scenario, the first constituent element can be coded decomposition information obtained by splitting the encoded state result obtained from the encoded execution result. In this case, the execution result is first encoded into a coded state result, and then the first constituent element is obtained by splitting this coded state result. Similar to the splitting of the encrypted result, the first constituent element in this case will not directly reveal any information about the execution result on its own. This avoids the situation where data users can directly obtain a partial execution result when they only have access to some constituent elements, thus reducing the risk of data leakage.
[0049] After the first node device obtains the first constituent element, it will further de-identify the first constituent element to generate first de-identified information corresponding to the first constituent element. For example, the first de-identified information can be a first encrypted element obtained by encrypting the first constituent element, and the first encrypted element can be decrypted into the first constituent element using a decryption key; the first de-identified information can also be a first resource address where the first constituent element is stored on the first node device, and the first node device can find and retrieve the first constituent element stored locally using the first resource address; the first de-identified information can also be a first hash value obtained by hashing the first constituent element, so the first hash value can uniquely anchor the first constituent element, and can also serve as a retrieval index for the first constituent element, that is, the first node device can find and retrieve the first constituent element stored locally using the first hash value. In the embodiments of this specification, the entity that de-identifies the first constituent element to generate the first constituent element is specifically the first scheduling engine deployed on the first node device.
[0050] Optionally, the first off-chain computing engine is configured to: acquire first data sent by other off-chain computing engines during the execution of the collaborative computing task, for use during the execution of the collaborative computing task; and / or send second data generated during the execution of the collaborative computing task to the other computing engines, so that the other computing engines use the second data during the execution of the collaborative computing task; wherein, the other computing engines include: off-chain computing engines other than the first off-chain computing engine deployed on a node device on which any of the at least two participating nodes are deployed. In the embodiments of this specification, during the execution of the collaborative computing task in response to a call request initiated by a first node device, the first off-chain computing engine acquires first data sent by other computing engines, for use during the execution of the collaborative computing task or subsequent sub-tasks; and / or sends second data generated during the execution of the collaborative computing task to the other computing engines, so that the other computing engines use the second data during the execution of the collaborative computing task or subsequent sub-tasks. In this embodiment, the first off-chain computing engine can know which off-chain computing engines are participating in the collaborative computing task by calling a request. Therefore, the first off-chain computing engine can receive first data from other computing engines that are also executing the collaborative computing task during the execution of the collaborative computing task. The first data will be used by the first off-chain computing engine in the subsequent execution of the collaborative computing task. On the other hand, it can also send the generated second data to other computing engines that are executing the collaborative computing task and need to obtain the second data as defined in the collaborative computing task. This allows the second data to be used by the other computing engines in the subsequent execution of the collaborative computing task, thereby realizing the interaction process between the off-chain computing engines deployed on various node devices defined in the collaborative computing task, so as to finally complete the collaborative computing task through the collaborative interaction of multiple off-chain computing engines.
[0051] S106: Initiate a first result return transaction containing the first de-identified information to the off-chain computing task contract through the first blockchain node.
[0052] When the first node device completes the collaborative computing task and obtains the first execution result corresponding to the collaborative computing task, it initiates a first result return transaction containing the first de-identified information to the off-chain computing contract through the first blockchain node, so as to update the execution result of the collaborative computing task maintained by the off-chain computing contract.
[0053] Optionally, the off-chain computing contract is used to: in response to a result return transaction initiated by each node device with the participating party nodes deployed, maintain the de-identified information corresponding to each component of the execution result, and the component is used to integrate the execution result.
[0054] The off-chain computing contract described in this specification can respond to result return transactions initiated by each node device, containing de-identified information corresponding to each component element. This allows for the simultaneous maintenance of multiple execution results for the same collaborative computing task. For example, it can simultaneously maintain three de-identified information messages returned by three different node devices through result return transactions. These include the first de-identified information corresponding to the first component element returned by the first node device, the second de-identified information corresponding to the second component element returned by the second node device, and the third de-identified information corresponding to the third component element returned by the third node device. The execution result of the collaborative computing task can be obtained by integrating the first, second, and third component elements. Since all components of the collaborative computing task's execution result are distributed among the participating node devices and each component corresponds to one de-identified information message, the off-chain computing contract considers the collaborative computing task's execution result to have completed the on-chain notarization process when the number of received de-identified information reaches the number of participating nodes. Because the off-chain computing contract records anonymized information corresponding to all the components of the execution result, the execution result can be completely anchored on the chain, so as to serve as an index to instruct data users to obtain the components related to the corresponding execution result or to verify the integrity of the components.
[0055] As previously described, after the first node device initiates a first result return transaction containing the first de-identified information to the off-chain computing contract, the off-chain computing contract updates the task completion status corresponding to the off-chain computing task maintained by the off-chain computing contract in response to the first result return transaction, so as to maintain the first de-identified information in the off-chain computing contract. This allows the off-chain computing contract, having obtained and maintained the de-identified information corresponding to all the constituent elements of the execution result corresponding to the collaborative computing task, to further determine the next sub-task to be executed based on the execution dependency order of each sub-task in the off-chain computing task, and generate a task event for the next sub-task. In the embodiments of this specification, the entity that initiates the first result return transaction to the off-chain computing contract is specifically the first scheduling engine deployed on the first node device.
[0056] The off-chain computing engine mentioned in the embodiments of this specification refers to a service or subsystem that provides off-chain computing capabilities to node devices. An off-chain 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. For example, in the embodiments of this specification, the first off-chain computing engine can support the execution of the collaborative computing task.
[0057] In the embodiments described in this specification, by monitoring task events generated by the off-chain computing contract for collaborative computing tasks, each node device with participating nodes can execute the collaborative computing task to obtain a portion of the components of the execution result corresponding to the collaborative computing task. These components are then anonymized and stored on the blockchain as de-identified information in the off-chain computing contract, ensuring that the off-chain computing contract does not directly maintain the execution result in plaintext. Simultaneously, for data users who need the complete execution result, they must obtain the components of the execution result from each node device participating in the collaborative computing task before integrating them into the final result. This ensures that the participants in the collaborative computing task can clearly understand the authorized recipients of the execution result and flexibly control the scope of authorization, thus protecting the data usage rights of the relevant participants in the collaborative computing task.
[0058] Optional, also includes:
[0059] In response to a data request for a first constituent element received from a data user, the data request being initiated by the data user after obtaining the first node device from which the first constituent element node originates by querying the off-chain computing contract;
[0060] If it is determined that the data user has the right to use the first constituent element, the authorization information corresponding to the first constituent element is provided to the data user, and the authorization information is used to enable the data user to obtain the first constituent element.
[0061] In the embodiments of this specification, after the first node device maintains the first de-identified information in the off-chain computing contract through the first result return transaction, the data user can query the first de-identified information corresponding to the collaborative computing task and the first node device from which it originates through the off-chain computing contract. Therefore, the data user can initiate a data request for the collaborative computing task to the first node device. After receiving the data request, the first node device determines, through the indication information it carries (the identification information of the collaborative computing task and / or the first de-identified information), that the data user wishes to obtain the relevant execution result of the collaborative computing task. Since the first node device only maintains the first constituent element of the execution result, if it is determined that the data user has the right to use the first constituent element (for example, verifying the digital signature corresponding to the data request to determine the identity of the data user, and then determining that the data user has the right to use the first constituent element if the identity is in the whitelist corresponding to the collaborative computing task), it provides the authorization information corresponding to the first constituent element to the data user. Similarly, the data provider can send data requests for the collaborative computing task to all participating node devices that have deployed participating nodes, thereby obtaining all the constituent elements of the execution result corresponding to the collaborative computing task, and then integrating all the constituent elements into the execution result.
[0062] In the embodiments of this specification, the first de-identified information is the first resource address of the first constituent element on the first node device, the data request includes the first resource address as index information of the first constituent element, and the authorization information is the first constituent element; or, the first de-identified information is the first hash value obtained by hashing the first constituent element, the data request includes the first hash value as index information of the first constituent element, and the authorization information is the first constituent element; or, the first de-identified information is the first encrypted element obtained by encrypting the first constituent element, and the authorization information is the decryption key used to decrypt the first encrypted element into the first constituent element. When the first de-identified information is a first resource address, after obtaining the first de-identified information as the first resource address, the data user will include the first resource address in the data request sent to the first node device, instructing the first node device to obtain the first component based on the first resource address and provide it to the data user; when the first de-identified information is a first hash value, after obtaining the first de-identified information, the data user will include the first hash value in the data request sent to the first node device, instructing the first node device to obtain the first component based on the first hash value and provide it to the data user; when the first de-identified information is a first encrypted element, after obtaining the first de-identified information, the data user will include the task number of the collaborative computing task in the data request sent to the first node device, instructing the first node device to obtain the first component of the execution result corresponding to the collaborative computing task based on the task number and provide it to the data user.
[0063] The methods by which a data user obtains the source of the first constituent element from the first node device involved in the embodiments of this specification may include: the data user directly listening to the result return event generated by the off-chain computing contract in response to the first result return transaction, which records the first de-identified information and the first node device from which it originates; or, the data user sending a query transaction for the first de-identified information to the off-chain computing contract, and then listening to the query event generated by the off-chain computing contract in response to the query transaction, which records the first de-identified information and the first node device from which it originates. The data user involved in the embodiments of this specification may be any node device deployed with any blockchain node in the blockchain network, a blockchain platform, a client of the blockchain platform, an external server, or other third parties.
[0064] Optionally, it further includes: if the description information of the first blockchain node includes the identification information of the first blockchain node, then determining that the first blockchain node belongs to the participating node. As mentioned above, the task event generated by the off-chain computing contract for the collaborative computing task, which is monitored by the first node device, records the description information of at least two participating nodes of the collaborative computing task. The first node device can determine whether the first blockchain node belongs to the participating node by comparing this description information, which serves as the identity information of the blockchain node, with the identification information of the first blockchain node, which serves as the identity information of the first blockchain node.
[0065] Figure 2 This is a flowchart illustrating another data processing method provided in an exemplary embodiment. The method is applied to a first blockchain node, to which the blockchain network has deployed off-chain computing contracts; the method includes:
[0066] S202: Invoke the off-chain computing contract to execute the transaction corresponding to the off-chain computing task, so as to generate a task event for the collaborative computing task. The task event records the description information of at least two participating nodes corresponding to the collaborative computing task.
[0067] As mentioned above, 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.
[0068] S204: Receive a first result return transaction containing first de-identified information initiated by a first participating node device with the participating node deployed thereon; call the off-chain computing contract to execute the first result return transaction; maintain the first de-identified information in the off-chain computing contract; wherein the first de-identified information is generated by the first participating node device based on the first constituent element of the execution result corresponding to the collaborative computing task; the first constituent element is obtained by the first participating node device, upon listening to the task event and determining that it has the participating node deployed thereon, by calling the first off-chain computing engine deployed by the first participating node device to execute the collaborative computing task; the first constituent element only contains part of the execution result information.
[0069] S206: Receive a result usage transaction initiated by the data user for the execution result, call the off-chain computing contract to execute the result usage transaction to generate a result usage event that records the identity information of the data user and the description information of the execution result. The result usage event is used to enable the first participating node device to provide the first constituent element to the data user when it hears the result usage event and determines that the data user has the right to use the first constituent element of the execution result.
[0070] In S206, the result usage event is further used to instruct other participating node devices, other than the first participating node device, that, upon listening to the result usage event and determining that the data user has the relevant usage rights of the execution result, to provide the data user with the constituent elements of the execution result maintained by the other participating node devices respectively.
[0071] In the embodiments described in this specification, the data user can obtain some or all of the constituent elements of the execution result by initiating a result use transaction for the execution result to the off-chain computing contract.
[0072] Optionally, the first participating node device provides the first constituent element to the data user, including: the first participating node device sending the first constituent element to the data user based on the data user's communication address. In the embodiments of this specification, the first participating node device pre-stores the data user's communication address, or the first participating node device reads the data user's communication address contained in the result usage event. Therefore, when it needs to provide the first constituent element to the data user, it can directly establish a communication channel with the data user through the communication address to send the first constituent element to the data user. In addition, if the first participating node device pre-stores the data user's public key or the result usage event carries the public key, the first node device can also encrypt the first constituent element using the public key before sending it to the data user, so that the data user can decrypt it using its own private key to obtain the first constituent element, thereby ensuring data security during the communication process.
[0073] Optionally, it also includes: receiving a result provision transaction containing a first encrypted component initiated by a first participating node device; invoking the off-chain computing contract to execute the result provision transaction to generate a result provision event recording the first encrypted component, for the data user to listen to and obtain; wherein the first encrypted component is obtained by the first participating node device encrypting the first component using the public key of the data user when it needs to provide the first component to the data user. In the embodiments of this specification, the first participating node device can also provide the first component to the result user by initiating a result provision transaction containing the first encrypted component to the off-chain computing contract. Since the result provision event recording the first encrypted component is theoretically in a public state and can be listened to by any third party, it is necessary to ensure that the first encrypted component is obtained by encrypting the first component using the public key of the result user. This ensures that after the data user listens to the result provision event and obtains the first encrypted component, it can decrypt it using the private key of the data user to obtain the first component, thus ensuring that the first component is not disclosed to other third parties during the process of the first participating node device providing the first component to the result user. As mentioned above, the first participating node device pre-stores the public key of the data user, or the result usage event carries the public key.
[0074] Figure 3 This is a schematic diagram illustrating a data processing method provided in an exemplary embodiment. For example... Figure 3As shown, the first node device deploys the first blockchain node, the first scheduling engine, and the first off-chain computing engine in the blockchain network; the second node device deploys the second blockchain node, the second scheduling engine, and the second off-chain computing engine in the blockchain network; and the third node device deploys the third blockchain node, the third scheduling engine, and the third off-chain computing engine in the blockchain network. After the off-chain computing contract generates a task event for the collaborative computing task, it will be monitored by the third scheduling engine, the second scheduling engine, and the first scheduling engine through the third blockchain node, the second blockchain node, and the first blockchain node, respectively. Assuming that the description information of at least two participating nodes corresponding to the collaborative computing task recorded in the task event includes the identification information of the first blockchain node, the second blockchain node, and the third blockchain node, then the first scheduling engine, the second scheduling engine, and the third scheduling engine can respectively determine that the first blockchain node deployed on the first node device, the second blockchain node deployed on the second node device, and the third blockchain node deployed on the third node device belong to the participating nodes. Therefore, the first scheduling engine calls the first off-chain computing engine to execute the collaborative computing task, the second scheduling engine calls the second off-chain computing engine to execute the collaborative computing task, and the third calling engine calls the third off-chain computing engine to execute the collaborative computing task. During the execution of the collaborative computing task, the first, second, and third off-chain computing engines perform necessary data interactions, thereby ultimately helping the first, second, and third off-chain computing engines to generate and obtain the various components of the execution result corresponding to the collaborative computing task. Among them, the first off-chain computing engine obtains the first component, the second off-chain computing engine obtains the second component, and the third off-chain computing engine obtains the third component. Furthermore, the first, second, and third components can be integrated to recover the execution result corresponding to the collaborative computing task. After desensitizing the first constituent element to generate the first desensitized information, the first scheduling engine initiates a first result return transaction containing the first desensitized information to the off-chain computing task contract through the first blockchain node. After desensitizing the second constituent element to generate the second desensitized information, the second scheduling engine initiates a second result return transaction containing the second desensitized information to the off-chain computing task contract through the second blockchain node. After desensitizing the third constituent element to generate the third desensitized information, the third scheduling engine initiates a third result return transaction containing the third desensitized information to the off-chain computing task contract through the third blockchain node. This ensures that the off-chain computing contract maintains the first, second, and third desensitized information in response to these three result return transactions. Since the three desensitized information correspond to the three constituent elements, and the three constituent elements correspond to the execution results, the on-chain storage of the three desensitized information is equivalent to completing the on-chain storage process of the execution results corresponding to the collaborative computing tasks by each node device.When a data user needs to obtain the execution result corresponding to the collaborative computing task, it needs to apply to the first node device, the second node device, and the third node device respectively to obtain the execution result corresponding to the collaborative computing task. After determining that the data user has the relevant permissions, the first node device will provide the first component to the data user. After determining that the data user has the relevant permissions, the second node device will provide the second component to the data user. After determining that the data user has the relevant permissions, the third node device will provide the third component to the data user. The data user can then integrate the first, second, and third components to finally obtain the execution result corresponding to the collaborative computing task.
[0075] 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.
[0076] 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 4 The device shown implements the technical solution of this specification; the device is applied to a first node device with a first blockchain node deployed, and the blockchain network to which the first blockchain node belongs deploys an off-chain computing contract; the device includes:
[0077] The event listening unit 501 is used to listen to the task events generated by the off-chain computing contract for the collaborative computing task. The task events record the description information of at least two participating nodes corresponding to the collaborative computing task.
[0078] The task execution unit 502 is used to, when it is determined that the first blockchain node belongs to the participating party node, call the first off-chain computing engine deployed on the first node device to execute the collaborative computing task to obtain the first constituent element of the execution result corresponding to the collaborative computing task, and generate the first de-identified information corresponding to the first constituent element. The first constituent element only contains part of the information of the execution result.
[0079] Result return unit 503 is used to initiate a first result return transaction containing first de-identified information to the off-chain computing task contract through the first blockchain node.
[0080] Optionally, the off-chain computing contract maintains the task completion status corresponding to the off-chain computing task, and the task completion status is used to describe the completion status of each subtask included in the off-chain computing task; when the collaborative computing task belongs to a subtask of the off-chain computing task, the event listening unit 501 is specifically used for:
[0081] Listen to the 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.
[0082] 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.
[0083] Optionally, the first off-chain computing engine is used to: acquire first data sent by other off-chain computing engines during the execution of the collaborative computing task, for use during the execution of the collaborative computing task; and / or,
[0084] The second data generated during the execution of the collaborative computing task is sent to the other computing engines so that the other computing engines can use the second data during the execution of the collaborative computing task;
[0085] The other computing engines include: off-chain computing engines other than the first off-chain computing engine deployed on the node device on which any of the at least two participating nodes are deployed.
[0086] Optionally, the off-chain computing contract is used to: in response to a result return transaction initiated by each node device with the participating party nodes deployed, maintain the de-identified information corresponding to each component of the execution result, and the component is used to integrate the execution result.
[0087] Optional, also includes:
[0088] The request receiving unit 504 is configured to respond to a data request for a first constituent element received from a data user, the data request being initiated by the data user after obtaining the first node device from which the first constituent element node originates by querying the off-chain computing contract;
[0089] The element authorization unit 505 is used to provide authorization information corresponding to the first constituent element to the data user when it is determined that the data user has the right to use the first constituent element. The authorization information is used to enable the data user to obtain the first constituent element.
[0090] Optional,
[0091] The first de-identified information is the first resource address of the first constituent element on the first node device; the data request includes the first resource address as index information of the first constituent element; and the authorization information is the first constituent element; or...
[0092] The first de-identified information is a first hash value obtained by performing a hash operation on the first constituent element; the data request includes the first hash value as index information of the first constituent element; and the authorization information is the first constituent element; or...
[0093] The first desensitized information is the first encrypted element obtained by encrypting the first constituent element, and the authorization information is the decryption key used to decrypt the first encrypted element into the first constituent element.
[0094] Optionally, the first constituent element includes: plaintext splitting information obtained by splitting the execution result, ciphertext splitting information obtained by splitting the encrypted result obtained by encrypting the execution result, or encoded splitting information obtained by splitting the encoded state result obtained by encoding the execution result.
[0095] Optional, also includes:
[0096] The participant node determination unit 506 is used to determine that the first blockchain node belongs to the participant node when the description information of the at least two participant nodes includes the identification information of the first blockchain node.
[0097] 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 first blockchain node, and the blockchain network to which the first blockchain node belongs has an off-chain computing contract deployed; the device includes:
[0098] The event generation unit 601 is used to call the off-chain computing contract to execute the transaction corresponding to the off-chain computing task, so as to generate a task event for the collaborative computing task. The task event records the description information of at least two participating nodes corresponding to the collaborative computing task.
[0099] The result maintenance unit 602 is used to receive a first result return transaction containing first de-identified information initiated by a first participant node device with the participant node deployed thereon, call the off-chain computing contract to execute the first result return transaction, and maintain the first de-identified information in the off-chain computing contract. The first de-identified information is generated by the first participant node device based on the first constituent element of the execution result corresponding to the collaborative computing task. The first constituent element is obtained by the first participant node device calling the first off-chain computing engine deployed by the first participant node device to execute the collaborative computing task when it hears the task event and determines that it has the participant node deployed thereon. The first constituent element only contains part of the execution result information.
[0100] The result usage unit 603 is used to receive a result usage transaction initiated by the data user for the execution result, and to call the off-chain computing contract to execute the result usage transaction to generate a result usage event that records the identity information of the data user and the description information of the execution result. The result usage event is used to enable the first participating node device to provide the first constituent element to the data user when it hears the result usage event and determines that the data user has the right to use the first constituent element of the execution result.
[0101] Optionally, the first participating node device provides the data user with a first constituent element, including:
[0102] The first participating node device sends the first constituent element to the data user based on the data user's communication address.
[0103] Optional, also includes:
[0104] The result providing unit 604 is used to receive a result providing transaction containing a first encrypted component initiated by a first participating node device, and to call the off-chain computing contract to execute the result providing transaction to generate a result providing event that records the first encrypted component, so that the data user can listen to and obtain it. The first encrypted component is obtained by the first participating node device encrypting the first component using the public key of the data user when it needs to provide the first component to the data user.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] 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.
[0110] 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.
[0111] 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.
[0112] 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.
[0113] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0114] 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.
[0115] 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.
[0116] 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.
[0117] 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.
[0118] 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.
[0119] 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 with a first blockchain node deployed thereon, wherein the blockchain network to which the first blockchain node belongs has an off-chain computing contract deployed; the method includes: Listen to the task events generated by the off-chain computing contract for the collaborative computing task. The task events record the description information of at least two participating nodes corresponding to the collaborative computing task. If it is determined that the first blockchain node belongs to the participating node, the first off-chain computing engine deployed on the first node device is invoked to execute the collaborative computing task to obtain the first constituent element of the execution result corresponding to the collaborative computing task, and the first de-identified information corresponding to the first constituent element is generated. The first constituent element only contains part of the information of the execution result. A first result return transaction containing first de-identified information is initiated by the first blockchain node to the off-chain computing contract, wherein the off-chain computing contract is used to: maintain de-identified information corresponding to each component of the execution result in response to the result return transaction initiated by each node device on which the participating nodes are deployed.
2. 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 being used to describe the completion status of each sub-task included in the off-chain computing task; when the collaborative computing task belongs to a sub-task of the off-chain computing task, the step of listening to the task events generated by the off-chain computing contract for the collaborative computing task includes: Listen to the 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.
3. The method according to claim 2, 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.
4. The method according to claim 1, wherein the first off-chain computing engine is configured to: acquire first data sent by other off-chain computing engines during the execution of the collaborative computing task, for use during the execution of the collaborative computing task; and / or, The second data generated during the execution of the collaborative computing task is sent to the other off-chain computing engines so that the other off-chain computing engines can use the second data during the execution of the collaborative computing task; in, The other off-chain computing engines include: off-chain computing engines other than the first off-chain computing engine deployed on the node device on which any of the at least two participating nodes are deployed.
5. The method according to claim 1, further comprising: In response to a data request for a first constituent element received from a data user, the data request being initiated by the data user after obtaining the first node device from which the first constituent element node originates by querying the off-chain computing contract; If it is determined that the data user has the right to use the first constituent element, the authorization information corresponding to the first constituent element is provided to the data user, and the authorization information is used to enable the data user to obtain the first constituent element.
6. The method according to claim 5, The first de-identified information is the first resource address of the first constituent element on the first node device; the data request includes the first resource address as index information of the first constituent element; and the authorization information is the first constituent element; or... The first de-identified information is a first hash value obtained by performing a hash operation on the first constituent element; the data request includes the first hash value as index information of the first constituent element; and the authorization information is the first constituent element; or... The first desensitized information is the first encrypted element obtained by encrypting the first constituent element, and the authorization information is the decryption key used to decrypt the first encrypted element into the first constituent element.
7. The method according to claim 1, wherein the first constituent element comprises: Plaintext splitting information obtained by splitting the execution result, ciphertext splitting information obtained by splitting the encrypted result obtained by encrypting the execution result, or encoded splitting information obtained by splitting the encoded state result obtained by encoding the execution result.
8. The method according to claim 1, further comprising: If the description information of the first blockchain node is included in the description information of the at least two participating nodes, the first blockchain node is determined to belong to the participating node.
9. A data processing method applied to a first blockchain node, wherein the blockchain network to which the first blockchain node belongs has an off-chain computing contract deployed; the method includes: The off-chain computing contract is invoked to execute the transaction corresponding to the off-chain computing task, so as to generate a task event for the collaborative computing task. The task event records the description information of at least two participating nodes corresponding to the collaborative computing task. The system receives a first result return transaction containing first de-identified information initiated by a first participant node device that has deployed the participant node. It then calls the off-chain computing contract to execute the first result return transaction and maintains the first de-identified information in the off-chain computing contract. The first de-identified information is generated by the first participant node device based on the first constituent element of the execution result corresponding to the collaborative computing task. The first constituent element is obtained by the first participant node device, upon listening to the task event and determining that it has deployed the participant node, by calling the first off-chain computing engine deployed by the first participant node device to execute the collaborative computing task. The first constituent element only contains a portion of the execution result information. The system receives a result usage transaction initiated by the data user for the execution result, and calls the off-chain computing contract to execute the result usage transaction to generate a result usage event that records the identity information of the data user and the description information of the execution result. The result usage event is used to enable the first participating node device to provide the first component to the data user when it hears the result usage event and determines that the data user has the right to use the first component of the execution result.
10. The method of claim 9, wherein the first participating node device provides the data user with a first constituent element, comprising: The first participating node device sends the first constituent element to the data user based on the data user's communication address.
11. The method of claim 9, further comprising: The system receives a result provision transaction initiated by a first participating node device, which contains a first encrypted component. It then calls the off-chain computing contract to execute the result provision transaction to generate a result provision event that records the first encrypted component, which is then listened to and obtained by the data user. The first encrypted component is obtained by the first participating node device encrypting the first component using the public key of the data user when it needs to provide the first component to the data user.
12. A data processing apparatus, applied to a first node device to which a first blockchain node is deployed, wherein the blockchain network to which the first blockchain node belongs is deployed with an off-chain computing contract; the apparatus comprises: An event listening unit is used to listen to task events generated by the off-chain computing contract for collaborative computing tasks. The task events record description information of at least two participating nodes corresponding to the collaborative computing task. The task execution unit is used to, when it is determined that the first blockchain node belongs to the participating party node, call the first off-chain computing engine deployed on the first node device to execute the collaborative computing task to obtain the first constituent element of the execution result corresponding to the collaborative computing task, and generate the first de-identified information corresponding to the first constituent element. The first constituent element only contains part of the information of the execution result. The result return unit is used to initiate a first result return transaction containing first de-identified information to the off-chain computing contract through the first blockchain node; wherein the off-chain computing contract is used to: in response to the result return transaction initiated by each node device on which the participating party nodes are deployed, maintain de-identified information corresponding to each component of the execution result.
13. A data processing apparatus, applied to a first blockchain node, wherein the blockchain network to which the first blockchain node belongs is deployed with an off-chain computing contract; the apparatus comprises: An event generation unit is used to call the off-chain computing contract to execute the transaction corresponding to the off-chain computing task, so as to generate a task event for the collaborative computing task. The task event records the description information of at least two participating nodes corresponding to the collaborative computing task. The result maintenance unit is used to receive a first result return transaction containing first de-identified information initiated by a first participant node device that has deployed the participant node, call the off-chain computing contract to execute the first result return transaction, and maintain the first de-identified information in the off-chain computing contract. The first de-identified information is generated by the first participant node device based on the first constituent element of the execution result corresponding to the collaborative computing task. The first constituent element is obtained by the first participant node device calling the first off-chain computing engine deployed by the first participant node device to execute the collaborative computing task when it hears the task event and determines that it has deployed the participant node. The first constituent element only contains part of the execution result information. The result usage unit is used to receive a result usage transaction initiated by the data user for the execution result, and to call the off-chain computing contract to execute the result usage transaction to generate a result usage event that records the identity information of the data user and the description information of the execution result. The result usage event is used to enable the first participating node device to provide the first component to the data user when it hears the result usage event and determines that the data user has the right to use the first component of the execution result.
14. 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-11 by executing the executable instructions.
15. 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-11.
Citation Information
Patent Citations
Contract deployment method and device
CN112329041A
Business execution method based on out-of-chain computing service
CN113259465A