Blockchain-based data management method and blockchain node

By generating verification events and deploying smart contracts through voting mechanisms in the blockchain system, the problem of data processing methods being susceptible to tampering is solved, ensuring the security and fairness of data processing and guaranteeing the accuracy and consistency of data processing results.

CN117131010BActive Publication Date: 2026-06-05ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
Filing Date
2023-08-25
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Data processing methods in blockchain systems are vulnerable to tampering by intruders, affecting the accuracy and fairness of data processing. Multiple data users using different methods to process the same data can lead to inconsistent results.

Method used

By acquiring and executing smart contract functions through blockchain nodes, generating verification events, obtaining voting information, and deploying a second smart contract under preset conditions, the contract code is ensured to be tamper-proof, thus achieving the security and fairness of the data processing method.

Benefits of technology

This ensures the security and fairness of the data processing process, guarantees that the data processing methods meet the expectations of multiple participants, and avoids the tampering and inconsistency of the data processing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117131010B_ABST
    Figure CN117131010B_ABST
Patent Text Reader

Abstract

A blockchain-based data management method and a blockchain node. A first smart contract is deployed in a blockchain system, and a method executed by a blockchain node in the blockchain system includes: obtaining a first transaction for calling a first function in the first smart contract, wherein the first transaction includes contract code corresponding to a second smart contract, and the contract code defines a data processing method; executing the first function according to the first transaction to generate a first event for triggering at least two participants to verify the data processing method; obtaining a second transaction for calling a second function in the first smart contract, wherein the second transaction includes voting information, and the second transaction is initiated by an i th participant if the i th participant verifies the data processing method; executing the second function according to the second transaction to record the voting information in a contract state of the first smart contract, and deploying the second smart contract in the blockchain system according to the contract code if the recorded voting information meets a preset condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification belong to the field of blockchain technology, and in particular relate to a data management method and a blockchain node based on blockchain. 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. Summary of the Invention

[0003] The purpose of this invention is to provide a data management method and a blockchain node based on blockchain.

[0004] Firstly, a blockchain-based data management method is provided, executed by blockchain nodes in a blockchain system. The blockchain system deploys a first smart contract. The method includes: acquiring a first transaction for calling a first function in the first smart contract, including contract code corresponding to a second smart contract to be deployed, wherein the contract code defines a data processing method; executing the first function according to the first transaction to generate a first event that triggers at least two participants to verify the data processing method; acquiring a second transaction for calling a second function in the first smart contract, including voting information, initiated by the i-th participant among the at least two participants upon successful verification of the data processing method; and executing the second function according to the second transaction to record the voting information in the contract state of the first smart contract, and deploying the second smart contract in the blockchain system according to the contract code if the recorded voting information meets preset conditions.

[0005] Secondly, a blockchain node in a blockchain system is provided, wherein a first smart contract is deployed in the blockchain system, and the blockchain node includes: a transaction acquisition unit configured to acquire a first transaction for calling a first function in the first smart contract, including contract code corresponding to a second smart contract to be deployed, wherein the contract code defines a data processing method; a transaction execution unit configured to execute the first function according to the first transaction, thereby generating a first event to trigger at least two participants to verify the data processing method; the transaction acquisition unit is further configured to acquire a second transaction for calling a second function in the first smart contract, including voting information, and initiated by the i-th participant among the at least two participants when its verification of the data processing method is successful; the transaction execution unit is further configured to execute the second function according to the second transaction, thereby recording the voting information in the contract state of the first smart contract, and deploying the second smart contract in the blockchain system according to the contract code when the recorded voting information meets preset conditions.

[0006] Thirdly, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described in the first aspect.

[0007] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, wherein when the computer program is executed in a computing device, the computing device performs the method described in the first aspect.

[0008] In the technical solution provided in the embodiments of this specification, the contract code corresponding to the second smart contract defines a data processing method. The second smart contract can only be successfully deployed to the blockchain system if the data processing method meets the expectations of at least two participants. After the second smart contract is successfully deployed, the characteristics of the blockchain system can ensure that the contract code corresponding to the second smart contract will not be tampered with by intruders, thereby ensuring that the data processing method defined in the contract code will not be tampered with by intruders. Each participant who needs it can call the second smart contract to accurately process the corresponding raw data using the data processing method that meets their expectations, thereby ensuring the security and fairness of the data processing process. Attached Figure Description

