WO2020125233A1 - 字段更新方法及装置、电子设备 - Google Patents

字段更新方法及装置、电子设备 Download PDF

Info

Publication number
WO2020125233A1
WO2020125233A1 PCT/CN2019/114975 CN2019114975W WO2020125233A1 WO 2020125233 A1 WO2020125233 A1 WO 2020125233A1 CN 2019114975 W CN2019114975 W CN 2019114975W WO 2020125233 A1 WO2020125233 A1 WO 2020125233A1
Authority
WO
WIPO (PCT)
Prior art keywords
field
data
smart contract
update
blockchain node
Prior art date
Application number
PCT/CN2019/114975
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 SG11202100955YA priority Critical patent/SG11202100955YA/en
Publication of WO2020125233A1 publication Critical patent/WO2020125233A1/zh
Priority to US17/159,054 priority patent/US20210149882A1/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
    • 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
    • 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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a field update method and device, and electronic equipment.
  • 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 field update method and apparatus, and electronic equipment.
  • a field update method including:
  • the blockchain node in the blockchain network obtains a field update request for the smart contract, and the field update request is used to update the field in the data set contained in the smart contract;
  • the blockchain node adjusts the metadata contained in the smart contract according to the field update request, so as to analyze the adjusted metadata through the code contained in the smart contract, so that the data in the data set Data update field.
  • a field update device including:
  • the first obtaining unit enables a blockchain node in the blockchain network to obtain a field update request for a smart contract, where the field update request is used to update the field in the data set contained in the smart contract;
  • the adjustment unit enables the blockchain node to adjust the metadata contained in the smart contract according to the field update request, so as to analyze the adjusted metadata through the code contained in the smart contract, so that the The data in the data set implements field updates.
  • an electronic device including:
  • Memory for storing processor executable instructions
  • the processor is configured to implement the field update method as described in any one of the above embodiments.
  • FIG. 1 is a flowchart of a field update method provided by an exemplary embodiment.
  • FIG. 2 is a schematic diagram of a data structure of a smart contract provided by an exemplary embodiment.
  • FIG. 3 is a schematic diagram of adding a new field provided by an exemplary embodiment.
  • FIG. 4 is a schematic diagram of deleting an existing field provided by an exemplary embodiment.
  • FIG. 5 is a schematic diagram of changing an existing field provided by an exemplary embodiment.
  • FIG. 6 is a schematic diagram of querying the balance of a blockchain provided by an exemplary embodiment.
  • FIG. 7 is a schematic structural diagram of an apparatus provided by an exemplary embodiment.
  • FIG. 8 is a block diagram of an apparatus for field update 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 field update 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 field update request for the smart contract, and the field update request is used to update the field in the data set contained in the smart contract.
  • the field update request can 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 field update request is It is confirmed as "targeting" the above-mentioned smart contract, so as to update the field of the data set 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 field update request in this specification can be carried in the above-mentioned generalized transaction, such as the data collection included in the smart contract from the account ID, phone number, ID number, and blockchain balance of various types of blockchain assets
  • the account data of the user is recorded in several aspects, and these account data are separately recorded in the corresponding fields.
  • the transaction is used to add a new field, or you can update one or more existing fields, such as modifying field attributes, deleting Fields etc.
  • 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 initiator of the field update request may include: a blockchain member in the blockchain network.
  • the role of blockchain members can be assumed by individuals, corporate organizations, platforms, etc., and the corresponding operations can be implemented in the blockchain network based on the role of "blockchain members", such as initiating the above-mentioned field update request.
  • the initiator of the field update request may include: another smart contract that is different from the smart contract.
  • a contract operation based on the other smart contract needs to update the fields in the data set of the smart contract during execution, so that the contract operation based on the other smart contract can initiate the above field update request to Implement the corresponding field update 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 the blockchain node adjusts the metadata contained in the smart contract according to the field update request, so as to analyze the adjusted metadata through the code contained in the smart contract, so that the data
  • the data in the collection implements field updates.
  • the blockchain node may read the input parameters included in the field update request, and the input parameters include the target object; wherein, the adjusted metadata is used to determine from the data set The field corresponding to the target object to delete the field corresponding to the target object.
  • the data collection in the smart contract is used to record the user’s holdings of the blockchain assets.
  • the holdings can include several aspects of information, such as records based on the following fields: account ID, phone number, ID card Number, balance of type A blockchain assets, balance of type B blockchain assets, total assets-RMB (that is, total assets after conversion to RMB), etc.; assume that for "holdings” it is no longer necessary to record "total assets -RMB", you can initiate the above field update request, and the above target object can include the name or logo of the field to be deleted to update the metadata contained in the smart contract, so that the metadata
  • the description removes the information related to the "total assets-RMB” field, so that after the code contained in the smart contract parses the metadata, the "total assets-RMB” field can be deleted, and the data corresponding to this field will be invalidated.
  • the blockchain node can read the input parameters included in the field update request, the input parameters include the target object and field attributes; wherein, the adjusted metadata is used to extract data from the data set
  • the field corresponding to the target object is determined in to update the attribute of the determined field to the field attribute.
  • the data collection in the smart contract is used to record the user’s holdings of the blockchain assets.
  • the holdings can include several aspects of information, such as records based on the following fields: account ID, phone number, ID card Number, the balance of type A blockchain assets, the balance of type B blockchain assets, total assets-RMB, etc.; suppose that you need to change "total assets-RMB” to "total assets-US dollars (that is, assets converted to US dollars Total)”, you can initiate the above field update request, the above target object can include the name or logo of the field to be deleted, etc., to update the metadata contained in the smart contract, so that the metadata on the data collection In the description, the original "Total Assets-RMB" field was changed to "Total Assets-USD” field. Of course, the calculation method of the value of this field needs to be updated synchronously.
  • the original "Total Assets-RMB” field needs to be The conversion ratio between the types of blockchain assets and RMB is calculated, and after the change, the conversion ratio between each type of blockchain assets and the US dollar needs to be calculated.
  • This calculation method can be described in the above field attributes
  • the relevant configuration can be completed in the above update operation of metadata, so that after the code contained in the smart contract parses the metadata, the "total assets-RMB" field can be completed to "total assets-US dollars" Changes.
  • the blockchain node can read the input parameters included in the field update request, the input parameters include field attributes; wherein, the adjusted metadata is used to add fields to the data set And set the attribute of the added field to the field attribute.
  • the data collection in the smart contract is used to record the user’s holdings of the blockchain assets.
  • the holdings can include several aspects of information, such as records based on the following fields: account ID, phone number, ID card Number, the balance of type A blockchain assets, the balance of type B blockchain assets, total assets-RMB, etc.; assuming that the "total assets-US dollars" field needs to be added, the above field update request can be initiated, and this field update request
  • the field attributes included in it can include the field name as "total assets-USD", the calculation method of the value of this field (involving the exchange ratio between various types of blockchain assets and USD, etc.), etc., and based on this
  • the metadata contained in the contract is updated so that the description of the metadata set for the data collection adds the content of the "total assets-US dollars” field, so that after the code contained in the smart contract parses the metadata, the "asset” can be completed Change from the "Total-RMB” field to "Total Asset-USD”.
  • the data set contains data of at least one user; the blockchain node may read input parameters included in the field update request, and the input parameters include information of the target user; wherein, after adjustment The metadata of is used to determine the data corresponding to the target user from the data set, so as to update the field corresponding to the data corresponding to the target user.
  • the field update request may be directed to all users in the data set or only to some users, which is not limited in this specification.
  • the one or more users are the target users, and the field corresponding to the target user can be updated, for example, for some users who hold X-type blockchain assets Add "Type X Blockchain Asset Balance" field, the value of this field is the corresponding user's holding amount of Type X Blockchain Asset.
  • the target user can add a field of “type X blockchain asset balance” for all users, for example, the value of this field is the corresponding user’s X The amount of type of blockchain assets held.
  • the field attribute can be included in the field update request, so that after adjusting for metadata, the relevant field can be added for the target user, and the attribute of the added field is set Set to the field attribute; of course, in addition to adding fields, you can also change or delete existing fields. For example, when you change an existing field, you can include the target object and field attributes in the field update request. When deleting an existing field, the target object can be included in the field update request, which will not be repeated here.
  • the blockchain node may parse the adjusted metadata by running the code included in the smart contract to update the field of the full amount of data in the data set based on the parsed result. For example, when a field update request needs to add a new field to the data of all users, or change or delete an existing field for the data of all users, the field update can be performed on the full amount of data (that is, the data of all users), so that all users The data has been added to the above new fields, or the data of all users have changed or deleted the above existing fields. Among them, after adjusting the metadata, the blockchain node can immediately or wait for the idle period to parse the adjusted metadata by executing the code to update the fields of the full amount of data.
  • the blockchain node obtains a data read and write request for the smart contract, and the data read and write request is used to read and write data to a target object in the data set; the area The block chain node parses the adjusted metadata by running the code contained in the smart contract, and the analysis result is used to determine the corresponding target data of the target object in the data set and perform a field on the target data Update to implement the data read-write operation on the target data after field update.
  • blockchain nodes do not need to actively update fields in the data set, but can generate data read and write requirements for one or more data in the data set (such as receiving corresponding Data read/write request), the field update is performed for the one or more pieces of data, such as adding related fields and their values, deleting related fields and their values, or modifying related fields and their values, etc.
  • the resource consumption of blockchain nodes can be greatly saved.
  • the smart contract has actually changed data
  • the blockchain node can issue the changed smart contract To the blockchain network, and broadcast to other blockchain nodes in the blockchain network, so that the smart contract is updated on the entire blockchain network.
  • FIG. 2 is a schematic structural diagram of a smart contract provided by an exemplary embodiment.
  • the smart contract may include a structure 201.
  • the structure 201 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.
  • the smart contract may include a structure 202.
  • the structure 202 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 203, such as a balance structure and a nonce structure in the related art, which are not limited in this specification. Among them, the smart contract can provide an API interface to the contract code in the structure 201 to the outside to implement the call to the contract code.
  • the field update scheme of this specification can be realized.
  • the following is a detailed description of the field update scheme based on this specification, taking the management operation for the blockchain balance as an example.
  • a smart contract S is recorded on the distributed ledger of the blockchain network, and the data (or data set) contained in the smart contract S is shown in Table 1 below, including the personal information (such as account ID, age, Address, etc.), as well as the various account holdings of various types of blockchain assets.
  • an anchor which is used to compare the blockchain assets on the blockchain network and the off-chain assets outside the blockchain network.
  • Anchor between them, so that off-chain assets can be converted into equivalent blockchain assets through anchor points, and blockchain assets can also be converted into equivalent off-chain assets through anchor points, thereby realizing blockchain assets and One-to-one mapping between off-chain assets.
  • an anchor releases a new type X blockchain asset in the blockchain network, and this type X blockchain asset did not originally exist in the data shown in Table 1, so it needs to The corresponding field is added to the data contained in the contract S, so as to be compatible with the situation when each user may hold the blockchain asset of this type X in the future.
  • FIG. 3 is a schematic diagram of adding a new field provided by an exemplary embodiment. As shown in Figure 3, the process of adding a new field may include the following steps:
  • Step 301 create a transaction.
  • anchor A needs to issue a blockchain asset of type X in the blockchain network, and that anchor A needs to add corresponding fields to the data contained in the above smart contract S to record the user’s The holding status of this type X of blockchain assets. Therefore, the anchor A can create a transaction for adding fields-equivalent to a field addition 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 anchor A.
  • the blockchain node G is usually the blockchain node closest to the anchor A. Of course, this specification does not limit this.
  • the data of the blockchain balance can be recorded in the storage structure of the smart contract S.
  • the smart contract S is created and published to the blockchain network, a consensus is reached among the various blockchain nodes in the blockchain network and recorded on each blockchain node, such as the above-mentioned blockchain node G The smart contract S is also recorded on it.
  • the above transaction may include the contract address and port information of the smart contract S, so that the blockchain node G can determine that the transaction needs to call the smart contract S based on the contract address, and include the smart contract S based on the port information.
  • the contract code is called to update the metadata and further add new fields to the data.
  • Step 302 the blockchain node G verifies the anchor A's data access authority to the blockchain balance.
  • the smart contract S can be set with data access permissions, similar to a whitelist or blacklist, to avoid random modification of metadata and prevent security risks such as blockchain balance and other data being tampered with.
  • data access permissions similar to a whitelist or blacklist
  • users with data access rights may be pre-agreed users; for example, when the blockchain network belongs to a consortium chain, users with data access rights may be members of the consortium. Therefore, when the blockchain node G obtains the transaction issued by the anchor A and determines that the transaction needs to update the metadata of the smart contract S, it can first determine whether the anchor A has the corresponding data access authority and has the data Continue to implement the next steps when accessing the authority, otherwise you can return a failure message.
  • Step 303 When the anchor A has the data access right, the blockchain node G calls the above-mentioned smart contract to update the metadata.
  • the anchor A may indicate the target user and the field attribute in the transaction to add a new field based on the field attribute to the target user.
  • the target user can be marked as " ALL”
  • the field attributes can include the field name, the exchange ratio between the X-type blockchain assets and other assets, for example, the field name can be “Balance-Type X (balance-type X)”, X-type area
  • the exchange ratio between blockchain assets and RMB can be "1:5".
  • Step 304 the blockchain node G parses the metadata and adds relevant fields to the data contained in the smart contract S.
  • balance-type X is also included.
  • step 305 the blockchain node G returns the processing result to the anchor A.
  • FIG. 4 is a schematic diagram of deleting an existing field provided by an exemplary embodiment. As shown in Figure 4, the process of deleting existing fields may include the following steps:
  • Step 401 create a transaction.
  • anchor A In an embodiment, assuming that anchor A terminates the issuance of a blockchain asset of type X in the blockchain network, and that the issued blockchain asset of type X has been cleared, the anchor A needs to be The corresponding field is deleted from the data contained in the contract S to stop recording the user's holding of this type X of blockchain assets. Therefore, the anchor A can create a transaction for deleting a field-equivalent to a field deletion 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 anchor A. The blockchain node G is usually the blockchain node closest to the anchor A. Of course, this specification does not limit this.
  • the above transaction may include the contract address and port information of the smart contract S, so that the blockchain node G can determine that the transaction needs to call the smart contract S based on the contract address and based on the port information.
  • the contract code contained in the smart contract S is called to update the metadata and further delete the existing fields in the data.
  • step 402 the blockchain node G verifies the anchor A's data access authority to the blockchain balance.
  • the data access authority of the blockchain node G can be verified, which will not be repeated here.
  • Step 403 When the anchor A has the data access right, the blockchain node G calls the above-mentioned smart contract to update the metadata.
  • the anchor point A may indicate the target object in the transaction, for example, the target object may be the field name "Balance-Type X (balance-type X)" to determine the corresponding field accordingly. And update the corresponding content in the metadata, for example, delete the content related to the "Balance-Type X" field.
  • Step 404 the blockchain node G parses the metadata and adds relevant fields to the data contained in the smart contract S.
  • the described content only includes The account ID, age, phone, balance-type A, balance-type B, total-RMB shown in Table 2 does not include balance-type X.
  • step 405 the blockchain node G returns the processing result to the anchor A.
  • the anchor point A may only need to delete the “Balance-Type X” field in the corresponding data of one or more users; for example, some users do not have the type X
  • anchor A can initiate the above transactions for these users, and blockchain node G can update the metadata contained in the smart contract S based on the transaction, so that the contract code contained in the smart contract S pairs
  • the data after the update time point can no longer be accessed. That is, it is equivalent to deleting the "Balance-Type X" field in the corresponding data of these users, so that the data of these users cannot be accessed after the update time point.
  • the data before the update time point since the corresponding metadata still exists on the blockchain ledger, it can still be accessed.
  • FIG. 5 is a schematic diagram of changing an existing field provided by an exemplary embodiment. As shown in Figure 5, the process of changing existing fields can include the following steps:
  • Step 501 create a transaction.
  • the above transaction may include the contract address and port information of the smart contract S, so that the blockchain node G can determine that the transaction needs to call the smart contract S based on the contract address and based on the port information.
  • the contract code contained in the smart contract S is called to update the metadata and further change the existing fields in the data.
  • the blockchain node G verifies the anchor A's data access authority to the blockchain balance.
  • the data access authority of the blockchain node G can be verified, which will not be repeated here.
  • Step 503 when the anchor A has the data access right, the blockchain node G calls the above-mentioned smart contract to update the metadata.
  • the anchor point A may indicate the target object and field attributes in the transaction, for example, the target object may be the field name "Total-RMB (total-RMB)" to determine the corresponding field accordingly ,
  • the field attributes can include the field name as "Total-Dollar (total-USD)", the calculation method of the total amount of USD (related to the exchange ratio between various types of blockchain assets and USD), etc.
  • the corresponding content in the data is updated, for example, the content related to the "Total-RMB" field is changed to the content related to the "Total-Dollar” field.
  • Step 504 The blockchain node G parses the metadata and changes the relevant fields of the data contained in the smart contract S.
  • the described content includes not only the above
  • the account ID, age, phone, balance-type A, balance-type B and other fields shown in Table 1 are also changed from the total-RMB field to the total-USD field.
  • step 505 the blockchain node G returns the processing result to the anchor A.
  • anchor point A may only need to change the "Total-RMB” field in some (one or more) user correspondence data; for example, some users request anchor point A "Calculate the blockchain assets it holds.
  • Anchor A can initiate these transactions for these users, and blockchain node G can update the metadata contained in the smart contract S based on the transaction, so that the smart contract S contains
  • the "Total-RMB (total-RMB)" field in the corresponding data of these users was changed to the "Total-Dollar (total-USD)” field, while other users still You can use "RMB” to calculate the blockchain assets it holds.
  • the blockchain node G may synchronously implement the update of the metadata contained in the smart contract A Operations, field update operations for the data contained in the smart contract S, for example, after completing the update of the metadata, the updated metadata can be parsed immediately through the contract code contained in the smart contract S, so that the smart contract The data contained in S can be updated with relevant fields.
  • the blockchain node G may only focus on the update operation for metadata, and the field update operation on the data may be implemented asynchronously.
  • FIG. 6 is a schematic diagram of querying the balance of a blockchain provided by an exemplary embodiment. As shown in Figure 6, the process of querying the blockchain balance can include the following steps:
  • Step 601 create a transaction.
  • the above transaction may include the contract address and port information of the smart contract S, so that the blockchain node H can determine that the transaction needs to call the smart contract S based on the contract address and based on the port information.
  • the contract code contained in the smart contract S is called to implement operations such as querying the balance of the blockchain.
  • Step 602 the blockchain node H verifies the user B's data access authority to the blockchain balance.
  • Step 603 when the user B has the data access right, the blockchain node H calls the above-mentioned smart contract to update the field.
  • user B may indicate the relevant information of the blockchain balance to be queried in the transaction; for example, when user B wishes to query his own blockchain balance, the relevant information may include user B’s Account ID, asset type, etc.
  • the blockchain node H invokes the contract code in the code structure in the smart contract S, so that after the contract code is executed, it can be used to parse the metadata in the storage structure in the smart contract S to determine the corresponding The storage field of the above-mentioned related information noted in the transaction.
  • the data recorded in the smart contract S originally adopts the structure shown in Table 1, including the personal information (such as account ID, age, address, etc.) of the user to which each account belongs, and the data held by each account The balance of blockchain assets, the total amount of all blockchain balances converted into RMB, etc. Then, after the embodiment shown in FIG. 5, the data contained in the smart contract S still temporarily adopts the structure shown in Table 1; however, since the metadata contained in the smart contract S is updated in the embodiment shown in FIG.
  • Step 604 the blockchain node H returns the queried balance to the user B.
  • the balance returned by blockchain node H is "1999.1696 "US dollars” instead of "13,000 yuan" before the field change.
  • the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710. Of course, it may include hardware required for other services.
  • the processor 702 reads the corresponding computer program from the non-volatile memory 710 into the memory 708 and then runs it to form a field 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 field update device may include:
  • the first obtaining unit 81 enables a blockchain node in the blockchain network to obtain a field update request for a smart contract, where the field update request is used to update the field in the data set contained in the smart contract;
  • the adjustment unit 82 causes the blockchain node to adjust the metadata contained in the smart contract according to the field update request, so as to analyze the adjusted metadata through the code included in the smart contract, so that all The data in the data set realizes field update.
  • Optional also includes:
  • the first reading unit 83 causes the blockchain node to read the input parameters included in the field update request, the input parameters including the target object;
  • the adjusted metadata is used to determine the field corresponding to the target object from the data set to delete the field corresponding to the target object.
  • Optional also includes:
  • the second reading unit 84 causes the blockchain node to read the input parameters included in the field update request, the input parameters including the target object and field attributes;
  • the adjusted metadata is used to determine the field corresponding to the target object from the data set, so as to update the attribute of the determined field to the field attribute.
  • Optional also includes:
  • the third reading unit 85 causes the blockchain node to read the input parameters included in the field update request, the input parameters including field attributes;
  • the adjusted metadata is used to add a field in the data set, and set the attribute of the added field to the field attribute.
  • the data set includes data of at least one user; the device further includes:
  • the fourth reading unit 86 causes the blockchain node to read the input parameters included in the field update request, the input parameters including information of the target user;
  • the adjusted metadata is used to determine the data corresponding to the target user from the data set, so as to update the field corresponding to the data corresponding to the target user.
  • Optional also includes:
  • the first parsing unit 87 causes the blockchain node to parse the adjusted metadata by running the code included in the smart contract, so as to update the field of the full amount of data in the data set based on the parsing result.
  • Optional also includes:
  • the second obtaining unit 88 enables the blockchain node to obtain a data read and write request for the smart contract, and the data read and write request is used to read and write data to a target object in the data set;
  • the second parsing unit 89 enables the blockchain node to parse the adjusted metadata by running the code contained in the smart contract, and the parsing result is used to determine the corresponding of the target object in the data set Target data, performing field update on the target data to implement the data read-write operation on the target data after field update.
  • 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
  • the memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in a computer-readable medium, 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 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 may be interpreted as "when” or “when” or “in response to a determination”.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种字段更新方法及装置、电子设备,该方法可以包括:区块链网络中的区块链节点获取针对智能合约的字段更新请求,所述字段更新请求用于对所述智能合约包含的数据集合中的数据进行字段更新(102);所述区块链节点根据所述字段更新请求,对所述智能合约包含的元数据进行调整,以通过所述智能合约包含的代码对调整后的元数据的解析,使所述数据集合中的数据实现字段更新(104)。

