WO2020125224A1 - 数据结构的读取及更新方法、装置、电子设备 - Google Patents

数据结构的读取及更新方法、装置、电子设备 Download PDF

Info

Publication number
WO2020125224A1
WO2020125224A1 PCT/CN2019/114608 CN2019114608W WO2020125224A1 WO 2020125224 A1 WO2020125224 A1 WO 2020125224A1 CN 2019114608 W CN2019114608 W CN 2019114608W WO 2020125224 A1 WO2020125224 A1 WO 2020125224A1
Authority
WO
WIPO (PCT)
Prior art keywords
data structure
smart contract
update
metadata
data
Prior art date
Application number
PCT/CN2019/114608
Other languages
English (en)
French (fr)
Inventor
俞本权
卓海振
陆钟豪
王发强
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to SG11202100825UA priority Critical patent/SG11202100825UA/en
Priority to EP19898287.8A priority patent/EP3812917A4/en
Publication of WO2020125224A1 publication Critical patent/WO2020125224A1/zh
Priority to US17/163,279 priority patent/US11775507B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a method, device, and electronic device for reading and updating data structures.
  • Blockchain technology also known as distributed ledger technology
  • distributed ledger technology is a decentralized distributed database technology, which has many characteristics such as decentralization, openness and transparency, non-tampering, and trust, and is applicable to many In application scenarios with high requirements for data reliability.
  • one or more embodiments of this specification provide a method, device, and electronic device for reading and updating a data structure.
  • a method for reading a data structure including:
  • Block chain nodes in the block chain network obtain call requests for smart contracts
  • the blockchain node runs the contract code contained in the smart contract to parse the data structure described by the metadata contained in the smart contract and analyze the data through a computer programming language Characterize the structure;
  • the blockchain node returns the data structure represented by the computer programming language to the initiator of the call request.
  • a method for updating a data structure including:
  • Block chain nodes in the block chain network obtain call requests for smart contracts
  • the blockchain node obtains the updated data structure based on the computer programming language
  • the blockchain node runs the contract code contained in the smart contract, the contract code is used to parse the updated data structure and is characterized as an updated element based on a defined description language Data to update the pre-update metadata contained in the smart contract.
  • a data structure reading device including:
  • the acquisition unit enables the blockchain nodes in the blockchain network to acquire the call request for the smart contract
  • the response unit in response to the call request, causes the blockchain node to run the contract code contained in the smart contract to parse the data structure described by the metadata contained in the smart contract and pass the computer programming language Characterize the data structure;
  • a return unit causes the blockchain node to return the data structure represented by the computer programming language to the initiator of the call request.
  • a data structure updating device including:
  • the request acquisition unit enables the blockchain nodes in the blockchain network to acquire the call request for the smart contract
  • a structure acquisition unit to enable the blockchain node to obtain an updated data structure based on a computer programming language
  • a request response unit in response to the call request, causes the blockchain node to run the contract code contained in the smart contract, the contract code is used to parse the updated data structure and is characterized as based on the definition description The updated metadata of the language to update the metadata before the update included in the smart contract.
  • an electronic device including:
  • Memory for storing processor executable instructions
  • the processor is configured to implement the data structure reading method as described in any of the above embodiments.
  • an electronic device including:
  • Memory for storing processor executable instructions
  • the processor is configured to implement the data structure updating method as described in any one of the above embodiments.
  • FIG. 1 is a flowchart of a data structure reading method provided by an exemplary embodiment.
  • FIG. 2 is a flowchart of a data structure updating method provided by an exemplary embodiment.
  • FIG. 3 is a schematic structural diagram of a smart contract provided by an exemplary embodiment.
  • FIG. 4 is a schematic diagram of a read data structure provided by an exemplary embodiment.
  • FIG. 5 is a schematic diagram of an update data structure provided by an exemplary embodiment.
  • FIG. 6 is a schematic structural diagram of an apparatus provided by an exemplary embodiment.
  • FIG. 7 is a block diagram of a data structure reading apparatus provided by an exemplary embodiment.
  • FIG. 8 is a schematic structural diagram of another device provided by an exemplary embodiment.
  • FIG. 9 is a block diagram of an apparatus for updating a data structure provided by an exemplary embodiment.
  • the steps of the corresponding method are not necessarily performed in the order shown and described in this specification.
  • the method may include more or fewer steps than described in this specification.
  • the single step described in this specification may be decomposed into multiple steps for description in other embodiments; and the multiple steps described in this specification may also be combined into a single step in other embodiments. description.
  • FIG. 1 is a flowchart of a data structure reading method provided by an exemplary embodiment. As shown in FIG. 1, the method may include the following steps:
  • Step 102 the blockchain node in the blockchain network obtains a call request for a smart contract.
  • the call request may be carried in a transaction created in the blockchain network, and by indicating the contract address and port information of the smart contract to be called in the transaction, the call request is confirmed To "target" the above smart contract, so as to execute the contract code contained in the smart contract.
  • the transfer described in this specification refers to a piece of data created by a client corresponding to a blockchain node and required to be finally released to a distributed database of the blockchain network.
  • a narrow transaction refers to a value transfer issued by the blockchain network; for example, in the traditional Bitcoin blockchain network, the transaction can be a transfer initiated in the blockchain network.
  • the generalized transaction refers to a piece of business data published by the blockchain network with business intent; for example, the operator can build an alliance chain based on actual business needs, relying on the alliance chain to deploy some other types of irrelevant value transfer Online business (for example, rental business, vehicle scheduling business, insurance claim business, credit service, medical service, etc.), and in this type of alliance chain, the transaction can be a business message with business intent published in the alliance chain or Business request.
  • the operator can build an alliance chain based on actual business needs, relying on the alliance chain to deploy some other types of irrelevant value transfer Online business (for example, rental business, vehicle scheduling business, insurance claim business, credit service, medical service, etc.), and in this type of alliance chain, the transaction can be a business message with business intent published in the alliance chain or Business request.
  • the initiator of the call request may include: a certain role in the blockchain network.
  • the role may include developers or ordinary users of the blockchain network, and the role can quickly read the data structure of the data contained in the smart contract based on the call to the smart contract.
  • the initiator of the call request may include: another smart contract that is different from the smart contract.
  • a contract operation based on the other smart contract needs to read the data structure of related data from the data set of the smart contract during execution, so that the contract operation based on the other smart contract can initiate the above-mentioned call request, In order to achieve the corresponding data structure read operation.
  • the other smart contract can be called by the members of the blockchain or by other smart contracts, and this specification does not limit this.
  • step 104 in response to the call request, the blockchain node runs the contract code contained in the smart contract to parse the data structure described by the metadata contained in the smart contract, and through the computer programming language The data structure is characterized.
  • a role such as a developer can read and edit data structures based on computer programming languages, while metadata is characterized using a definition description language and cannot be directly read and edited. Therefore, the contract code contained in the first smart contract can be used to implement the conversion function module between the computer programming language and the definition description language, and the metadata represented by the definition description language can be parsed and further converted into the computer programming language. Characterization, so that the above-mentioned role can easily read the data structure of the data contained in the smart contract.
  • a smart contract may include several structures, such as a code structure for recording codes, a storage structure for recording data sets and metadata, and so on; in other embodiments, codes, data sets and metadata may be recorded For other structures in the smart contract, this manual does not limit this.
  • the data structure may include: contained data fields, hierarchical relationships between the various data fields, value relationships between the various data fields, etc. This specification does not limit this.
  • Step 106 The blockchain node returns the data structure represented by the computer programming language to the initiator of the call request.
  • the computer programming language may include: a preset type of language.
  • a preset type of language For example, it can be preset to use Solidity language, JavaScript language, Python language, etc., and this manual does not limit this.
  • the computer programming language may include: the type of language indicated in the call request.
  • the initiator of the call request can specify the type of computer programming language it wishes to use. This designation can be for any type, or it can be selected from a variety of pre-configured types, which is not limited in this specification.
  • FIG. 2 is a flowchart of a data structure updating method provided by an exemplary embodiment. As shown in Figure 2, the method may include the following steps:
  • Step 202A The blockchain node in the blockchain network obtains a call request for a smart contract.
  • the call request may be carried in a transaction created in the blockchain network, and by indicating the contract address and port information of the smart contract to be called in the transaction, the call request is confirmed To "target" the above smart contract, so as to execute the contract code contained in the smart contract.
  • the transfer described in this specification refers to a piece of data created by a client corresponding to a blockchain node and required to be finally released to a distributed database of the blockchain network.
  • a narrow transaction refers to a value transfer issued by the blockchain network; for example, in the traditional Bitcoin blockchain network, the transaction can be a transfer initiated in the blockchain network.
  • the generalized transaction refers to a piece of business data published by the blockchain network with business intent; for example, the operator can build an alliance chain based on actual business needs, relying on the alliance chain to deploy some other types of irrelevant value transfer Online business (for example, rental business, vehicle scheduling business, insurance claim business, credit service, medical service, etc.), and in this type of alliance chain, the transaction can be a business message with business intent published in the alliance chain or Business request.
  • the operator can build an alliance chain based on actual business needs, relying on the alliance chain to deploy some other types of irrelevant value transfer Online business (for example, rental business, vehicle scheduling business, insurance claim business, credit service, medical service, etc.), and in this type of alliance chain, the transaction can be a business message with business intent published in the alliance chain or Business request.
  • the initiator of the call request may include: a certain role in the blockchain network.
  • the role may include developers or ordinary users of the blockchain network, and the role can be based on the call to the smart contract, thereby conveniently updating the data structure of the data contained in the smart contract.
  • Step 202B The blockchain node obtains the updated data structure based on the computer programming language.
  • the developer can read the data structure of the data contained in the smart contract through implementation such as shown in FIG. 1 and update the data structure based on the computer programming language to obtain the updated data structure.
  • the computer programming language may include: a preset type of language.
  • a preset type of language For example, it can be preset to use Solidity language, JavaScript language, Python language, etc., and this manual does not limit this.
  • the data structure may include: contained data fields, hierarchical relationships between the various data fields, value relationships between the various data fields, etc. This specification does not limit this.
  • step 202A there is no necessary sequence between step 202A and step 202B, as long as it occurs before step 204, this specification does not limit this.
  • Step 204 In response to the call request, the blockchain node runs the contract code contained in the smart contract, the contract code is used to parse the updated data structure, and is characterized as based on the definition description language. The updated metadata to update the metadata before the update included in the smart contract.
  • a smart contract may include several structures, such as a code structure for recording codes, a storage structure for recording data sets and metadata, and so on; in other embodiments, codes, data sets and metadata may be recorded For other structures in the smart contract, this manual does not limit this.
  • a role such as a developer can read and edit data structures based on computer programming languages, while metadata is characterized using a definition description language and cannot be directly read and edited. Therefore, the contract code contained in the smart contract can be used to implement the conversion function module between the computer programming language and the definition description language, and the metadata of the definition description language can be parsed and further converted into the computer programming language for characterization.
  • the contract code contained in the smart contract can be used to implement the conversion function module between the computer programming language and the definition description language, and the metadata of the definition description language can be parsed and further converted into the computer programming language for characterization.
  • To enable the above-mentioned roles to update the data structure of the data through the computer programming language, and conveniently update the updated data structure to the corresponding metadata through the smart contract, so that the data contained in the smart contract through the updated metadata
  • the data structure is updated.
  • developers and other roles can quickly read and modify the data structure of the data contained in the smart contract.
  • the contract code is also used to: compare the pre-update data structure corresponding to the pre-update metadata with the post-update data structure to verify the rationality of the post-update data structure; Wherein, when the rationality of the updated data structure passes the verification, the updated metadata is used to update the pre-update metadata.
  • the data in the smart contract contains fields such as account ID, age, and phone number, and uses "01” for “account ID”, “02” for “age”, and “03” for “phone number” when recording “, etc.
  • "02” is modified to represent “phone number” in the updated data structure, and "03” still represents “phone number”
  • it will cause confusion in the "phone number” field resulting in the updated data structure
  • FIG. 3 is a schematic structural diagram of a smart contract provided by an exemplary embodiment.
  • the smart contract may include a structure 301.
  • the structure 301 may be referred to as a code structure, and is used to record a contract code (referred to simply as code) of the smart contract.
  • a smart contract may include a structure 302.
  • the structure 302 may be referred to as a storage structure, which is used to record contract data (referred to as data) in the smart contract, and metadata corresponding to the contract data.
  • the metadata is used to describe the corresponding contract. data.
  • the smart contract may also include other structures 303, such as the balance structure and nonce structure in the related art, which are not limited in this specification.
  • the above smart contract can provide an API interface to the code in the structure 301 to the outside to implement the call to the code.
  • the staff can call the code contained in the smart contract through the API interface provided by the smart contract, and after the code is executed, it can parse the metadata contained in the smart contract to It is provided to users such as developers in the form of computer programming languages, or the metadata is updated based on the updated data structure provided by users such as developers to read or update the data structure used by the data contained in the smart contract.
  • FIG. 4 is a schematic diagram of a read data structure provided by an exemplary embodiment. As shown in Figure 4, the process of reading the data structure may include the following steps:
  • Step 401 create a transaction.
  • the user A needs to read the data structure of the data contained in the smart contract described above to modify the data structure. Therefore, the user A can create a transaction for reading the data structure-equivalent to a structure read request, and publish this transaction to the blockchain network. It is assumed that the blockchain node G responds to the above transaction issued by the user A.
  • the blockchain node G is usually the closest blockchain node to the user A. Of course, this specification does not limit this.
  • the metadata contained in the storage structure in the smart contract records the data structure of the related data
  • the code contained in the code structure in the smart contract can define the above metadata
  • the description language and the computer programming language familiar to user A are converted to each other, so user A can call the code contained in the code structure in the smart contract through the above transaction to parse out the data structure of the data contained in the smart contract, and based on the computer
  • the programming language is presented to user A.
  • the transaction can include the contract address and port information of the above-mentioned smart contract that needs to be called, so that the blockchain node G can determine that the transaction needs to call the smart contract based on the contract address, and based on the port information to the smart contract The included code is called.
  • a consensus is reached among the various blockchain nodes in the blockchain network and recorded on each blockchain node, such as the above
  • the smart contract is also recorded on the blockchain node G.
  • Step 402 the blockchain node G verifies the user A's calling authority for the smart contract.
  • the smart contract may be set with a calling authority, similar to the whitelist or blacklist form, to avoid the smart contract being called at will, to prevent the metadata or data contained in it from being read or changed at will, and to prevent the generation Security risks.
  • a user with calling authority may be a predetermined part of the user; for example, when the blockchain network belongs to an alliance chain, the user with calling authority may be a member of the alliance. Therefore, when the smart contract is called by the user A, it can be determined whether the user A has the calling authority for the smart contract, and if the calling authority has the calling authority, the subsequent steps are continued, otherwise the failure information can be returned.
  • the characteristics of distributed data storage based on the blockchain network make the data published to the blockchain network need to be recorded on all blockchain nodes, so that the data cannot be tampered with and traceable.
  • some data may have certain privacy. If it is published to the blockchain network, privacy may not be guaranteed, and if it is not published to the blockchain network, there may be a problem of unreliable data content, and it is not conducive to each block
  • the chain node reads and calls the data structure of related data quickly. Therefore, in this specification, by recording the above-mentioned data with privacy requirements and its metadata in a smart contract, and by restricting the management of calling rights, unauthorized users are restricted from accessing related data and their metadata at will. And its metadata can be published to the blockchain network to enjoy the reliability and convenience brought by the blockchain network, but also to ensure that the data and its metadata have sufficient privacy and security.
  • step 403 the blockchain node G invokes a smart contract to parse and convert the metadata contained in the smart contract.
  • the blockchain node G can execute the code contained in the smart contract by calling the smart contract to implement related functions, such as parsing and language conversion of the metadata contained in the smart contract.
  • the code may include a first code fragment, which is used to implement the parsing function of metadata to parse out the data structure described by the metadata (that is, the data structure of the data contained in the smart contract); the code may include The second code segment is used to implement a language conversion function to convert the definition description language adopted by the metadata into a computer programming language.
  • user A may add an input parameter for the smart contract in the above transaction, for example, the input parameter may include an operation type.
  • the operation type is "read metadata"
  • the metadata contained in the smart contract can be read and parsed to know that the data contained in the smart contract is adopted Data structure.
  • the parsed data structure is also characterized as a computer programming language to be provided to user A for viewing.
  • user A may add an input parameter for the smart contract in the above transaction, for example, the input parameter may include a type of computer programming language, that is, user A may specify a certain type of computer programming language based on this, making the smart
  • the parsed data structure can be characterized using this type of computer programming language for user A to view or edit.
  • the data structure in this specification may include: the data fields involved in the data, the hierarchical relationship between each data field, the value relationship between each data field, etc., which can be used to describe the smart contract
  • the information of the contained data can be provided to user A as the data structure here.
  • the input parameters added by user A in the above transaction may include the types of data structures, such as several types of data structures that user A focuses on, so that after the code contained in the smart contract is executed, these types can be filtered out
  • the data structure is provided to user A, and other types of data structures may not be provided to user A, making the data structure viewed by user A more targeted and more in line with the actual needs of user A, and eliminating the need for other types
  • the process of parsing and characterizing the data structure helps to improve the efficiency of reading the data structure.
  • Step 404 the blockchain node G returns the processing result to the user A.
  • User A can update the data structure of the data contained in the smart contract. For example, after reading the pre-update data structure of the data contained in the smart contract through the embodiment shown in FIG. 4, user A can modify the pre-update data structure to obtain the updated data structure, and based on the updated The data structure updates the metadata contained in the smart contract, and then updates the data structure of the corresponding data according to the updated metadata.
  • user A can also obtain the pre-update data structure of the data contained in the smart contract in other ways, which is not limited in this specification.
  • FIG. 5 is a schematic diagram of an updated data structure provided by an exemplary embodiment.
  • the process of updating the data structure may include the following steps:
  • Step 501 create a transaction.
  • user A can create a transaction for updating the data structure-equivalent to a structure update request, and issue this to the blockchain network Transactions. It is assumed that the blockchain node G responds to the above transaction issued by the user A.
  • the blockchain node G is usually the closest blockchain node to the user A. Of course, this specification does not limit this.
  • user A may change the pre-update data structure used by the data contained in the smart contract to obtain an updated data structure; wherein, the updated data structure uses user A It is characterized by a well-known computer programming language, and after the code contained in the smart contract is executed, the updated data structure represented by the computer programming language and the definition description language used by the metadata can be converted between each other to obtain the updated metadata. And update the data structure of the data contained in the smart contract accordingly.
  • the transaction may include the contract address and port information of the above smart contract, so that the blockchain node G can determine that the transaction needs to call the smart contract based on the contract address, and based on the port information to the smart contract The included code is called.
  • Step 502 the blockchain node G verifies the user A's calling authority for the smart contract.
  • step 502 reference may be made to step 402 shown in FIG. 4, which will not be repeated here.
  • step 503 the blockchain node G invokes the smart contract, performs language conversion on the updated data structure, generates the updated metadata, and updates the smart contract.
  • the input parameters added by user A in the above transaction may include an updated data structure, so that when the code contained in the smart contract is executed, the updated data structure characterized based on the computer programming language can be converted, Obtain updated metadata that is characterized based on the definition description language.
  • the data structure in this specification may include: the data fields involved in the data, the hierarchical relationship between each data field, the value relationship between each data field, etc., which can be used to describe the smart contract
  • the information of the contained data can be provided to user A as the data structure here.
  • the update of the data structure by user A may involve any of the above data structures, such as adding, deleting, or modifying data fields, and then adding, deleting, or modifying the hierarchical relationship between data fields. Another example is to add, delete, or modify value relationships between data fields.
  • the data structure before the update of the data contained in the smart contract can be characterized as shown in Table 1 below, including the personal information of the user to which each account belongs (such as account ID, age, address, etc.), and each account for each type of blockchain asset Holdings.
  • the updated data structure may also be checked to determine whether the update implemented by user A is reasonable. For example, suppose that the management of data fields in a smart contract is implemented by means of "identification”; for example, the identification "01” indicates the above-mentioned field “account ID”, and the identification "02” indicates the above-mentioned field “age”, The designation "03” indicates the above-mentioned field "telephone” and so on.
  • smart contracts can also adopt other methods, which are not limited in this specification.
  • the smart contract can also use the "offset” method, such as the "account ID” field as the starting field, the offset corresponding to the "account ID” is 0, and the "age” field is to the right of the "account ID” field
  • the offset of the "age” field relative to the "account ID” is 1, similarly, the offset of the "telephone” field relative to the “account ID” is 2, etc.
  • the field and its positional relationship are managed, and the rationality of the updated data structure is determined accordingly, which will not be repeated here.
  • the metadata before the update originally included in the smart contract can be replaced with the metadata after the update, thereby updating the metadata contained in the smart contract.
  • step 504 the blockchain node G returns the processing result to the user A.
  • the updated metadata contained in the smart contract adopts the updated data structure of user A
  • the updated metadata can be parsed and based on the parsed result Update the data contained in the smart contract, so as to finally realize the update operation of the data structure of the data contained in the smart contract.
  • the code in the smart contract may include a third code segment, which is used to implement the language conversion function, and the computer programming language may be converted into a definition description language, thereby updating the updated data provided by user A
  • the structure is converted to the updated metadata
  • the code may include a fourth code fragment, which is used to implement the metadata update function, and the pre-update metadata included in the smart contract may be updated to the above-mentioned updated metadata
  • the The code may include a fifth code segment, which is used to implement a data structure update function, and may analyze the updated metadata to update the data contained in the smart contract according to the analysis result.
  • the updated metadata can be parsed by executing the code included in the smart contract, and all data included in the smart contract can be updated based on the analysis result. For example, when the data structure is updated by changing the "Total-RMB" field shown in Table 1 to the "Total-Dollar” field, the updated data can be as shown in Table 3. Show.
  • the data structure of all data contained in the smart contract may not be updated, but only when related data is involved, the data structure of the data is updated.
  • the data contained in the smart contract may still temporarily adopt the data structure shown in Table 1.
  • the code contained in the smart contract is executed to parse the updated metadata contained in the smart contract, due to the updated data
  • the data "13000” in the “Total-RMB (total-RMB)” field is deleted and changed to "1999.1696" under the “Total-Dollar (total-USD)” field, indicating that the blockchain assets held by user B
  • the total amount is equivalent to USD 1999.1696.
  • FIG. 6 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 6.
  • the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610. Of course, it may include hardware required for other services.
  • the processor 602 reads the corresponding computer program from the non-volatile memory 610 into the memory 608 and then runs it, forming a reading device of a data structure on a logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of hardware and software, etc., that is to say, the execution body of the following processing flow is not limited to each
  • the logic unit may also be a hardware or logic device.
  • the data structure reading device may include:
  • the obtaining unit 71 enables the blockchain nodes in the blockchain network to obtain the calling request for the smart contract;
  • the response unit 72 in response to the call request, causes the blockchain node to run the contract code contained in the smart contract to parse the data structure described by the metadata contained in the smart contract and program it through a computer Language to characterize the data structure;
  • the return unit 73 causes the blockchain node to return the data structure represented by the computer programming language to the initiator of the call request.
  • the metadata is used to describe the data contained in the smart contract.
  • the computer programming language includes: a language of a preset type or a language of the type indicated in the call request.
  • FIG. 8 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 8.
  • the device includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810. Of course, it may include hardware required for other services.
  • the processor 802 reads the corresponding computer program from the non-volatile memory 810 into the memory 808 and then runs it to form a data structure update device at a logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of hardware and software, etc., that is to say, the execution body of the following processing flow is not limited to each
  • the logic unit may also be a hardware or logic device.
  • the data structure updating device may include:
  • the request obtaining unit 91 enables the block chain nodes in the block chain network to obtain the call request for the smart contract
  • the structure obtaining unit 92 enables the blockchain node to obtain the updated data structure based on the computer programming language
  • Request response unit 93 in response to the call request, causes the blockchain node to run the contract code included in the smart contract, the contract code is used to parse the updated data structure, and is characterized as defined based on The metadata after the update in the description language is used to update the metadata before the update included in the smart contract.
  • the metadata included in the smart contract is used to describe the data included in the smart contract.
  • the contract code is also used to: compare the pre-update data structure corresponding to the pre-update metadata with the post-update data structure to verify the rationality of the post-update data structure; wherein, When the rationality of the updated data structure passes the verification, the updated metadata is used to update the pre-update metadata.
  • the system, device, module or unit explained in the above embodiments may be specifically implemented by a computer chip or entity, or implemented by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or any combination of these devices.
  • the computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in computer-readable media, such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash random access memory
  • Computer readable media including permanent and non-permanent, removable and non-removable media, can store information by any method or technology.
  • the information may 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, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
  • first, second, third, etc. may use the terms first, second, third, etc. to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word "if” as used herein can be interpreted as "when” or “when” or “in response to a determination”.