[0009] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a schematic diagram of a blockchain system provided in the embodiments of this specification;

[0011] Figure 2 This is a flowchart illustrating a blockchain-based data management method provided in the embodiments of this specification;

[0012] Figure 3 This is an exemplary system architecture diagram provided in the embodiments of this specification;

[0013] Figure 4 This is a schematic diagram of the structure of a blockchain node in a blockchain system provided in the embodiments of this specification. Detailed Implementation

[0014] 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.

[0015] A blockchain system is a distributed network built from multiple nodes. Any two nodes within it communicate at the application layer via a peer-to-peer (P2P) network. See also... Figure 1 As shown, a blockchain system can, for example, contain nodes 1 to 4. Any two nodes from 1 to 4 can communicate at the application layer via a P2P network. The blockchain system utilizes a decentralized (or multi-centralized) distributed ledger constructed using a chain-like block structure, stored on each (or most) node in the distributed blockchain network. Therefore, the blockchain system needs to address the consistency and correctness of the ledger data across multiple decentralized (or multi-centralized) nodes. Each node in the blockchain system runs a blockchain program. Under certain fault-tolerance requirements, a consensus mechanism ensures that all loyal nodes have the same transactions, thereby guaranteeing consistent execution results for the same transactions. Multiple transactions arranged in sequence are packaged into a block, and the world state is updated based on the execution results of these transactions.

[0016] A transaction in a blockchain system refers to a task unit executed and recorded within the blockchain system. A transaction typically includes a From field, a To field, and a Data field. Specifically, in the case of a transfer transaction, the From field represents the account address initiating the transaction (i.e., initiating a transfer task to another account), the To field represents the account address receiving the transaction (i.e., receiving the transfer), and the Data field includes the transfer amount. In the case of a transaction calling a smart contract in the blockchain system, the From field represents the account address initiating the transaction, the To field represents the account address of the contract called by the transaction, and the Data field includes the function name in the called contract and the parameters passed to that function, which is used to retrieve and execute the function's code from the blockchain system during transaction execution.

[0017] Transactions can originate from computing nodes connected to the blockchain system, or they can be initiated by blockchain nodes within the blockchain system.

[0018] Smart contracts in a blockchain system are contracts that can be triggered and executed by transactions. Smart contracts can be defined in the form of code. For example, invoking a smart contract in a consortium blockchain involves initiating a transaction pointing to the smart contract's address, causing each node in the consortium blockchain network to run the smart contract code in a distributed manner. It's important to note that in addition to users creating smart contracts, the blockchain system can also set smart contracts in the genesis block. These contracts are generally called genesis contracts. Genesis contracts typically define the blockchain system's data structures, parameters, attributes, and methods. Furthermore, accounts with system administrator privileges can create or modify system-level contracts (referred to as system contracts).

[0019] In smart contract deployment scenarios, a transaction containing smart contract creation information (i.e., a transaction used to create a smart contract) can be sent to the blockchain system. The `from` field of this transaction is the account address of the transaction initiator, the `data` field includes the code of the smart contract to be created (such as bytecode or machine code), and the `to` field is empty to indicate that the transaction is used to deploy the contract. After nodes reach a consensus through the consensus mechanism, the contract address is determined, a contract account corresponding to the smart contract's contract address is added to the state database, state storage corresponding to the contract account is allocated, and the contract code is stored in the smart contract's state storage.

[0020] In scenarios involving contract invocation, a transaction for invoking a smart contract can be sent to the blockchain system. The `from` field of this transaction is the account address of the transaction initiator, the `to` field is the contract address of the smart contract being invoked, and the `data` field includes the method and parameters for invoking the smart contract. After consensus is reached on this transaction within the blockchain system, each node can execute the transaction, thereby executing the smart contract and updating the corresponding state database based on the execution of the smart contract.

[0021] After executing a transaction used to invoke a smart contract, a blockchain node in a blockchain system generates a corresponding receipt to record information related to the execution of that smart contract. Blockchain nodes can retrieve information about the contract execution result by querying the transaction receipt. The contract execution result can be represented as an event in the receipt, and a messaging mechanism can be used to transmit these events, triggering blockchain nodes to perform corresponding processing based on the events in the receipt. Besides transactions used to invoke smart contracts, other transactions such as fund transfers may also generate receipts.