Description

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

Claims (15)

  1. 一种字段更新方法,包括:
    区块链网络中的区块链节点获取针对智能合约的字段更新请求,所述字段更新请求用于对所述智能合约包含的数据集合中的数据进行字段更新;
    所述区块链节点根据所述字段更新请求,对所述智能合约包含的元数据进行调整,以通过所述智能合约包含的代码对调整后的元数据的解析,使所述数据集合中的数据实现字段更新。
  2. 根据权利要求1所述的方法,还包括:
    所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括目标对象;
    其中,调整后的元数据用于从所述数据集合中确定出对应于所述目标对象的字段,以删除对应于所述目标对象的字段。
  3. 根据权利要求1所述的方法,还包括:
    所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括目标对象和字段属性;
    其中,调整后的元数据用于从所述数据集合中确定出对应于所述目标对象的字段,以将确定出的字段的属性更新为所述字段属性。
  4. 根据权利要求1所述的方法,还包括:
    所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括字段属性;
    其中,调整后的元数据用于在所述数据集合中添加字段,并将添加的字段的属性设定为所述字段属性。
  5. 根据权利要求1所述的方法,所述数据集合包含至少一个用户的数据;所述方法还包括:
    所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括目标用户的信息;
    其中,调整后的元数据用于从所述数据集合中确定出所述目标用户对应的数据,以对所述目标用户对应的数据进行字段更新。
  6. 根据权利要求1所述的方法,还包括:
    所述区块链节点通过运行所述智能合约包含的代码对所述调整后的元数据进行解析,以基于解析结果对所述数据集合的全量数据进行字段更新。
  7. 根据权利要求1所述的方法,还包括:
    所述区块链节点获取针对所述智能合约的数据读写请求,所述数据读写请求用于对所述数据集合中的目标对象进行数据读写操作;
    所述区块链节点通过运行所述智能合约包含的代码对所述调整后的元数据进行解析,解析结果用于确定所述目标对象在所述数据集合中对应的目标数据、对所述目标数据进行字段更新,以对字段更新后的所述目标数据实施所述数据读写操作。
  8. 一种字段更新装置,包括:
    第一获取单元,使区块链网络中的区块链节点获取针对智能合约的字段更新请求,所述字段更新请求用于对所述智能合约包含的数据集合中的数据进行字段更新;
    调整单元,使所述区块链节点根据所述字段更新请求,对所述智能合约包含的元数据进行调整,以通过所述智能合约包含的代码对调整后的元数据的解析,使所述数据集合中的数据实现字段更新。
  9. 根据权利要求8所述的装置,还包括:
    第一读取单元,使所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括目标对象;
    其中,调整后的元数据用于从所述数据集合中确定出对应于所述目标对象的字段,以删除对应于所述目标对象的字段。
  10. 根据权利要求8所述的装置,还包括:
    第二读取单元,使所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括目标对象和字段属性;
    其中,调整后的元数据用于从所述数据集合中确定出对应于所述目标对象的字段,以将确定出的字段的属性更新为所述字段属性。
  11. 根据权利要求8所述的装置,还包括:
    第三读取单元,使所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括字段属性;
    其中,调整后的元数据用于在所述数据集合中添加字段,并将添加的字段的属性设定为所述字段属性。
  12. 根据权利要求8所述的装置,所述数据集合包含至少一个用户的数据;所述装置还包括:
    第四读取单元,使所述区块链节点读取所述字段更新请求包含的输入参数,所述输入参数包括目标用户的信息;
    其中,调整后的元数据用于从所述数据集合中确定出所述目标用户对应的数据,以对所述目标用户对应的数据进行字段更新。
  13. 根据权利要求8所述的装置,还包括:
    第一解析单元,使所述区块链节点通过运行所述智能合约包含的代码对所述调整后的元数据进行解析,以基于解析结果对所述数据集合的全量数据进行字段更新。
  14. 根据权利要求8所述的装置,还包括:
    第二获取单元,使所述区块链节点获取针对所述智能合约的数据读写请求,所述数据读写请求用于对所述数据集合中的目标对象进行数据读写操作;
    第二解析单元,使所述区块链节点通过运行所述智能合约包含的代码对所述调整后的元数据进行解析,解析结果用于确定所述目标对象在所述数据集合中对应的目标数据、对所述目标数据进行字段更新,以对字段更新后的所述目标数据实施所述数据读写操作。
  15. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为实现如权利要求1-7中任一项所述的字段更新方法。