Abstract

一种数据结构的读取及更新方法、装置、电子设备,该数据结构的读取方法可以包括:区块链网络中的区块链节点获取针对智能合约的调用请求(102);响应于所述调用请求,所述区块链节点运行所述智能合约包含的合约代码,以对所述智能合约包含的元数据所描述的数据结构进行解析,并通过计算机编程语言对所述数据结构进行表征(104);所述区块链节点将所述计算机编程语言表征的数据结构返回至所述调用请求的发起方(106)。

Description

数据结构的读取及更新方法、装置、电子设备 技术领域
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种数据结构的读取及更新方法、装置、电子设备。
背景技术
区块链技术(也被称之为,分布式账本技术)是一种去中性化的分布式数据库技术,具有去中心化、公开透明、不可篡改、可信任等多种特点,适用于诸多对数据可靠性具有高需求的应用场景中。
发明内容
有鉴于此,本说明书一个或多个实施例提供一种数据结构的读取及更新方法、装置、电子设备。
为实现上述目的,本说明书一个或多个实施例提供技术方案如下:
根据本说明书一个或多个实施例的第一方面,提出了一种数据结构的读取方法,包括:
区块链网络中的区块链节点获取针对智能合约的调用请求;
响应于所述调用请求,所述区块链节点运行所述智能合约包含的合约代码,以对所述智能合约包含的元数据所描述的数据结构进行解析,并通过计算机编程语言对所述数据结构进行表征;
所述区块链节点将所述计算机编程语言表征的数据结构返回至所述调用请求的发起方。
根据本说明书一个或多个实施例的第二方面,提出了一种数据结构的更新方法,包括:
区块链网络中的区块链节点获取针对智能合约的调用请求;
所述区块链节点获取基于计算机编程语言的更新后数据结构;
响应于所述调用请求,所述区块链节点运行所述智能合约包含的合约代码,所述合约代码用于对所述更新后数据结构进行解析,并表征为基于定义描述语言的更新后元数据,以对所述智能合约包含的更新前元数据进行更新。
根据本说明书一个或多个实施例的第三方面,提出了一种数据结构的读取装置,包括:
获取单元,使区块链网络中的区块链节点获取针对智能合约的调用请求;
响应单元,响应于所述调用请求,使所述区块链节点运行所述智能合约包含的合约代码,以对所述智能合约包含的元数据所描述的数据结构进行解析,并通过计算机编程语言对所述数据结构进行表征;
返回单元,使所述区块链节点将所述计算机编程语言表征的数据结构返回至所述调用请求的发起方。
根据本说明书一个或多个实施例的第四方面,提出了一种数据结构的更新装置,包括:
请求获取单元,使区块链网络中的区块链节点获取针对智能合约的调用请求;
结构获取单元,使所述区块链节点获取基于计算机编程语言的更新后数据结构;
请求响应单元,响应于所述调用请求,使所述区块链节点运行所述智能合约包含的合约代码,所述合约代码用于对所述更新后数据结构进行解析,并表征为基于定义描述语言的更新后元数据,以对所述智能合约包含的更新前元数据进行更新。
根据本说明书一个或多个实施例的第五方面,提出了一种电子设备,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为实现如上述实施例中任一所述的数据结构的读取方法。
根据本说明书一个或多个实施例的第六方面,提出了一种电子设备,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为实现如上述实施例中任一所述的数据结构的更新方法。
附图说明
图1是一示例性实施例提供的一种数据结构的读取方法的流程图。
图2是一示例性实施例提供的一种数据结构的更新方法的流程图。
图3是一示例性实施例提供的一种智能合约的结构示意图。
图4是一示例性实施例提供的一种读取数据结构的示意图。
图5是一示例性实施例提供的一种更新数据结构的示意图。
图6是一示例性实施例提供的一种设备的结构示意图。
图7是一示例性实施例提供的一种数据结构的读取装置的框图。
图8是一示例性实施例提供的另一种设备的结构示意图。
图9是一示例性实施例提供的一种数据结构的更新装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。
图1是一示例性实施例提供的一种数据结构的读取方法的流程图。如图1所示,该方法可以包括以下步骤:
步骤102,区块链网络中的区块链节点获取针对智能合约的调用请求。
在一实施例中,调用请求可以承载于区块链网络中创建的一笔交易,并通过在该交易中指明所需调用的该智能合约的合约地址、端口信息等,使得该调用请求被确认为“针对”上述的智能合约,从而执行该智能合约包含的合约代码。
在一实施例中,本说明书中所描述的交易(transfer),是指通过区块链节点对应的客户端创建,并需要最终发布至区块链网络的分布式数据库中的一笔数据。其中,区块链网络中的交易,存在狭义的交易以及广义的交易之分。狭义的交易是指向区块链网络发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是在区块链网络中发起的一笔转账。而广义的交易是指向区块链网络发布的一笔具有业务意图的业务数据;例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转移无关的其它类型的在 线业务(比如,租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。
在一实施例中,所述调用请求的发起方可以包括:所述区块链网络中的某一角色。例如,该角色可以包括区块链网络的开发人员或普通用户,该角色能够基于对该智能合约的调用,对该智能合约包含的数据的数据结构进行快速读取。
在一实施例中,所述调用请求的发起方可以包括:区别于所述智能合约的另一智能合约。例如,基于该另一智能合约的合约操作在执行过程中需要从所述智能合约的数据集合中读取相关数据的数据结构,使得基于该另一智能合约的合约操作可以发起上述的调用请求,以实现相应的数据结构的读取操作。其中,该另一智能合约可以由区块链成员所调用,或者由其他智能合约所调用,本说明书并不对此进行限制。
步骤104,响应于所述调用请求,所述区块链节点运行所述智能合约包含的合约代码,以对所述智能合约包含的元数据所描述的数据结构进行解析,并通过计算机编程语言对所述数据结构进行表征。
在一实施例中,开发人员等角色可以读取和编辑基于计算机编程语言的数据结构,而元数据采用定义描述语言进行表征、无法被直接读取和编辑。因此,第一智能合约包含的合约代码可以用于实现在计算机编程语言与定义描述语言之间的转换功能模块,可以对定义描述语言表征的元数据进行解析,并进一步转换为采用计算机编程语言进行表征,以使得上述角色能够便捷地读取智能合约包含的数据的数据结构。
在一实施例中,智能合约可以包括若干结构,比如用于记录代码的code结构、用于记录数据集合和元数据的storage结构等;在其他实施例中,代码、数据集合和元数据可以记录于智能合约中的其他结构,本说明书并不对此进行限制。
在一实施例中,数据结构可以包括:包含的数据字段、各个数据字段之间的层级关系、各个数据字段之间的取值关系等,本说明书并不对此进行限制。
步骤106,所述区块链节点将所述计算机编程语言表征的数据结构返回至所述调用请求的发起方。
在一实施例中,所述计算机编程语言可以包括:预设类型的语言。例如,可以预先设定为均采用Solidity语言、JavaScript语言、Python语言等,本说明书并不对此进行限制。
在一实施例中,所述计算机编程语言可以包括:所述调用请求中指示类型的语言。换言之,调用请求的发起方可以指定希望采用的计算机编程语言的类型,这种指定可以针对任意 类型,也可以在预先配置的多种类型中进行选择,本说明书并不对此进行限制。
图2是一示例性实施例提供的一种数据结构的更新方法的流程图。如图2所示,该方法可以包括以下步骤:
步骤202A,区块链网络中的区块链节点获取针对智能合约的调用请求。
在一实施例中,调用请求可以承载于区块链网络中创建的一笔交易,并通过在该交易中指明所需调用的该智能合约的合约地址、端口信息等,使得该调用请求被确认为“针对”上述的智能合约,从而执行该智能合约包含的合约代码。
在一实施例中,本说明书中所描述的交易(transfer),是指通过区块链节点对应的客户端创建,并需要最终发布至区块链网络的分布式数据库中的一笔数据。其中,区块链网络中的交易,存在狭义的交易以及广义的交易之分。狭义的交易是指向区块链网络发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是在区块链网络中发起的一笔转账。而广义的交易是指向区块链网络发布的一笔具有业务意图的业务数据;例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转移无关的其它类型的在线业务(比如,租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。
在一实施例中,所述调用请求的发起方可以包括:所述区块链网络中的某一角色。例如,该角色可以包括区块链网络的开发人员或普通用户,该角色能够基于对该智能合约的调用,从而便捷地实现对该智能合约包含的数据的数据结构的更新。
步骤202B,所述区块链节点获取基于计算机编程语言的更新后数据结构。
在一实施例中,开发人员可以通过诸如图1所示的实施读取智能合约包含的数据的数据结构,并基于计算机编程语言对该数据结构实施更新,从而得到更新后数据结构。
在一实施例中,所述计算机编程语言可以包括:预设类型的语言。例如,可以预先设定为均采用Solidity语言、JavaScript语言、Python语言等,本说明书并不对此进行限制。
在一实施例中,数据结构可以包括:包含的数据字段、各个数据字段之间的层级关系、各个数据字段之间的取值关系等,本说明书并不对此进行限制。
在一实施例中,步骤202A与步骤202B之间并不存在必然的先后顺序,只要发生于步骤204之前即可,本说明书并不对此进行限制。
步骤204,响应于所述调用请求,所述区块链节点运行所述智能合约包含的合约代码,所 述合约代码用于对所述更新后数据结构进行解析,并表征为基于定义描述语言的更新后元数据,以对所述智能合约包含的更新前元数据进行更新。
在一实施例中,智能合约可以包括若干结构,比如用于记录代码的code结构、用于记录数据集合和元数据的storage结构等;在其他实施例中,代码、数据集合和元数据可以记录于智能合约中的其他结构,本说明书并不对此进行限制。
在一实施例中,开发人员等角色可以读取和编辑基于计算机编程语言的数据结构,而元数据采用定义描述语言进行表征、无法被直接读取和编辑。因此,智能合约包含的合约代码可以用于实现在计算机编程语言与定义描述语言之间的转换功能模块,可以对定义描述语言表征的元数据进行解析,并进一步转换为采用计算机编程语言进行表征,以使得上述角色能够通过计算机编程语言对数据的数据结构进行更新,并通过该智能合约将更新后数据结构便捷地更新为相应的元数据,以通过更新后的元数据对该智能合约包含的数据的数据结构进行更新。那么,尤其是在开发阶段或维护阶段,使得开发人员等角色能够快捷地读取、修改该智能合约包含的数据的数据结构。
在一实施例中,所述合约代码还用于:将所述更新前元数据对应的更新前数据结构与所述更新后数据结构进行比较,以校验所述更新后数据结构的合理性;其中,在所述更新后数据结构的合理性通过校验的情况下,所述更新后元数据被用于对所述更新前元数据进行更新。例如,假定智能合约中的数据包含账户ID、年龄、电话号码等字段,并且在记录时采用“01”代表“账户ID”、采用“02”代表“年龄”、采用“03”代表“电话号码”等,那么在更新后数据结构中如果将“02”修改为代表“电话号码”,而“03”仍然代表“电话号码”,就会导致“电话号码”字段出现混乱,造成更新后数据结构不合理,应当避免直接对更新前元数据进行更新,而应当对该智能合约的调用方(如开发人员)发出告警,提示其作出修改。
图3是一示例性实施例提供的一种智能合约的结构示意图。如图3所示,在本说明书的实施例中,针对区块链网络中的智能合约实施了结构改进,以实现基于本说明书的数据读写方案。其中,智能合约可以包括结构301,比如该结构301可以称为code结构,用于记录该智能合约的合约代码(简称为代码)。智能合约可以包括结构302,比如该结构302可以称为storage结构,用于记录该智能合约中的合约数据(简称为数据)、该合约数据对应的元数据,该元数据用于描述相应的合约数据。智能合约还可以包括其他的结构303,比如相关技术中的balance结构、nonce结构等,本说明书并不对此进行限制。
其中,上述智能合约可以向外部提供针对结构301中的代码的API接口,以实现针对该代码的调用。而在本说明书的实施例中,工作人员可以通过智能合约提供的API接口,对该 智能合约包含的代码进行调用,而该代码被执行后可以通过针对该智能合约包含的元数据进行解析,以通过计算机编程语言的形式提供至开发人员等用户,或者基于开发人员等用户提供的更新后数据结构对该元数据进行更新,从而读取或更新该智能合约包含的数据采用的数据结构。
在本说明书的技术方案中,假定由用户A对智能合约进行开发或维护(譬如用户A为开发人员),由于智能合约中的元数据采用定义描述语言进行描述,而工作人员擅长于通过计算机编程语言进行开发或维护,而该智能合约包含的代码不仅能够对元数据进行读取或更新,还可以在定义描述语言与计算机编程语言之间实现切换,即该代码可以实现为定义描述语言与计算机编程语言之间的切换模块,从而有助于工作人员通过调用该智能合约包含的代码,便捷地开发或维护该智能合约包含的元数据,以进一步读取或更新该智能合约包含的数据的数据结构。
图4是一示例性实施例提供的一种读取数据结构的示意图。如图4所示,读取数据结构的过程可以包括以下步骤:
步骤401,创建交易。
在一实施例中,假定用户A需要读取上述的智能合约包含的数据的数据结构,以针对该数据结构进行更改。因此,该用户A可以创建用于读取数据结构的交易——相当于结构读取请求,并向区块链网络发布这条交易。假定由区块链节点G对用户A发布的上述交易进行响应,该区块链节点G通常为距离用户A最近的区块链节点,当然本说明书并不对此进行限制。
在一实施例中,基于如图3所示的实施例,智能合约中storage结构包含的元数据记录了相关数据的数据结构,而智能合约中code结构包含的代码可以对上述元数据采用的定义描述语言与用户A熟知的计算机编程语言进行相互转换,因而用户A可以通过上述交易对该智能合约中code结构包含的代码进行调用,以解析出该智能合约包含的数据的数据结构,并基于计算机编程语言向用户A进行呈现。
在一实施例中,区块链网络中可以存在很多的智能合约,以分别用于实现相应的事件或目的。因此,交易中可以包含所需调用的上述智能合约的合约地址、端口信息等,以使得区块链节点G可以基于该合约地址确定该交易需要调用该智能合约,并基于端口信息对该智能合约包含的代码进行调用。
在一实施例中,智能合约被创建并发布至区块链网络后,在该区块链网络中的各个区块链节点之间达成共识,并记录于各个区块链节点上,比如上述的区块链节点G上同样记录有 该智能合约。
步骤402,区块链节点G验证用户A对智能合约的调用权限。
在一实施例中,智能合约可以设定有调用权限,类似于白名单或黑名单的形式,以避免智能合约被随意调用,防止其包含的元数据或数据被随意读取或更改,防止产生安全性风险。例如,当区块链网络属于公有链时,具有调用权限的用户可以为预先约定的部分用户;又例如,当区块链网络属于联盟链时,具有调用权限的用户可以为联盟成员。因此,当智能合约被用户A所调用时,可以确定该用户A是否针对该智能合约具有调用权限,并在具有调用权限时继续实施后续步骤,否则可以返回失败信息。
需要说明的是:基于区块链网络的分布式数据存储的特点,使得发布至区块链网络的数据需要被记录于所有区块链节点上,使得这些数据不可篡改、可溯源。但是,一些数据可能具有一定私密性,如果发布至区块链网络则可能造成私密性无法保障,而如果不发布至区块链网络则可能存在数据内容不可靠的问题,并且不利于各个区块链节点对于相关数据的数据结构进行快捷读取和调用等。因此,本说明书中通过将上述具有私密性需求的数据及其元数据记录于智能合约中,并通过对调用权限的管理而限制无权限用户对相关数据及其元数据的随意访问,使得这些数据及其元数据既能够公布至区块链网络、以享有区块链网络所带来的可靠性与便利性,又能够确保数据及其元数据具有足够的私密性和安全性。
步骤403,区块链节点G调用智能合约,对该智能合约包含的元数据进行解析和语言转换。
在一实施例中,区块链节点G通过调用智能合约,可以执行该智能合约包含的代码,以实现相关功能,譬如对该智能合约包含的元数据进行解析和语言转换等。其中,代码可以包括第一代码片段,该第一代码片段用于实现对元数据的解析功能,以解析出元数据所描述的数据结构(即智能合约包含的数据的数据结构);代码可以包括第二代码片段,该第二代码片段用于实现语言转换功能,以将元数据采用的定义描述语言转换为计算机编程语言。
在一实施例中,用户A可以在上述交易中添加针对智能合约的入参,比如该入参可以包括操作类型。当该操作类型为“读取元数据”时,该智能合约包含的代码被执行后,可以读取该智能合约包含的元数据、对该元数据进行解析,以获知该智能合约包含的数据采用的数据结构。
进一步地,由于智能合约包含的元数据采用定义描述语言进行表征。因此,上述智能合约包含的代码被执行后,还将解析出的数据结构表征为计算机编程语言,以提供至用户A进 行查看。
在一实施例中,用户A可以在上述交易中添加针对智能合约的入参,比如该入参可以包括计算机编程语言的类型,即用户A可以据此指定某一类型的计算机编程语言,使得智能合约包含的代码被执行后,可以将解析出的数据结构采用该类型的计算机编程语言进行表征,以便用户A进行查看或编辑。
在一实施例中,本说明书中的数据结构可以包括:数据所涉及的数据字段、各个数据字段之间的层级关系、各个数据字段之间的取值关系等,凡是能够用于描述智能合约所包含的数据的信息,均可以作为此处的数据结构而提供至用户A。
在一实施例中,用户A在上述交易中添加的入参可以包括数据结构的类型,比如该用户A关注的若干类型的数据结构,使得智能合约包含的代码被执行后,可以筛选出这些类型的数据结构并提供至用户A,而其他类型的数据结构可以不提供至用户A,使得用户A查看到的数据结构更加具有针对性、更加符合用户A的实际需求,而且免去了对其他类型的数据结构进行解析和表征的过程,有助于提升对数据结构的读取效率。
步骤404,区块链节点G向用户A返回处理结果。
用户A可以对智能合约包含的数据实施数据结构的更新。例如,在通过如图4所示的实施例读取该智能合约包含的数据的更新前数据结构后,用户A可以针对该更新前数据结构进行修改,得到更新后数据结构,并基于该更新后数据结构对智能合约包含的元数据进行更新,然后根据更新后元数据对相应数据的数据结构进行更新。当然,用户A还可以通过其他方式获得智能合约包含的数据的更新前数据结构,本说明书并不对此进行限制。
相应地,图5是一示例性实施例提供的一种更新数据结构的示意图。如图5所示,更新数据结构的过程可以包括以下步骤:
步骤501,创建交易。
在一实施例中,假定用户A需要更新上述的智能合约包含的数据的数据结构,该用户A可以创建用于更新数据结构的交易——相当于结构更新请求,并向区块链网络发布这条交易。假定由区块链节点G对用户A发布的上述交易进行响应,该区块链节点G通常为距离用户A最近的区块链节点,当然本说明书并不对此进行限制。
在一实施例中,基于如图3所示的实施例,用户A可以对智能合约包含的数据采用的更新前数据结构进行更改,得到更新后数据结构;其中,该更新后数据结构采用用户A熟知的计算机编程语言进行表征,而该智能合约包含的代码被执行后,可以对该计算机编程语言表 征的更新后数据结构与元数据采用的定义描述语言进行相互转换,从而得到更新后元数据,并据此对该智能合约包含的数据的数据结构进行更新。
在一实施例中,交易中可以包含上述智能合约的合约地址、端口信息等,以使得区块链节点G可以基于该合约地址确定该交易需要调用该智能合约,并基于端口信息对该智能合约包含的代码进行调用。
步骤502,区块链节点G验证用户A对智能合约的调用权限。
在一实施例中,步骤502可以参考图4所示的步骤402,此处不再赘述。
步骤503,区块链节点G调用智能合约,对更新后数据结构进行语言转换,并生成为更新后元数据,并更新至智能合约中。
在一实施例中,用户A在上述交易中添加的入参可以包括更新后数据结构,使得智能合约包含的代码被执行时,可以对基于计算机编程语言进行表征的该更新后数据结构进行转换,得到基于定义描述语言进行表征的更新后元数据。
在一实施例中,本说明书中的数据结构可以包括:数据所涉及的数据字段、各个数据字段之间的层级关系、各个数据字段之间的取值关系等,凡是能够用于描述智能合约所包含的数据的信息,均可以作为此处的数据结构而提供至用户A。
在一实施例中,用户A对于数据结构的更新可以涉及上述任意方面的数据结构,比如对数据字段进行添加、删除或修改,再比如对数据字段之间的层级关系进行增加、删除或修改,又比如对数据字段之间的取值关系进行增加、删除或修改等。
下面以针对数据字段的增加、删除或修改为例,对更新前后的数据结构进行详细说明:
假定智能合约包含的数据的更新前数据结构可以表征为如下表1所示,包括各个账户所属用户的个人信息(如账户ID、年龄、地址等),以及各个账户对于各个类型的区块链资产的持有情况。
Figure PCTCN2019114608-appb-000001
表1
在一种情况下,假定用户A对于数据结构的更新方式为:添加数据字段。譬如,在上述表1的基础上添加新的数据字段“Balance-Type X(余额-类型X)”,相应的更新后数据结构如下表2所示。
Figure PCTCN2019114608-appb-000002
表2
在另一种情况下,假定用户A对于数据结构的更新方式为:删除数据字段。譬如,在上述表2的基础上删除了原有的数据字段“Balance-Type X(余额-类型X)”,相应的更新后数据结构如下表1所示。
在又一种情况下,假定用户A对于数据结构的更新方式为:修改数据字段。譬如,在上述表1的基础上将原有的数据字段“Total-RMB(总额-人民币)”更改为“Total-Dollar(总额-美元)”,即原本采用人民币对各个账户持有的区块链资产总额进行统计,更改为采用美元对各个账户持有的区块链资产总额进行统计,相应的更新后数据结构如下表3所示。
Figure PCTCN2019114608-appb-000003
表3
在一实施例中,智能合约包含的代码被执行时,还可以针对更新后数据结构进行校验,以确定用户A实施的更新是否合理。例如,假定智能合约中对于数据字段的管理,采用“标识”的方式来实现;譬如,采用标识“01”表示上述的字段“账户ID”、采用标识“02”表示上述的字段“年龄”、采用标识“03”表示上述的字段“电话”等。那么,如果在更新后数据结构中在表1的基础上添加了表2所示的“Balance-Type X(余额-类型X)”字段,并且采用标识“02”表示该“Balance-Type X(余额-类型X)”字段,那么标识“02”同时对应于两个不同字段,表明用户A实施的更新不合理,可以向用户A返回提示信息,并暂停或终止对数据结构的更新操作。
当然,除了基于“标识”的管理方式之外,智能合约还可以采用其他方式,本说明书并不对此进行限制。譬如,智能合约还可以采用“偏移量”方式,比如“账户ID”字段作为起始字段,该“账户ID”对应的偏移量为0,“年龄”字段为“账户ID”字段右侧的第一个字段,该“年龄”字段相对于“账户ID”的偏移量为1,类似地,“电话”字段相对于“账户ID”的偏移量为2等,以此对各个数据字段及其位置关系进行管理,并据此确定更新后数据结构的合理性,此处不再赘述。
在一实施例中,智能合约包含的代码被执行后,可以将该智能合约原本包含的更新前元数据更换为该更新后元数据,从而对该智能合约包含的元数据进行更新。
步骤504,区块链节点G向用户A返回处理结果。
在一实施例中,由于智能合约包含的更新后元数据采用了用户A更新后的数据结构,因而当智能合约包含的代码被执行时,可以对该更新后元数据进行解析,并基于解析结果对智能合约包含的数据进行更新,从而最终实现了对智能合约包含的数据的数据结构的更新操作。
在一实施例中,智能合约中的代码可以包括第三代码片段,该第三代码片段用于实现语言转换功能,可以将计算机编程语言转换为定义描述语言,从而将用户A提供的更新后数据结构转换为更新后元数据;该代码可以包括第四代码片段,该第四代码片段用于实现元数据更新功能,可以将智能合约包含的更新前元数据更新为上述的更新后元数据;该代码可以包括第五代码片段,该第五代码片段用于实现数据结构更新功能,可以对更新后元数据进行解析,以根据解析结果对智能合约包含的数据进行更新。
在一实施例中,智能合约包含的元数据被更新后,可以通过执行智能合约包含的代码对该更新后元数据进行解析,并基于解析结果对智能合约包含的所有数据进行更新。例如,当数据结构的更新方式为将表1所示的“Total-RMB(总额-人民币)”字段更改为“Total-Dollar(总额-美元)”字段时,更新后的数据可以如表3所示。
在一实施例中,智能合约包含的元数据被更新后,可以不对智能合约包含的所有数据进行数据结构更新,而仅当涉及到相关数据时,才针对这些数据的数据结构进行更新。例如,智能合约包含的元数据被更新后,智能合约包含的数据可以仍然暂时采用表1所示的数据结构。
Figure PCTCN2019114608-appb-000004
表4
而假定智能合约被调用,以针对账户ID为002的区块链资产总额进行查询,那么该智能合约包含的代码被执行,以针对该智能合约包含的更新后元数据进行解析,由于更新后数据结构采用“Total-Dollar(总额-美元)”字段,因而如上表4所示,可以为该“账户ID=0002”的用户信息添加“Total-Dollar(总额-美元)”字段,将原本对应于“Total-RMB(总额-人民币)”字段的数据“13000”删除,而更改为“Total-Dollar(总额-美元)”字段下的“1999.1696”,表明用户B所持有的区块链资产的总额相当于1999.1696美元。由于仅涉及到“账户ID=0002”的数据,因而对于该账户而言,相当于将“Total-RMB(总额-人民币)”字段更改为“Total-Dollar(总额-美元)”字段,但其他账户仍然采用“Total-RMB(总额-人民币)”字段,直至相关数据被涉及到,这样尤其是当被涉及到的账户数量较少时,可以极大地减少工作量。
图6是一示例性实施例提供的一种设备的示意结构图。请参考图6,在硬件层面,该设备包括处理器602、内部总线604、网络接口606、内存608以及非易失性存储器610,当然还可能包括其他业务所需要的硬件。处理器602从非易失性存储器610中读取对应的计算机程序到内存608中然后运行,在逻辑层面上形成数据结构的读取装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。
请参考图7,在软件实施方式中,该数据结构的读取装置可以包括:
获取单元71,使区块链网络中的区块链节点获取针对智能合约的调用请求;
响应单元72,响应于所述调用请求,使所述区块链节点运行所述智能合约包含的合约代码,以对所述智能合约包含的元数据所描述的数据结构进行解析,并通过计算机编程语言对所述数据结构进行表征;
返回单元73,使所述区块链节点将所述计算机编程语言表征的数据结构返回至所述调用请求的发起方。
可选的,所述元数据用于描述所述智能合约包含的数据。
可选的,所述计算机编程语言包括:预设类型的语言或所述调用请求中指示类型的语言。
图8是一示例性实施例提供的一种设备的示意结构图。请参考图8,在硬件层面,该设备包括处理器802、内部总线804、网络接口806、内存808以及非易失性存储器810,当然还可能包括其他业务所需要的硬件。处理器802从非易失性存储器810中读取对应的计算机程序到内存808中然后运行,在逻辑层面上形成数据结构的更新装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。
请参考图9,在软件实施方式中,该数据结构的更新装置可以包括:
请求获取单元91,使区块链网络中的区块链节点获取针对智能合约的调用请求;
结构获取单元92,使所述区块链节点获取基于计算机编程语言的更新后数据结构;
请求响应单元93,响应于所述调用请求,使所述区块链节点运行所述智能合约包含的合约代码,所述合约代码用于对所述更新后数据结构进行解析,并表征为基于定义描述语言的更新后元数据,以对所述智能合约包含的更新前元数据进行更新。
可选的,所述智能合约包含的元数据用于描述所述智能合约包含的数据。
可选的,所述合约代码还用于:将所述更新前元数据对应的更新前数据结构与所述更新后数据结构进行比较,以校验所述更新后数据结构的合理性;其中,在所述更新后数据结构的合理性通过校验的情况下,所述更新后元数据被用于对所述更新前元数据进行更新。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或 非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以 被解释成为“在……时”或“当……时”或“响应于确定”。
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。

Claims (14)

  1. 一种数据结构的读取方法,包括:
    区块链网络中的区块链节点获取针对智能合约的调用请求;
    响应于所述调用请求,所述区块链节点运行所述智能合约包含的合约代码,以对所述智能合约包含的元数据所描述的数据结构进行解析,并通过计算机编程语言对所述数据结构进行表征;
    所述区块链节点将所述计算机编程语言表征的数据结构返回至所述调用请求的发起方。
  2. 根据权利要求1所述的方法,所述元数据用于描述所述智能合约包含的数据。
  3. 根据权利要求1所述的方法,所述计算机编程语言包括:预设类型的语言或所述调用请求中指示类型的语言。
  4. 一种数据结构的更新方法,包括:
    区块链网络中的区块链节点获取针对智能合约的调用请求;
    所述区块链节点获取基于计算机编程语言的更新后数据结构;
    响应于所述调用请求,所述区块链节点运行所述智能合约包含的合约代码,所述合约代码用于对所述更新后数据结构进行解析,并表征为基于定义描述语言的更新后元数据,以对所述智能合约包含的更新前元数据进行更新。
  5. 根据权利要求4所述的方法,所述智能合约包含的元数据用于描述所述智能合约包含的数据。
  6. 根据权利要求4所述的方法,所述合约代码还用于:将所述更新前元数据对应的更新前数据结构与所述更新后数据结构进行比较,以校验所述更新后数据结构的合理性;其中,在所述更新后数据结构的合理性通过校验的情况下,所述更新后元数据被用于对所述更新前元数据进行更新。
  7. 一种数据结构的读取装置,包括:
    获取单元,使区块链网络中的区块链节点获取针对智能合约的调用请求;
    响应单元,响应于所述调用请求,使所述区块链节点运行所述智能合约包含的合约代码,以对所述智能合约包含的元数据所描述的数据结构进行解析,并通过计算机编程语言对所述数据结构进行表征;
    返回单元,使所述区块链节点将所述计算机编程语言表征的数据结构返回至所述调用请求的发起方。
  8. 根据权利要求7所述的装置,所述元数据用于描述所述智能合约包含的数据。
  9. 根据权利要求7所述的装置,所述计算机编程语言包括:预设类型的语言或所述调用请求中指示类型的语言。
  10. 一种数据结构的更新装置,包括:
    请求获取单元,使区块链网络中的区块链节点获取针对智能合约的调用请求;
    结构获取单元,使所述区块链节点获取基于计算机编程语言的更新后数据结构;
    请求响应单元,响应于所述调用请求,使所述区块链节点运行所述智能合约包含的合约代码,所述合约代码用于对所述更新后数据结构进行解析,并表征为基于定义描述语言的更新后元数据,以对所述智能合约包含的更新前元数据进行更新。
  11. 根据权利要求10所述的装置,所述智能合约包含的元数据用于描述所述智能合约包含的数据。
  12. 根据权利要求10所述的装置,所述合约代码还用于:将所述更新前元数据对应的更新前数据结构与所述更新后数据结构进行比较,以校验所述更新后数据结构的合理性;其中,在所述更新后数据结构的合理性通过校验的情况下,所述更新后元数据被用于对所述更新前元数据进行更新。
  13. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为实现如权利要求1-3中任一项所述的数据结构的读取方法。
  14. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为实现如权利要求4-6中任一项所述的数据结构的更新方法。
PCT/CN2019/114608 2018-12-20 2019-10-31 数据结构的读取及更新方法、装置、电子设备 WO2020125224A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
SG11202100825UA SG11202100825UA (en) 2018-12-20 2019-10-31 Methods and apparatuses for reading and updating data structures, and electronic devices
EP19898287.8A EP3812917A4 (en) 2018-12-20 2019-10-31 DATA STRUCTURE READING PROCESS AND APPARATUS, DATA STRUCTURE UPDATE PROCESS AND APPARATUS AND ELECTRONIC DEVICE
US17/163,279 US11775507B2 (en) 2018-12-20 2021-01-29 Methods and apparatuses for reading and updating data structures, and electronic devices

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811565642.0A CN110032568B (zh) 2018-12-20 2018-12-20 数据结构的读取及更新方法、装置、电子设备
CN201811565642.0 2018-12-20

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/163,279 Continuation US11775507B2 (en) 2018-12-20 2021-01-29 Methods and apparatuses for reading and updating data structures, and electronic devices

Publications (1)

Publication Number Publication Date
WO2020125224A1 true WO2020125224A1 (zh) 2020-06-25

Family

ID=67235377

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114608 WO2020125224A1 (zh) 2018-12-20 2019-10-31 数据结构的读取及更新方法、装置、电子设备

Country Status (6)

Country Link
US (1) US11775507B2 (zh)
EP (1) EP3812917A4 (zh)
CN (1) CN110032568B (zh)
SG (1) SG11202100825UA (zh)
TW (1) TWI724570B (zh)
WO (1) WO2020125224A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032568B (zh) 2018-12-20 2020-05-12 阿里巴巴集团控股有限公司 数据结构的读取及更新方法、装置、电子设备
JP7314993B2 (ja) * 2019-05-31 2023-07-26 日本電気株式会社 データ管理方法、データ流通システム、コンピュータプログラム及び記録媒体
CN110602133B (zh) * 2019-09-20 2021-04-09 腾讯科技(深圳)有限公司 智能合约处理方法、区块链管理设备及存储介质
CN111221904A (zh) * 2019-12-23 2020-06-02 深圳壹账通智能科技有限公司 智能合约部署、执行方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107807991A (zh) * 2017-11-07 2018-03-16 泰康保险集团股份有限公司 用于处理区块链数据的方法及装置
CN107995270A (zh) * 2017-11-24 2018-05-04 成都赤乌软件技术有限公司 一种基于区块链实现分布式文件存储的方法
CN108052321A (zh) * 2017-12-28 2018-05-18 杭州趣链科技有限公司 一种基于配置信息自动生成区块链智能合约的方法
US20180293576A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. System for custom currency transaction based on blockchain and operating method thereof
CN110032568A (zh) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 数据结构的读取及更新方法、装置、电子设备
CN110032599A (zh) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 数据结构的读取及更新方法、装置、电子设备

Family Cites Families (52)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8296725B2 (en) * 2009-03-25 2012-10-23 International Business Machines Corporation Framework for variation oriented analysis for service-oriented architecture
US20140129526A1 (en) * 2012-11-06 2014-05-08 International Business Machines Corporation Verifying data structure consistency across computing environments
DK3011442T3 (da) * 2013-06-18 2021-01-04 Ciambella Ltd Fremgangsmåde og anordning til generering af et brugerdefineret softwareudviklingskit (sdk)
WO2016010748A1 (en) 2014-07-14 2016-01-21 Li-Cor, Inc. Analyte separator with electrohydrodynamic taylor cone jet blotter
US9323556B2 (en) * 2014-09-30 2016-04-26 Amazon Technologies, Inc. Programmatic event detection and message generation for requests to execute program code
US9916458B2 (en) * 2015-03-31 2018-03-13 EMC IP Holding Company LLC Secure cloud-based storage of data shared across file system objects and clients
US10255336B2 (en) * 2015-05-07 2019-04-09 Datometry, Inc. Method and system for transparent interoperability between applications and data management systems
US11488147B2 (en) * 2015-07-14 2022-11-01 Fmr Llc Computationally efficient transfer processing and auditing apparatuses, methods and systems
US11238220B1 (en) * 2015-11-13 2022-02-01 Wells Fargo Bank, N.A. Dynamic user interface framework
SG10202006900PA (en) 2015-12-22 2020-08-28 Financial & Risk Organisation Ltd Methods and systems for identity creation, verification and management
EP4369273A2 (en) * 2016-02-23 2024-05-15 nChain Licensing AG A method and system for securing computer software using a distributed hash table and a blockchain
GB201615745D0 (en) * 2016-09-15 2016-11-02 Gb Gas Holdings Ltd System for analysing data relationships to support query execution
KR102503799B1 (ko) * 2016-09-29 2023-02-23 코오롱인더스트리 주식회사 투명 전도성 필름의 제조방법
US11182851B2 (en) * 2016-10-20 2021-11-23 International Business Machines Corporation Inter-ledger messaging in a blockchain
US20180158050A1 (en) * 2016-12-06 2018-06-07 MonetaGo Inc. Centralized authority system and method
US10621150B2 (en) * 2017-03-05 2020-04-14 Jonathan Sean Callan System and method for enforcing the structure and content of databases synchronized over a distributed ledger
WO2018170504A1 (en) * 2017-03-17 2018-09-20 Labyrinth Research Llc Unified control of privacy-impacting devices
US10871948B1 (en) * 2017-03-30 2020-12-22 Wells Fargo Bank, N.A. Smart contract blockchain abstraction API
CN113435994A (zh) * 2017-03-31 2021-09-24 唐晓领 基于区块链的金融借贷多方共享交易元数据信息的方法、装置及系统
US11526955B2 (en) * 2017-05-30 2022-12-13 Entersekt International Limited Protocol-based system and method for establishing a multi-party contract
CA3065319A1 (en) * 2017-06-01 2018-12-06 Schvey, Inc. d/b/a/ Axoni Distributed privately subspaced blockchain data structures with secure access restriction management
CN107526624B (zh) * 2017-07-18 2020-12-08 杭州趣链科技有限公司 一种基于Java虚拟机的智能合约执行引擎
US10735202B2 (en) * 2017-07-24 2020-08-04 International Business Machines Corporation Anonymous consent and data sharing on a blockchain
US10452776B2 (en) * 2017-07-28 2019-10-22 International Business Machines Corporation Cognitive mediator for generating blockchain smart contracts
US11568505B2 (en) * 2017-10-18 2023-01-31 Docusign, Inc. System and method for a computing environment for verifiable execution of data-driven contracts
US11699201B2 (en) * 2017-11-01 2023-07-11 Docusign, Inc. System and method for blockchain-based network transitioned by a legal contract
EP3707855A1 (en) * 2017-11-09 2020-09-16 Nchain Holdings Limited System for securing verification key from alteration and verifying validity of a proof of correctness
CN107844294B (zh) * 2017-11-17 2020-05-19 杭州溪塔科技有限公司 一种高可用的合约执行方法及系统
US11227457B2 (en) * 2017-12-02 2022-01-18 International Business Machines Corporation Blockchain managed storage
US11222363B2 (en) * 2017-12-10 2022-01-11 International Business Machines Corporation Cognitive determination system connecting social network and blockchain network
US11386405B2 (en) * 2017-12-19 2022-07-12 International Business Machines Corporation Dynamic blockchain transactional policy management
US10701054B2 (en) * 2018-01-31 2020-06-30 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing super community and community sidechains with consent management for distributed ledger technologies in a cloud based computing environment
US20190236562A1 (en) * 2018-01-31 2019-08-01 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing document interface and collaboration using quipchain in a cloud based computing environment
WO2019161936A1 (en) * 2018-02-26 2019-08-29 Telefonaktiebolaget Lm Ericsson (Publ) Network slicing with smart contracts
US11379827B2 (en) * 2018-04-17 2022-07-05 Lendoit Technologies Israel Ltd. Smart contract executed within a blockchain
US11010403B2 (en) * 2018-04-24 2021-05-18 Microsoft Technology Licensing, Llc Relational distributed ledger for smart contracts
US10686799B2 (en) * 2018-04-30 2020-06-16 EMC IP Holding Company LLC Blockchain-based method and system for providing tenant security and compliance in a cloud computing environment
CN108694589A (zh) * 2018-05-08 2018-10-23 杭州佑他科技有限公司 一种基于区块链的资产监控方法
US11677542B2 (en) * 2018-05-17 2023-06-13 International Business Machines Corporation Ad-hoc smart contract generation in a blockchain
CN108664650B (zh) 2018-05-17 2020-05-22 百度在线网络技术(北京)有限公司 一种区块链网络的事务处理方法、装置、设备及存储介质
CN108769173B (zh) * 2018-05-21 2021-11-09 阿里体育有限公司 运行智能合约的区块链实现方法及设备
CN108718341B (zh) * 2018-05-30 2021-06-01 北京阿尔山区块链联盟科技有限公司 数据的共享和搜索的方法
US11159307B2 (en) * 2018-08-08 2021-10-26 International Business Machines Corporation Ad-hoc trusted groups on a blockchain
US20200074470A1 (en) * 2018-09-05 2020-03-05 International Business Machines Corporation Database configuration for asset transfers
US10855475B1 (en) * 2018-09-06 2020-12-01 Facebook, Inc. Systems and methods for securing data to an immutable distributed ledger
GB201816837D0 (en) * 2018-10-16 2018-11-28 Microsoft Technology Licensing Llc Database management
US11741239B2 (en) * 2018-10-17 2023-08-29 Omnitracs, Llc Blockchain-based hours-of-service system
US11182757B2 (en) * 2018-10-26 2021-11-23 Adobe Inc. Trusted transaction system for digital asset licensing
US20200160330A1 (en) * 2018-11-21 2020-05-21 TraDove, Inc. Lightweight blockchain supported transaction platform with proof-of-two consensus and centralized identification management
US11048593B2 (en) * 2018-11-28 2021-06-29 International Business Machines Corporation Data aggregation node for blockchain rollup
US11178151B2 (en) * 2018-12-19 2021-11-16 International Business Machines Corporation Decentralized database identity management system
US11035903B2 (en) * 2018-12-19 2021-06-15 International Business Machines Corporation Monitoring of batteries in blockchain networks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293576A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. System for custom currency transaction based on blockchain and operating method thereof
CN107807991A (zh) * 2017-11-07 2018-03-16 泰康保险集团股份有限公司 用于处理区块链数据的方法及装置
CN107995270A (zh) * 2017-11-24 2018-05-04 成都赤乌软件技术有限公司 一种基于区块链实现分布式文件存储的方法
CN108052321A (zh) * 2017-12-28 2018-05-18 杭州趣链科技有限公司 一种基于配置信息自动生成区块链智能合约的方法
CN110032568A (zh) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 数据结构的读取及更新方法、装置、电子设备
CN110032599A (zh) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 数据结构的读取及更新方法、装置、电子设备

Also Published As

Publication number Publication date
TWI724570B (zh) 2021-04-11
US20210256012A1 (en) 2021-08-19
CN110032568A (zh) 2019-07-19
CN110032568B (zh) 2020-05-12
SG11202100825UA (en) 2021-02-25
TW202030658A (zh) 2020-08-16
US11775507B2 (en) 2023-10-03
EP3812917A4 (en) 2021-10-06
EP3812917A1 (en) 2021-04-28

Similar Documents

Publication Publication Date Title
TWI722592B (zh) 資料結構的讀取及更新方法、裝置、電子設備
TWI706280B (zh) 資料讀寫方法及裝置、電子設備
CN110032598B (zh) 字段更新方法及装置、电子设备
WO2020125224A1 (zh) 数据结构的读取及更新方法、装置、电子设备
WO2020119287A1 (zh) 基于区块链的发票创建方法及装置、电子设备
TW201937436A (zh) 基於區塊鏈的交易執行方法及裝置、電子設備
TW202008196A (zh) 基於中心化結算與區塊鏈存證的交易方法及系統
TW202022754A (zh) 基於區塊鏈的發票創建方法及裝置、電子設備
US11615078B2 (en) Blockchain-based transaction methods
WO2022077186A1 (zh) 区块链中智能合约的执行方法及装置和电子设备
CN111033489B (zh) 用于数据遍历的方法和设备
US20210326485A1 (en) Demand trusted device-based data acquisition methods, apparatuses, and devices
WO2024021417A1 (zh) 数据账户创建方法及装置
CN115221559A (zh) 数据账户的访问授权方法及装置
CN115203746A (zh) 数据账户的访问授权方法及装置
US20200175037A1 (en) Obtaining blockchain data in stages
CN115098886A (zh) 智能合约的访问授权方法及装置
CN115640321A (zh) 数据查询方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19898287

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019898287

Country of ref document: EP

Effective date: 20210121

NENP Non-entry into the national phase

Ref country code: DE