[0022] A single receipt can include one or more events. A single event can include multiple fields such as topic and data. Blockchain nodes can listen to the topic of an event, and when a predefined topic is detected, they can perform preset processing, or read relevant content from the data field of the corresponding event and perform preset processing based on the read content.

[0023] In some technical scenarios, data users may want to use certain data processing methods to process the raw data provided by the data provider, obtain corresponding result data, and realize predetermined transactions based on the result data. Taking credit assessment as an example, a data user (such as a bank) may need to obtain the maximum credit line (i.e., result data) that allows lending funds to a specific object (natural person or institution) based on multiple characteristic information (i.e., raw data). The data user can then lend the corresponding amount of funds to the specific object based on this maximum credit line in subsequent processes. These multiple characteristic information include, but are not limited to, one or more of the following: the specific object's identity information, financial status (e.g., bank account statements), credit history (e.g., whether there has been a credit default), and the operating status of the enterprise belonging to the specific object (e.g., shareholding ratio, appraised value, operating cash flow, profit growth rate), etc. Since different characteristic information may have different data types and different impacts on the credit line, relatively complex data processing methods may be needed to process these multiple characteristic information to obtain the maximum credit line corresponding to the specific object.

[0024] In the process of processing raw data using data processing methods: on the one hand, data processing methods may be tampered with by intruders, causing them to no longer meet the expectations of data users and data providers, thus affecting the accuracy of the resulting data obtained through the data processing method; on the other hand, multiple data users may use different data processing methods to process the same raw data, obtaining different results from the same raw data, thus posing a challenge to fairness.

[0025] This specification provides at least one blockchain-based data management method and a blockchain node in its embodiments. A blockchain node in the blockchain system can obtain a first transaction for calling a first function in a first smart contract, including contract code corresponding to a second smart contract to be deployed, whereby the contract code defines a data processing method. Then, the blockchain node can execute the first function according to the first transaction to generate a first event, which triggers at least two participants to verify the data processing method. Correspondingly, the blockchain node can also obtain a second transaction for calling a second function in the first smart contract, which includes voting information. This second transaction is initiated by the i-th participant among the at least two participants when its verification of the data processing method passes. Furthermore, the blockchain node can execute a second function according to the second transaction, recording voting information in the contract state of the first smart contract, and deploying the second smart contract in the blockchain system according to the contract code when all recorded voting information meets preset conditions.

[0026] Thus, the contract code corresponding to the second smart contract to be deployed defines a data processing method. Only when this data processing method meets the expectations of at least two participants can the second smart contract be successfully deployed to the blockchain system. After the second smart contract is successfully deployed, the characteristics of the blockchain system can ensure that the contract code corresponding to the second smart contract cannot be tampered with by intruders, thereby ensuring that the data processing method defined in the contract code cannot be tampered with by intruders. Each participating party that needs it can call the second smart contract to accurately process the corresponding raw data using the data processing method that meets their expectations, thereby ensuring the security and fairness of the data processing process.

[0027] Figure 2 This is a flowchart illustrating a blockchain-based data management method provided in the embodiments of this specification. The method can be executed by any blockchain node among multiple blockchain nodes included in the blockchain system, which can be a consortium blockchain or other possible types. A first smart contract (i.e., smart contract C1) is deployed in the blockchain system.

[0028] See Figure 2As shown, the method may include, but is not limited to, some or all of the following steps S201 to S215.

[0029] Step S201: Obtain the first transaction Tx1 used to call the first function in smart contract C1. The first transaction Tx1 includes the contract code corresponding to the smart contract C2 to be deployed, and the contract code defines the data processing method.

[0030] The first transaction Tx1 may be initiated by one of the participants who may use smart contract C2 (i.e., the second smart contract), or it may be initiated by another third party permitted by at least two participants who may use smart contract C2. In one possible implementation, the first transaction Tx1 may also include user accounts registered in the blockchain system by the aforementioned at least two participants.

[0031] Taking credit assessment as an example, data processing methods can be used to process multiple characteristics of a user and output the corresponding credit assessment result for that user. These multiple characteristics may include, but are not limited to, one or more of the following: the user's identity information, financial status, credit history, and the operating status of the company belonging to the user.