PCT/CN2019/114975 2018-12-20 2019-11-01 字段更新方法及装置、电子设备 WO2020125233A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
SG11202100955YA SG11202100955YA (en) 2018-12-20 2019-11-01 Field update method and apparatus, and electronic device
US17/159,054 US20210149882A1 (en) 2018-12-20 2021-01-26 Field update method and apparatus, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811564469.2A CN110032598B (zh) 2018-12-20 2018-12-20 字段更新方法及装置、电子设备
CN201811564469.2 2018-12-20

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/159,054 Continuation US20210149882A1 (en) 2018-12-20 2021-01-26 Field update method and apparatus, and electronic device

Publications (1)

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

Family

ID=67235375

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114975 WO2020125233A1 (zh) 2018-12-20 2019-11-01 字段更新方法及装置、电子设备

Country Status (5)

Country Link
US (1) US20210149882A1 (zh)
CN (1) CN110032598B (zh)
SG (1) SG11202100955YA (zh)
TW (1) TW202025057A (zh)
WO (1) WO2020125233A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360883A (zh) * 2021-06-10 2021-09-07 网易(杭州)网络有限公司 一种智能合约的处理方法、装置、计算机设备及存储介质
CN116560697A (zh) * 2023-07-06 2023-08-08 上海鉴智其迹科技有限公司 Dbc数据库同步方法、装置、电子设备及可读存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898139B (zh) * 2018-12-20 2024-04-16 创新先进技术有限公司 数据读写方法及装置、电子设备
CN110032598B (zh) * 2018-12-20 2020-05-12 阿里巴巴集团控股有限公司 字段更新方法及装置、电子设备
CN110457318A (zh) * 2019-07-24 2019-11-15 深圳壹账通智能科技有限公司 区块链中数据字段的更新方法、装置、介质、电子设备
TWI724667B (zh) * 2019-12-03 2021-04-11 臺灣銀行股份有限公司 身份管理與授權系統及其方法
CN113570459A (zh) * 2020-10-20 2021-10-29 支付宝(杭州)信息技术有限公司 一种区块链数据的删除方法和装置
CN112783871A (zh) * 2021-03-16 2021-05-11 广东核电合营有限公司 标牌数据处理方法、装置、计算机设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107016548A (zh) * 2016-12-09 2017-08-04 阿里巴巴集团控股有限公司 客户***、信息处理方法和读写方法及装置
CN108052321A (zh) * 2017-12-28 2018-05-18 杭州趣链科技有限公司 一种基于配置信息自动生成区块链智能合约的方法
US20180205558A1 (en) * 2015-01-23 2018-07-19 Daniel Robert Ferrin Method and apparatus for the limitation of the mining of blocks on a block chain
CN108664650A (zh) * 2018-05-17 2018-10-16 百度在线网络技术(北京)有限公司 一种区块链网络的事务处理方法、装置、设备及存储介质
CN108833398A (zh) * 2018-06-08 2018-11-16 浙江超脑时空科技有限公司 一种区块链智能合约更新方法、装置及设备
CN110032598A (zh) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 字段更新方法及装置、电子设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045912A (zh) * 2015-08-13 2015-11-11 浪潮通用软件有限公司 一种关系型数据库数据分发的方法
CN116934328A (zh) * 2016-02-23 2023-10-24 区块链控股有限公司 用于经由区块链控制资产有关的动作的***及方法
CN107122364B (zh) * 2016-02-25 2021-05-18 华为技术有限公司 数据操作方法和数据管理服务器
CN108073625B (zh) * 2016-11-14 2021-03-30 北京京东尚科信息技术有限公司 用于元数据信息管理的***及方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180205558A1 (en) * 2015-01-23 2018-07-19 Daniel Robert Ferrin Method and apparatus for the limitation of the mining of blocks on a block chain
CN107016548A (zh) * 2016-12-09 2017-08-04 阿里巴巴集团控股有限公司 客户***、信息处理方法和读写方法及装置
CN108052321A (zh) * 2017-12-28 2018-05-18 杭州趣链科技有限公司 一种基于配置信息自动生成区块链智能合约的方法
CN108664650A (zh) * 2018-05-17 2018-10-16 百度在线网络技术(北京)有限公司 一种区块链网络的事务处理方法、装置、设备及存储介质
CN108833398A (zh) * 2018-06-08 2018-11-16 浙江超脑时空科技有限公司 一种区块链智能合约更新方法、装置及设备
CN110032598A (zh) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 字段更新方法及装置、电子设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360883A (zh) * 2021-06-10 2021-09-07 网易(杭州)网络有限公司 一种智能合约的处理方法、装置、计算机设备及存储介质
CN113360883B (zh) * 2021-06-10 2023-07-11 网易(杭州)网络有限公司 一种智能合约的处理方法、装置、计算机设备及存储介质
CN116560697A (zh) * 2023-07-06 2023-08-08 上海鉴智其迹科技有限公司 Dbc数据库同步方法、装置、电子设备及可读存储介质
CN116560697B (zh) * 2023-07-06 2023-09-15 上海鉴智其迹科技有限公司 Dbc数据库同步方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
TW202025057A (zh) 2020-07-01
CN110032598A (zh) 2019-07-19
SG11202100955YA (en) 2021-02-25
US20210149882A1 (en) 2021-05-20
CN110032598B (zh) 2020-05-12

Similar Documents

Publication Publication Date Title
WO2020125233A1 (zh) 字段更新方法及装置、电子设备
WO2020125222A1 (zh) 数据读写方法及装置、电子设备
TWI712976B (zh) 資產管理系統、方法及裝置、電子設備
WO2020125219A1 (zh) 数据结构的读取及更新方法、装置、电子设备
TWI684105B (zh) 區塊鏈系統、資料儲存方法及裝置
US10255108B2 (en) Parallel execution of blockchain transactions
WO2020119287A1 (zh) 基于区块链的***创建方法及装置、电子设备
TW202008196A (zh) 基於中心化結算與區塊鏈存證的交易方法及系統
US11615078B2 (en) Blockchain-based transaction methods
US20170213209A1 (en) Enterprise blockchains and transactional systems
TW202008235A (zh) 基於中心化結算與區塊鏈存證的交易方法及系統
TW202022754A (zh) 基於區塊鏈的***創建方法及裝置、電子設備
WO2020125224A1 (zh) 数据结构的读取及更新方法、装置、电子设备
WO2022077186A1 (zh) 区块链中智能合约的执行方法及装置和电子设备
TW202004597A (zh) 基於區塊鏈的虛擬資源交付、群眾募資方法及裝置
WO2020108054A1 (zh) 一种基于多个区块链网络的数据存证方法及***
WO2024021417A1 (zh) 数据账户创建方法及装置
WO2020108056A1 (zh) 一种业务执行方法及装置
WO2023045575A1 (zh) 区块链中的权限管控
WO2020108055A1 (zh) 一种基于多个区块链网络的数据读取方法及***
US10726049B2 (en) Obtaining blockchain data in stages

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: 19899963

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19899963

Country of ref document: EP

Kind code of ref document: A1