[0032] Step S203: Execute the first function according to the first transaction Tx1 to generate a first event E1, wherein the first event E1 is used to trigger at least two participants to verify the data processing method.

[0033] When executing the first function according to the first transaction Tx1, the contract code corresponding to the smart contract C2 can also be stored in the contract state of the smart contract C1 so that the contract code corresponding to the smart contract C2 can be used to deploy the smart contract C2 in subsequent processes.

[0034] The first event E1 may include the contract code corresponding to smart contract C2 and / or the user accounts of at least two participants registered in the blockchain system. The first event E1 can trigger at least two participants to jointly decide whether the data processing method defined in the contract code meets their expectations by initiating a second transaction. The blockchain system can transmit the first event E1 to at least two participants based on their respective user accounts registered in the blockchain system; or at least two participants can obtain the first event E1 through a message subscription mechanism.

[0035] Step S205: Obtain the second transaction Tx2 used to call the second function in smart contract C1. i The second transaction Tx2 i This includes voting information V i The second transaction Tx2 iIt is initiated by any i-th participant among at least two participants, provided that the data processing method has been validated.

[0036] The i-th participant, triggered by the first event E1, can first obtain the contract code of smart contract C2 from the first event E1, or query the contract code corresponding to smart contract C2 from the contract state of smart contract C1, and then execute the data processing method verification based on the contract code corresponding to smart contract C2. For example, the i-th participant holds sample data and sample results used to verify the data processing method, and runs smart contract C2 locally. 22 The corresponding contract code processes the sample data using the data processing methods defined within the contract code to obtain the current result corresponding to the sample data. If the current result matches the sample result, it indicates that the data processing method defined in the contract code meets the expectations of the i-th participant, and the data processing method defined in the contract code can be verified. More specifically, taking a credit assessment scenario as an example, the i-th participant holds multiple sample feature information (i.e., sample data) and sample credit assessment results (i.e., sample results) of a sample user. By running the contract code corresponding to smart contract C2 locally, it processes the multiple sample feature information of the sample user using the data processing methods defined in the contract code to obtain the current credit assessment result of the sample user. If the current credit assessment result matches the sample credit assessment result, it indicates that the data processing method defined in the contract code meets the expectations of the i-th participant, and the data processing method defined in the contract code can be verified.

[0037] After the i-th participant confirms that the data processing method defined in the contract code corresponding to smart contract C2 has passed verification, it can initiate a second transaction Tx2 to the blockchain system. i This includes voting information V that represents the permission to deploy smart contract C2. i .

[0038] Step S207, according to the second transaction Tx2 i Execute the second function to record the voting information V in the contract state of smart contract C1. i And in each of the recorded voting information V i Under the condition that the preset conditions are met, smart contract C2 is deployed in the blockchain system according to the contract code corresponding to smart contract C2.

[0039] Preset conditions may include, for example, recorded voting information V. i The number reaches a preset threshold, or the recorded voting information V i The ratio between the quantity and the total quantity of at least two participants reaches a preset value.

[0040] According to the second transaction Tx2 i When the second function is executed, the recorded voting information V is used. i Under certain conditions, such as generating a contract deployment transaction corresponding to smart contract C2 based on the contract code corresponding to smart contract C2, a blockchain node can execute the contract deployment transaction to complete the deployment of smart contract C2, and return a message indicating successful contract deployment to smart contract C2 by calling back the second function of smart contract C1, which includes the contract address of smart contract C2.

[0041] The aforementioned process of deploying smart contract C2 is exemplary, and smart contract C2 can also be deployed in other ways. For example, in a blockchain system, the target smart contract can be pre-deployed; according to the second transaction Tx2 i When the second function is executed, the recorded voting information V is used. i Under certain predefined conditions, such as generating a contract call transaction to request the deployment of smart contract C2 based on the contract code corresponding to smart contract C2 and to invoke the target smart contract, the target smart contract determines whether smart contract C2 has been deployed. If not, it executes the target smart contract based on the contract call transaction, thus generating a contract deployment transaction corresponding to smart contract C2 based on the contract code corresponding to smart contract C. Correspondingly, the blockchain node can complete the deployment of smart contract C2 by executing the contract deployment transaction and return a message indicating successful contract deployment to smart contract C2 by calling back the second function of smart contract C1, which includes the contract address of smart contract C2.

[0042] According to the second transaction Tx2 i When executing the second function, it can also achieve the following: after the deployment of smart contract C2 is completed, a second event E2 is generated, where the second event E2 includes the contract address of the second smart contract C2. The second event E2 is used to instruct at least two participants to obtain the contract address from the second event E2. The way in which at least two participants obtain the second event E2 can be the same as or similar to the way at least two participants obtain the first event E1, which will not be elaborated here.

[0043] Step S209: Obtain the third transaction Tx3 used to call the third function in smart contract C2. j The third transaction, Tx3 j It includes a first encryption key, a first original data, and its corresponding first index information.

[0044] The aforementioned at least two participants may include at least one data provider and at least one data user.

[0045] Third transaction Tx3j It can be initiated by any j-th data provider among at least one data provider, for example, by computing node j belonging to the j-th data provider.

[0046] Taking a credit assessment scenario as an example, the first raw data may include multiple feature information used to assess the credit of the first object, and the corresponding first index information may be the identity identifier of the first object.

[0047] When the first raw data includes multiple feature information for credit assessment of the first object, the j-th data provider may initiate a third transaction Tx3 with the authorization of the first object. j .

[0048] Step S211, according to the third transaction Tx3 j The third function is executed to: process the first raw data into first result data according to the data processing method, generate the first ciphertext corresponding to the first result data according to the first encryption key, and store the first index information and the first ciphertext in the contract state of smart contract C.

[0049] Taking a credit assessment scenario as an example, the first raw data includes multiple feature information used to assess the credit of the first object, and the first result data can be used to indicate the credit assessment result of the first object.

[0050] Step S213: Obtain the fourth transaction Tx4 used to call the fourth function in smart contract C2. k The fourth transaction, Tx4 k It includes the first index information.

[0051] Fourth transaction Tx4 k It can be initiated by any kth data user among at least one data user, for example, by computing node k belonging to the kth data user.

[0052] Reference Figure 3 As shown, when the j-th data provider allows the k-th data user to use the first result data of the first object, it can provide the k-th data user with the first index information of the first object and the first decryption key corresponding to the first encryption key. Correspondingly, the k-th data user can initiate a fourth transaction tx4 based on the first index information. k .

[0053] Step S215, according to the fourth transaction Tx4 k The fourth function is executed to: query the first ciphertext stored in the contract state of smart contract C2 that is associated with the first index information, and return the first ciphertext accordingly.

[0054] Once the k-th data user obtains the first decryption key corresponding to the first encryption key, it can decrypt the first ciphertext locally using the first decryption key to obtain the first result data. In this way, subsequent processes can execute predetermined transactions based on the first result data. If the k-th data user does not obtain the first decryption key corresponding to the first encryption key, even if the k-th data user can obtain the first index information and query the first ciphertext based on the first index information, it still cannot correctly decrypt the first ciphertext to obtain the first result data, which helps ensure the security of the first result data.

[0055] The application scenarios of the aforementioned method embodiments are not limited to credit assessment scenarios, and can obviously be applied to other technical scenarios as well. For example, the aforementioned method embodiments can be applied to the scenario of item damage assessment. In this case, the first raw data includes images used to assess the damage of the target item, and the first result data can indicate the corresponding damage assessment result.

[0056] Based on the same concept as the aforementioned method embodiments, this specification also provides a blockchain node 400 in a blockchain system, wherein a first smart contract is deployed in the blockchain system 400. See also... Figure 4 As shown, the blockchain node 400 includes: a transaction acquisition unit 401, configured to acquire a first transaction for calling a first function in the first smart contract, including contract code corresponding to a second smart contract to be deployed, wherein the contract code defines a data processing method; a transaction execution unit 403, configured to execute the first function according to the first transaction, thereby generating a first event, wherein the first event is used to trigger at least two participants to verify the data processing method; the transaction acquisition unit 401 is further configured to acquire a second transaction for calling a second function in the first smart contract, including voting information, and initiated by the i-th participant among the at least two participants when its verification of the data processing method is successful; the transaction execution unit 403 is further configured to execute the second function according to the second transaction, thereby recording the voting information in the contract state of the first smart contract, and deploying the second smart contract in the blockchain system according to the contract code when the recorded voting information meets preset conditions.

[0057] In one possible implementation, when the transaction execution unit 403 executes the second function according to the second transaction, it further implements: generating a second event, including the contract address of the second smart contract, for instructing the at least two participants to obtain the contract address from the second event.

[0058] In one possible implementation, the transaction acquisition unit 401 is further configured to acquire a third transaction for calling a third function in the second smart contract, including a first encryption key, first raw data, and its corresponding first index information; the transaction execution unit 403 is further configured to execute the third function according to the third transaction, thereby: processing the first raw data into first result data according to the data processing method, generating a first ciphertext corresponding to the first result data according to the first encryption key, and storing the first index information and the first ciphertext in association in the contract state of the second smart contract.

[0059] In one possible implementation, the transaction acquisition unit 401 is further configured to acquire a fourth transaction for calling a fourth function in the second smart contract, including the first index information; the transaction execution unit 403 is further configured to execute the fourth function according to the fourth transaction, thereby: querying the first ciphertext stored in association with the first index information in the contract state of the smart contract, and returning the first ciphertext accordingly.

[0060] In one possible implementation, the at least two participants include at least one data provider and at least one data user. The third transaction is initiated by any j-th data provider among the at least one data provider, and the fourth transaction is initiated by any k-th data user among the at least one data user. The first ciphertext is used to be decrypted into the first result data by the k-th data user according to the first decryption key, provided that the k-th data user holds the first decryption key corresponding to the first encryption key.

[0061] In one possible implementation, the blockchain system is a consortium blockchain, and the at least two participants correspond to different blockchain nodes in the blockchain system.

[0062] In one possible implementation, the first raw data includes multiple feature information for credit assessment of the first object, the first index information is the identity identifier of the first object, and the first result data is used to indicate the credit assessment result of the first object.

[0063] In one possible implementation, the i-th participant holds sample data and its corresponding sample result; the verification of the data processing method by the i-th participant includes processing the sample data using the data processing method defined in the contract code to obtain a current result corresponding to the sample data, and determining that the data processing method passes verification if the current result matches the sample result.

[0064] This specification also provides a computer-readable storage medium storing a computer program / instruction, which, when executed in a computing device, causes the computing device to execute a blockchain-based data management method provided in any of the foregoing embodiments.

[0065] This specification also provides a computing device in its embodiments, including a memory and a processor. The memory stores executable code / instructions, and when the processor executes the executable code / instructions, it implements a blockchain-based data management method provided in any of the foregoing embodiments.

[0066] 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.

[0067] 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.

[0068] 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 application 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0075] 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.

[0076] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 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.

[0077] 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.

[0078] 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 distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0079] 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.

[0080] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit the scope of these embodiments. Various modifications and variations can be made to these embodiments 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 blockchain-based data management method, wherein the method is executed by blockchain nodes in a blockchain system, the blockchain system having a first smart contract deployed thereon, the method comprising: Obtain a first transaction for calling a first function in the first smart contract, including the contract code corresponding to the second smart contract to be deployed, wherein the contract code defines a data processing method; The first function is executed according to the first transaction to achieve: generating a first event, wherein the first event is used to trigger at least two participants to verify the data processing method; Obtain a second transaction for calling the second function in the first smart contract, including voting information, and initiate it by the i-th participant among the at least two participants if its verification of the data processing method passes; The second function is executed according to the second transaction to achieve the following: the voting information is recorded in the contract state of the first smart contract, and the second smart contract is deployed in the blockchain system according to the contract code when the recorded voting information meets the preset conditions.

2. The method according to claim 1, wherein when executing the second function according to the second transaction, it further comprises: generating a second event, including the contract address of the second smart contract, for instructing the at least two participants to obtain the contract address from the second event.

3. The method according to claim 1, further comprising: Obtain a third transaction for calling the third function in the second smart contract, including a first encryption key, first raw data, and its corresponding first index information; The third function is executed according to the third transaction to achieve the following: the first original data is processed into first result data according to the data processing method, the first ciphertext corresponding to the first result data is generated according to the first encryption key, and the first index information and the first ciphertext are associated and stored in the contract state of the second smart contract.

4. The method according to claim 3, further comprising: Obtain the fourth transaction used to call the fourth function in the second smart contract, including the first index information; The fourth function is executed according to the fourth transaction to: query the first ciphertext stored in association with the first index information in the contract state of the smart contract, and return the first ciphertext accordingly.

5. The method according to claim 4, wherein the at least two participants include at least one data provider and at least one data user, the third transaction is initiated by any j-th data provider among the at least one data provider, the fourth transaction is initiated by any k-th data user among the at least one data user, and the first ciphertext is used to be decrypted into the first result data by the k-th data user according to the first decryption key when the k-th data user holds the first decryption key corresponding to the first encryption key.

6. The method according to claim 5, wherein the blockchain system is a consortium blockchain, and the at least two participants correspond to different blockchain nodes in the blockchain system.

7. The method according to claim 5, wherein the first raw data includes multiple feature information for credit assessment of the first object, the first index information is the identity identifier of the first object, and the first result data is used to indicate the credit assessment result of the first object.

8. The method according to any one of claims 1-7, wherein the i-th participant holds sample data and its corresponding sample result; the verification of the data processing method by the i-th participant includes processing the sample data using the data processing method defined in the contract code to obtain a current result corresponding to the sample data, and determining that the data processing method passes verification if the current result matches the sample result.

9. A blockchain node in a blockchain system, wherein a first smart contract is deployed in the blockchain system, and the blockchain node comprises: The transaction acquisition unit is configured to acquire a first transaction for calling a first function in the first smart contract, which includes the contract code corresponding to the second smart contract to be deployed, wherein the contract code defines a data processing method; The transaction execution unit is configured to execute the first function according to the first transaction to achieve: generating a first event, wherein the first event is used to trigger at least two participants to verify the data processing method; The transaction acquisition unit is further configured to acquire a second transaction for calling the second function in the first smart contract, including voting information, and initiated by the i-th participant among the at least two participants when its verification of the data processing method is successful; The transaction execution unit is further configured to execute the second function according to the second transaction, thereby: recording the voting information in the contract state of the first smart contract, and deploying the second smart contract in the blockchain system according to the contract code when each of the recorded voting information meets the preset conditions.

10. The blockchain node according to claim 9, wherein when the transaction execution unit executes the second function according to the second transaction, it further implements: generating a second event, including the contract address of the second smart contract, for instructing the at least two participants to obtain the contract address from the second event.

11. The blockchain node according to claim 9, wherein: The transaction acquisition unit is further configured to acquire a third transaction for calling a third function in the second smart contract, including a first encryption key, first original data and its corresponding first index information; The transaction execution unit is further configured to execute the third function according to the third transaction, thereby: processing the first original data into first result data according to the data processing method, generating the first ciphertext corresponding to the first result data according to the first encryption key, and storing the first index information and the first ciphertext in association in the contract state of the second smart contract.

12. The blockchain node according to claim 11, wherein: The transaction acquisition unit is further configured to acquire a fourth transaction for calling the fourth function in the second smart contract, including the first index information; The transaction execution unit is further configured to execute the fourth function according to the fourth transaction, thereby: querying the first ciphertext stored in association with the first index information in the contract state of the smart contract, and returning the first ciphertext accordingly.

13. The blockchain node according to claim 12, wherein the at least two participants include at least one data provider and at least one data user, the third transaction is initiated by any j-th data provider among the at least one data provider, the fourth transaction is initiated by any k-th data user among the at least one data user, and the first ciphertext is used to be decrypted into the first result data by the k-th data user according to the first decryption key when the k-th data user holds the first decryption key corresponding to the first encryption key.

14. The blockchain node according to claim 13, wherein the blockchain system is a consortium blockchain, and the at least two participants correspond to different blockchain nodes in the blockchain system.

15. The blockchain node according to claim 13, wherein the first original data includes multiple feature information for credit assessment of the first object, the first index information is the identity identifier of the first object, and the first result data is used to indicate the credit assessment result of the first object.

16. The blockchain node according to any one of claims 9-15, wherein the i-th participant holds sample data and its corresponding sample result; the verification of the data processing method by the i-th participant includes processing the sample data using the data processing method defined in the contract code to obtain a current result corresponding to the sample data, and determining that the data processing method passes verification if the current result matches the sample result.

17. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-8.

18. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed in a computing device, the computing device performs the method of any one of claims 1-8.