Systems and methods for updating data in a blockchain
By using Blockchain as a Service (BaaS) and Key Management System (KMS) on the server side, the problems of wasted computing resources and security risks in blockchain data updates are solved, improving the operational efficiency and security of the blockchain and enabling more efficient and secure blockchain access.
Patent Information
- Application Number
- CN202310848160.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-28
- Publication Date
- 2026-08-04
- Estimated Expiration
- 2039-06-28
AI Technical Summary
Existing blockchain systems suffer from wasted computing resources, excessive client storage and security burdens during data updates, low transaction efficiency, and susceptibility to minor errors, leading to security vulnerabilities.
By providing Blockchain as a Service (BaaS) on the server side, the client sends data update requests to the server, which processes and signs blockchain transactions in batches, reducing the client's storage and security burden. It uses a Key Management System (KMS) to manage private keys to ensure security and performs signing operations in a Trusted Execution Environment (TEE).
It improves the efficiency of blockchain operations, reduces network computing power consumption, lowers the storage and security burden on clients, enhances the security and stability of the system, expands the availability of the blockchain, and enables safer, faster, and more efficient blockchain access.
Smart Images

Figure CN116932564B_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to systems and methods for updating data in a blockchain. Background Technology
[0002] Blockchain provides decentralized data storage by storing data in a series of sequentially related data blocks. The chain of blocks is maintained and updated by a network of blockchain nodes, which are also responsible for verifying the data under a consensus mechanism. The stored data can include many data types, such as financial transactions between parties, historical access information, etc.
[0003] Many blockchains (such as the Ethereum blockchain) have enabled blockchain contracts (also known as smart contracts) executed through blockchain transactions. A blockchain transaction is a signed message initiated by an externally owned account (such as a blockchain account), transmitted by the blockchain network, and recorded in the blockchain. Blockchain contracts can be written to implement various functions, such as adding data to a blockchain account, modifying data in the blockchain, etc. Therefore, the blockchain can be maintained and updated by executing various blockchain transactions.
[0004] In existing blockchain schemes, each blockchain node needs to execute various blockchain transactions to maintain the blockchain. After consensus is reached, all blockchain nodes need to execute the same transactions in an agreed-upon order to keep local copies of the blockchain synchronized. Because each execution requires a significant amount of computing power, redundant calculations consume substantial computational resources. As the complexity of blockchain transaction algorithms increases, redundancy issues become even more pronounced. Furthermore, since most blockchain transactions are constructed to meet individual needs and do not consider other concurrently executing blockchain transactions, their execution efficiency is very low.
[0005] For example, to update blockchain data, the client retrieves each local account and its corresponding locally maintained private key. Within the same local environment, the client signs the local account's blockchain transactions using the local account's private key. The client then sends the signed blockchain transaction for execution on the blockchain. Thus, blockchain transactions are executed one at a time. Furthermore, the client must store and manage the local account's blockchain address and public / private keys, placing a burden on the client in terms of storage and security. Moreover, because blockchain transactions are independently written by the client in a closed environment, even minor errors can cause the entire blockchain transaction execution to fail, potentially leading to significant financial losses. Without continuous resource investment, the security protocols maintained by the client may become outdated, expired, or vulnerable, potentially causing security vulnerabilities in the blockchain system. Summary of the Invention
[0006] Various embodiments described herein include, but are not limited to, systems, methods, and non-transitory computer-readable media for updating data in a blockchain.
[0007] According to some embodiments, a computer-implemented method for updating data in a blockchain includes: obtaining one or more requests for updating multiple pieces of data in one or more blockchains; and updating the multiple pieces of data in the one or more blockchains.
[0008] In some embodiments, obtaining the one or more requests for updating the plurality of data in the one or more blockchains includes: obtaining the one or more requests for correspondingly updating the plurality of data in a plurality of blockchains associated with a local account; and updating the plurality of data in the one or more blockchains includes: correspondingly batch updating the plurality of data in the plurality of blockchains.
[0009] In some embodiments, obtaining the one or more requests for updating the plurality of data in the one or more blockchains includes: obtaining the one or more requests for correspondingly updating the plurality of data in a blockchain associated with a plurality of local accounts; and updating the plurality of data in the one or more blockchains includes: batch updating the plurality of data in a blockchain.
[0010] In some embodiments, obtaining the one or more requests for updating the plurality of data in the one or more blockchains includes: obtaining the one or more requests for correspondingly updating the plurality of data in a plurality of blockchains associated with a plurality of local accounts; and updating the plurality of data in the one or more blockchains includes: correspondingly batch updating the plurality of data in the plurality of blockchains.
[0011] In some embodiments, obtaining one or more requests for updating the plurality of data in one or more blockchains includes: obtaining one or more local accounts, one or more unsigned blockchain transactions to be executed to correspondingly update the plurality of data associated with the one or more local accounts, information about the plurality of data, and one or more identifiers of the one or more blockchains corresponding to the one or more blockchain transactions; and the information about the plurality of data includes: new data to be added to the one or more blockchains or changes to existing data in the one or more blockchains.
[0012] In some embodiments, updating the multiple data entries of the one or more blockchains includes: obtaining one or more blockchain addresses associated with the one or more local accounts and one or more private keys correspondingly associated with the one or more blockchain addresses; updating the one or more unsigned blockchain transactions correspondingly based on the one or more blockchain addresses; signing the one or more updated blockchain transactions correspondingly using the one or more private keys; and sending the signed one or more blockchain transactions to one or more blockchain nodes of the one or more blockchains for execution.
[0013] In some embodiments, sending the signed one or more blockchain transactions to the one or more blockchain nodes for execution includes: constructing a main blockchain transaction that includes the signed one or more blockchain transactions; and sending the main blockchain transaction to the one or more blockchain nodes of the one or more blockchains for execution based on the one or more identifiers of the one or more blockchains.
[0014] In some embodiments, obtaining the one or more requests for updating the plurality of data in the one or more blockchains includes: obtaining the one or more requests for updating the plurality of data in the one or more blockchains from a client; and the client does not store (1) the one or more blockchain addresses associated with the one or more local accounts and / or (2) the one or more private keys associated with the one or more blockchain addresses.
[0015] In some embodiments, obtaining the one or more private keys correspondingly associated with the one or more blockchain addresses includes: retrieving the one or more private keys in encrypted form; updating the one or more unsigned blockchain transactions correspondingly based on the one or more blockchain addresses includes: adding the one or more blockchain addresses correspondingly to the one or more unsigned blockchain transactions; and signing the one or more updated blockchain transactions correspondingly using the one or more private keys includes: decrypting the retrieved one or more private keys in encrypted form and signing the one or more updated blockchain transactions correspondingly using the decrypted one or more private keys.
[0016] In some embodiments, retrieving the one or more private keys in the encrypted form includes: retrieving the one or more private keys in the encrypted form from a key management system (KMS) based on one or more KMS directories in one or more mapping relationships; the one or more mapping relationships associating the one or more local accounts with the one or more blockchain addresses and the one or more KMS directories; and the one or more KMS directories linking to the one or more private keys in the encrypted form.
[0017] In some embodiments, decrypting one or more private keys in the retrieved encrypted form and signing one or more updated blockchain transactions accordingly using the one or more private keys in the decrypted form includes: in a Trusted Execution Environment (TEE), decrypting one or more private keys in the retrieved encrypted form and signing one or more updated blockchain transactions accordingly using the one or more private keys in the decrypted form.
[0018] In some embodiments, obtaining the one or more requests for updating the plurality of data in the one or more blockchains includes: obtaining the one or more requests for updating the plurality of data in the one or more blockchains from a client in accordance with the Light Directory Access Protocol (LDAP).
[0019] According to some embodiments, a system for updating data in a blockchain includes: one or more processors and one or more computer-readable storage devices coupled to the one or more processors and storing instructions thereon, the instructions being executable by the one or more processors to perform any of the methods described in the foregoing embodiments.
[0020] According to some embodiments, an apparatus for updating data in a blockchain includes multiple modules for performing the method described in any of the foregoing embodiments.
[0021] According to some embodiments, a non-transitory computer-readable medium storing instructions that, when executed by a processor of a device, cause the device to perform any of the methods described in the foregoing embodiments.
[0022] According to other embodiments, a system for updating data in a blockchain includes: one or more processors and one or more non-transitory computer-readable storage devices coupled to the one or more processors and configured with instructions that can be executed by the one or more processors to cause the system to perform operations including: obtaining one or more requests for updating multiple pieces of data in one or more blockchains; and updating the multiple pieces of data in the one or more blockchains.
[0023] According to other embodiments, a computer-readable storage medium for updating data in a blockchain is configured with instructions executable by the one or more processors to cause the one or more processors to perform operations including: obtaining one or more requests for updating multiple pieces of data in one or more blockchains; and updating the multiple pieces of data in the one or more blockchains.
[0024] According to other embodiments, an apparatus for updating data in a blockchain may include: an obtaining module for obtaining one or more requests for updating multiple pieces of data in one or more blockchains, and an updating module for updating the multiple pieces of data in the one or more blockchains.
[0025] The disclosed embodiments have one or more technical effects. By centralizing blockchain data updates (e.g., adding, removing, or modifying blockchain data), the disclosed embodiments can save network computing power, reduce the storage and security burden on clients (e.g., client systems or devices), and improve the efficiency of blockchain operations. In some embodiments, the server can provide Blockchain-as-a-Service (BaaS) or similar services to various clients, and client requests for adding or modifying blockchain data can be routed to the server. These requests can be batch-processed for one or more different blockchains for one or more local accounts. Many similar requests can be compiled and executed in a single blockchain transaction or a small number of blockchain transactions to reduce redundant execution on the virtual machine for individually fulfilling requests by executing a single blockchain transaction. Thus, overall network computing power is saved. Furthermore, batch processing is enabled for multiple blockchain data updates by multiple users in multiple blockchains. Thus, the efficiency of blockchain data updates is improved. In addition, common algorithms such as encryption / decryption, data analysis, task flow, and state storage can be efficiently managed by the server and can be efficiently invoked for each batch of blockchain data updates. Thus, the maintenance and execution of redundant algorithms are reduced. Because the server-side oversight of the operation scheme and ensures system security, the storage and security burden on the client is reduced or eliminated. Therefore, by utilizing the disclosed system and methods, the efficiency, stability, and security of the blockchain are significantly improved. Furthermore, existing users on the client side can interact with the blockchain simply by connecting to the server-side 118. Thus, the availability of the blockchain is expanded without increasing the burden on the client. As a result, clients can access the blockchain in a more secure, faster, simpler, and more efficient manner.
[0026] These and other features of the systems, methods, and non-transitory computer-readable media disclosed herein, as well as the functionality of the elements of the operating methods and related structures, and the economics of the combination of components and manufacture, will become more apparent upon consideration of the following description and appended claims with reference to the accompanying drawings. All these drawings form part of this specification, wherein like reference numerals denote corresponding parts in the respective drawings. However, it should be clearly understood that the drawings are for illustrative and descriptive purposes only and are not restrictive. Attached Figure Description
[0027] Figure 1 An environment for updating data in a blockchain, according to some embodiments, is shown.
[0028] Figure 2 A framework for implementing blockchain transactions is shown according to some embodiments.
[0029] Figure 3 A flowchart of a method for updating data in a blockchain, according to some embodiments, is shown.
[0030] Figure 4 and Figure 5 A flowchart of a method for updating data in a blockchain, according to some embodiments, is shown.
[0031] Figure 6 A block diagram of an apparatus for updating data in a blockchain, according to some embodiments, is shown.
[0032] Figure 7 A block diagram of a computer system that can implement any of the embodiments described herein is shown. Detailed Implementation
[0033] Figure 1 An environment 100 for updating data in a blockchain, according to some embodiments, is illustrated. As shown, in environment 100, client 111 may be coupled to server 118, and server 118 and node B may be coupled to blockchain system 112 via various communication networks. Similarly, server 118 may optionally be coupled to more blockchain systems similar to blockchain system 112, such as blockchain system 113, blockchain system 114, etc. Each blockchain system may maintain one or more blockchains. Each blockchain may correspond to a unique blockchain ID.
[0034] In some embodiments, client 111 may include one or more servers (e.g., node C) and one or more other computing devices (e.g., nodes A1, A2, and A3). Nodes A1, A2, and A3 may be coupled to node C. In some embodiments, node C may be implemented by an entity (e.g., a website, mobile application, organization, company, or enterprise) with various local accounts (local accounts evaluated from nodes A1, A2, and A3). For example, a mobile application may have millions of end users accessing the application's server from their respective user accounts. The application's server may accordingly store millions of user accounts. The components of client 111 and their arrangement may have many other configurations.
[0035] In some embodiments, node B may include a light node. A light node may not be able to download the entire blockchain, but may only download the block headers to verify the authenticity of blockchain transactions. Light nodes can be served by full nodes (e.g., blockchain nodes in blockchain system 112) and effectively rely on full nodes to access more of the blockchain's functionality. Light nodes can be implemented in electronic devices such as laptops, mobile phones, etc., by installing appropriate software.
[0036] In some embodiments, more clients similar to client 111 may be coupled to server 118. Server 118 can provide Blockchain as a Service (BaaS) and is referred to as a BaaS endpoint. In one embodiment, BaaS is a cloud service model in which clients or developers outsource the behind-the-scenes aspects of web or mobile applications. BaaS can provide pre-written software for activities occurring on the blockchain, such as user authentication, database management, and remote updates. The BaaS endpoint can be implemented in a server, server cluster, or other device. In one embodiment, the BaaS endpoint provides enterprise-grade platform services based on blockchain technology. This service helps clients build secure and stable blockchain environments and easily manage the deployment, operation, maintenance, and development of the blockchain. The service features high security, high stability, ease of use, and openness and sharing. Based on rich cloud security policies and multi-tenant isolation, the BaaS endpoint can provide advanced security protection using chip encryption technology. Based on highly reliable data storage, this service provides end-to-end and highly available services that can be rapidly scaled without interruption. The BaaS endpoint can provide enhanced management capabilities to help clients build enterprise-grade blockchain network environments. BaaS can provide native support for standard blockchain applications and data, supporting mainstream open-source blockchain technologies such as Hyperledger Fabric and Enterprise Ethereum-Quorum, in order to build an open and inclusive technology ecosystem.
[0037] In some embodiments, blockchain system 112 may include multiple blockchain nodes (e.g., blockchain node 1, blockchain node 2, blockchain node 3, blockchain node 4, blockchain node i, etc.) that maintain one or more blockchains (e.g., public blockchain, private blockchain, etc.). Other blockchain systems (e.g., blockchain system 113, blockchain system 114) may include a similar arrangement of blockchain nodes maintaining other blockchains. Each blockchain node can be found in one or more blockchain systems. Each blockchain node in a blockchain system can maintain one or more blockchains. Blockchain nodes may include full nodes. Full nodes can download each block and blockchain transaction and check it against the consensus rules of the blockchain. Blockchain nodes can form a network (e.g., a peer-to-peer network) in which one blockchain node communicates with another blockchain node. The order and number of blockchain nodes shown are merely illustrative examples. Blockchain nodes can be implemented in servers, computers, etc. For example, each blockchain node can be implemented in a server or server cluster. Server clusters can employ load balancing. Each blockchain node can correspond to one or more physical hardware devices or virtual devices coupled together via various types of communication methods such as TCP / IP. Depending on the classification, blockchain nodes may also be referred to as full nodes, Geth nodes, consensus nodes, etc.
[0038] In environment 100, each node and device may be equipped with appropriate software (e.g., application programming interface) and / or hardware (e.g., wired, wireless connectivity) to access other devices in environment 100. Typically, nodes and devices may be able to communicate with each other via one or more wired or wireless networks (e.g., the Internet), through which data can be communicated. Each of the nodes and devices may include one or more processors and one or more memories coupled to the one or more processors. The memory may be non-transitory and computer-readable, and configured with instructions executable by the one or more processors to facilitate the one or more processors in performing the operations described herein. The instructions may be stored in the memory or downloaded via a communication network without necessarily being stored in the memory. Although nodes and devices are shown as separate components in this figure, it should be understood that these systems and devices may be implemented as a single device or multiple devices coupled together. For example, node B may optionally be integrated into blockchain node 2.
[0039] Devices such as nodes A1, A2, A3, B, and C can be equipped with appropriate blockchain software to initiate, forward, or access blockchain transactions. The term "blockchain transaction" can refer to a unit of task executed and recorded in the blockchain system. For example, node A1 can access the blockchain through communication with node C, server 118, and blockchain node 1, and node B can access the blockchain through communication with blockchain node 2. In some embodiments, node A1 can submit a blockchain data update request (e.g., adding, deleting, or modifying blockchain data) to node C. Node C can forward the request and other similar requests to server 118. Server 118 can update the blockchain data accordingly. To this end, server 118 can compile the blockchain data update request, generate instructions (e.g., in the form of a main blockchain transaction), and send them to one or more blockchain nodes (e.g., blockchain node 1) for execution.
[0040] In some embodiments, server 118 may construct one or more blockchain contracts based on information obtained from node C for execution in a blockchain transaction (e.g., a main blockchain transaction). A blockchain node may execute a blockchain transaction to deploy a blockchain contract or invoke a deployed blockchain contract. A blockchain contract may or may not involve financial transactions. A blockchain contract may include contractual terms between users written in lines of code. A blockchain contract may be a computer protocol designed to digitally facilitate, verify, or enforce the negotiation or performance of a contract. In one embodiment, a blockchain contract may include data updates. Examples of blockchain transactions may use blockchain contract code to encode data for (1) adding data to the blockchain for storage (e.g., deployment via a blockchain contract) or (2) retrieving and deleting or modifying data (e.g., by accessing or executing a blockchain contract).
[0041] In some embodiments, upon receiving a blockchain transaction request for an unconfirmed blockchain transaction, the receiving blockchain node can perform preliminary verification of the blockchain transaction. For example, blockchain node 1 can perform preliminary verification after receiving the blockchain transaction from node C. Once verified, the blockchain transaction can be stored in the pool database of the receiving blockchain node (e.g., blockchain node 1), which can also forward the blockchain transaction to one or more other blockchain nodes (e.g., blockchain node 3, blockchain node 4). Since each blockchain node may include or be coupled to memory, the pool database can be stored separately in the memory of each blockchain node. The pool database can store multiple blockchain transactions submitted by one or more client devices. After receiving a blockchain transaction, one or more other blockchain nodes can repeat the processing performed by the receiving blockchain node.
[0042] Each blockchain node can select some blockchain transactions from the pool based on its preferences and form them into a new block to be proposed to the blockchain. Blockchain nodes can "mine" these new blocks by contributing computing power to solve complex mathematical problems. If a blockchain transaction involves a blockchain contract, the blockchain node can execute the contract locally in the corresponding virtual machine (VM). To process blockchain contracts, each blockchain node in the blockchain network runs a corresponding VM and executes the same instructions within the blockchain contract. A virtual machine is a software simulation of a computer system based on a computer architecture and providing the functionality of a physical computer. In the context of blockchain, a virtual machine can be understood as a system designed to serve as the runtime environment for blockchain contracts.
[0043] A specific blockchain node that successfully mines a new block of proposed blockchain transactions according to the consensus rules can package the new block into a local copy of its blockchain and multicast the result to other blockchain nodes. This specific blockchain node could be one that first successfully completes verification, has acquired verification privileges, or has been selected based on another consensus rule. Other blockchain nodes can then execute the blockchain transactions in the new block locally, following the same execution order as the specific blockchain node, verifying the execution results with each other (e.g., by performing hash calculations), and synchronizing their blockchain copies with those of the specific blockchain node. By updating their local copies of the blockchain, other blockchain nodes can similarly write such information from blockchain transactions into their corresponding local storage. Therefore, blockchain contracts can be deployed on the blockchain. If verification fails at some point, the blockchain transaction is rejected.
[0044] Deployed blockchain contracts can have addresses that allow access to the contract. Blockchain nodes can invoke deployed blockchain contracts by inputting certain parameters. In one embodiment, node C or node B can request to invoke a deployed blockchain contract to perform various operations. For example, data stored in the deployed blockchain contract can be retrieved. In another example, data can be added to the deployed blockchain contract. Yet another example, a financial transaction specified in the deployed blockchain contract can be executed. Nevertheless, other types of blockchain systems and associated consensus rules can be applied to publicly disclosed blockchain systems.
[0045] Figure 2A framework for implementing blockchain transactions according to some embodiments is illustrated. In some embodiments, client 111 may send information (e.g., a request with relevant information for updating blockchain data, or an unsigned blockchain transaction for updating blockchain data) to server 118 for server 118 to update the blockchain data. Updating blockchain data may include adding new data to the blockchain or deleting or modifying existing blockchain data. To this end, server 118 may sign the blockchain transaction for client 111, compile the request along with other blockchain data update requests, and / or perform other operations. Server 118 may then send a main blockchain transaction, including the compiled blockchain data update request, to one or more blockchain nodes for execution.
[0046] In some embodiments, client 111 may maintain several local accounts, each associated with one or more blockchain accounts. To update the blockchain data for each blockchain account, client 111 may construct an unsigned blockchain transaction and send it to server 118 for execution within the blockchain. Server 118 may sign the blockchain transaction on behalf of client 111, compile it along with other blockchain transactions, and / or perform other operations. Server 118 may then send a master blockchain transaction, including the signed blockchain transaction, to one or more blockchain nodes for execution.
[0047] In some embodiments, a signed blockchain transaction (e.g., blockchain transaction A) may include blockchain contract A for deploying or invoking a deployed blockchain contract. For example, blockchain transaction A may include information such as a random number (e.g., blockchain transaction sequence number), from (e.g., the blockchain address of client 111 or another blockchain address), to (e.g., empty if a blockchain contract is deployed), transaction fee, signature (e.g., the signature of the corresponding blockchain account added by server 118), value (e.g., transaction amount), data (e.g., blockchain contract A), etc.
[0048] In some embodiments, node B can construct a signed blockchain transaction and send it to one or more blockchain nodes for execution. In one embodiment, node B can construct blockchain transaction B. Blockchain transaction B may include blockchain contract B for deploying or invoking a deployed blockchain contract. For example, blockchain transaction B may include a blockchain contract for creating a blockchain account or invoking a deployed blockchain contract A. Blockchain contract B can be programmed with source code at user application 221. For example, a user or machine can program blockchain contract B. Node B can use a suitable compiler to compile the source code, which converts the source code into bytecode. Blockchain transaction B may include information such as a random number (e.g., blockchain transaction sequence number), from (e.g., node B's blockchain address or another blockchain address), to (e.g., empty if a blockchain contract is deployed), transaction fee, value (e.g., transaction amount), signature (e.g., node B's signature), data (e.g., a message to the blockchain contract), etc. Node B can send blockchain transaction B to one or more blockchain nodes for execution via remote procedure call (RPC) interface 223. RPC is a protocol that allows a first program (e.g., a client application) to request services from a second program on another computer (e.g., a blockchain node) on a network without needing to understand the network details. When the first program causes the process to execute in a different address space, it behaves as a normal (local) process call, without requiring the programmer to explicitly code the details for remote interaction.
[0049] In some embodiments, upon receiving a blockchain transaction (e.g., blockchain transaction A or B), the receiving blockchain can verify the validity of the blockchain transaction. For example, it can verify the signature and other formats. If verification is successful, the receiving blockchain node can broadcast the received blockchain transaction (e.g., blockchain transaction A or B) to a blockchain network that includes various other blockchain nodes. Some blockchain nodes can participate in the mining process of blockchain transactions. Blockchain transactions can be selected by specific nodes for consensus verification and then packaged into a new block. If the blockchain transaction involves a blockchain contract, the specific node can create a contract account for the blockchain contract associated with a blockchain account address. If the blockchain transaction involves invoking a deployed blockchain contract, the specific node can trigger its local VM to execute the received blockchain transaction, thereby invoking the deployed blockchain contract from its local copy of the blockchain and updating the account state in the blockchain. If the specific node successfully mines a new block, it can broadcast the new block to other blockchain nodes. Other blockchain nodes can verify that the new block was mined by that specific blockchain node. If consensus is reached, blockchain transaction B is packaged into a local copy of the blockchain maintained by the blockchain node. A blockchain node can similarly trigger its local VM to execute blockchain transaction B, thereby invoking blockchain contract A deployed on a local copy of the blockchain and making the corresponding updates.
[0050] Upon receiving a new block, other blockchain nodes can perform verification. If a consensus is reached that the new block is valid, it is packaged into local copies of the blockchain maintained by the blockchain nodes. Similarly, blockchain nodes can trigger their local VMs (e.g., local VM1, local VMi, local VM2) to execute blockchain transactions in the new block, thereby invoking local copies of the blockchain (e.g., local blockchain copy 1, local blockchain copy i, local blockchain copy 2) and updating them accordingly. Each blockchain node's hardware can access one or more virtual machines, which may be part of or coupled to the corresponding blockchain node. Each time, the corresponding local VM can be triggered to execute blockchain transactions. Similarly, all other blockchain transactions in the new block will be executed. Light nodes can also synchronize with the updated blockchain.
[0051] Figure 3 A flowchart for updating data in a blockchain is shown according to some embodiments. Figure 3 The steps presented herein can be referred to as methods for updating data in a blockchain. The operation of the methods presented below is intended to be illustrative. Depending on the implementation, the methods may include additional, fewer, or optional steps performed in various orders or in parallel.
[0052] As shown in the diagram, client 111 interacts with server 118 to update data in the blockchain. Client 111 may include one or more servers or similar computing devices belonging to entities such as websites, mobile applications, companies, or organizations. Client 111 may store and maintain one or more local accounts, such as user accounts registered on a website or employee / user accounts. Server 118 may include one or more servers or similar computing devices. Server 118 may provide Blockchain-as-a-Service (BaaS) to one or more clients, including client 111. For example, server 118 may update blockchain data for the blockchain address (blockchain account) of a local account in client 111. Server 118 may be coupled to one or more clients and one or more blockchain nodes of one or more blockchains. For simplicity, one or more blockchain nodes are represented by corresponding blockchains. For example, blockchain 1 may represent the blockchain itself and its blockchain nodes, while blockchain 2 may represent the blockchain itself and its blockchain nodes.
[0053] In some embodiments, client 111 may include user-side system server 403 maintaining database 404. Database 404 may store multiple local accounts (e.g., local accounts 1, 2, 3). For example, database 404 may store millions of user accounts for websites, mobile applications, companies, organizations, etc. Database 404 may store local accounts associated with blockchain IDs representing blockchains, where local accounts have associated blockchain addresses (blockchain accounts). For example, as shown, local account 1 has one blockchain account in blockchain 1 of blockchain ID 1 and another blockchain account in blockchain 2 of blockchain ID 2; local account 2 has one blockchain account in blockchain 2 of blockchain ID 2; local account 3 has one blockchain account in blockchain 1 of blockchain ID 1 and another blockchain account in blockchain 3 of blockchain ID 3. The client may not store or manage (1) one or more blockchain addresses associated with one or more local accounts and / or (2) one or more private keys associated with one or more blockchain addresses. Since client 111 does not have to store blockchain addresses and public / private keys, the storage and security burden on the client is reduced.
[0054] In some embodiments, to update blockchain data on the corresponding blockchain for a local account's blockchain address (blockchain account), the user-side system server 403 may send to server 405 of server 118: one or more local accounts, one or more unsigned blockchain transactions to be executed to correspondingly update multiple data associated with one or more local accounts, information about the multiple data, and one or more identifiers of one or more blockchains corresponding to the one or more blockchain transactions (step 411). Such information may be sent to server 118 in one or more blockchain data update requests. For each local account, blockchain data updates may be performed on one or more blockchain addresses in one or more blockchains. For example, a user of local account 1 may want to update some data in blockchain 1 and blockchain 2, a user of local account 2 may want to add some data to blockchain 2, and so on. As described above, data updates can be achieved by adding blockchain transactions to the corresponding blockchains and executing the blockchain transactions.
[0055] In some embodiments, server 405 may receive one or more requests for updating multiple data entries in one or more blockchains. In some embodiments, server 405 may obtain from a client (e.g., user-side system server 403 of client 111) one or more local accounts (e.g., in the form of local account IDs, email addresses, phone numbers, etc.), one or more unsigned blockchain transactions to be executed to correspondingly update multiple data entries associated with one or more local accounts, information about the multiple data entries, and one or more identifiers of one or more blockchains corresponding to the one or more blockchain transactions (step 411). The information about the multiple data entries includes: new data to be added to one or more blockchains or changes to existing data in one or more blockchains (e.g., deletion, modification, or similar operations).
[0056] In some embodiments, server 118 may obtain one or more requests from a client (e.g., user-side system server 403 of client 111) for updating multiple records in one or more blockchains, according to the Light Directory Access Protocol (LDAP). LDAP is an open, vendor-agnostic, industry-standard application protocol for accessing and maintaining distributed directory information services over a network. For example, a directory service may provide an organized set of records with a hierarchical structure, such as a company email directory, including local accounts. LDAP allows client 111 to receive blockchain data update services from server 118 with minimal changes to existing databases or other infrastructure. That is, the client does not need to develop a complex interface for interacting with the blockchain. Instead, the client can simply allow its existing users to interact with the blockchain by connecting to server 118. Thus, the availability of the blockchain is extended without increasing the burden on the client.
[0057] In some embodiments, server 118 may obtain one or more blockchain addresses associated with one or more local accounts and one or more private keys correspondingly associated with one or more blockchain addresses (steps 412 and 413); update one or more unsigned blockchain transactions correspondingly based on one or more blockchain addresses (step 412); sign one or more updated blockchain transactions correspondingly with one or more private keys (steps 414-416); and send the signed one or more blockchain transactions to one or more blockchain nodes in one or more blockchains for execution (step 417).
[0058] In some embodiments, to obtain one or more private keys corresponding to one or more blockchain addresses, server 118 may retrieve one or more private keys in encrypted form (step 413). To update one or more unsigned blockchain transactions corresponding to one or more blockchain addresses, server 118 may add one or more blockchain addresses to one or more unsigned blockchain transactions (step 412). To sign one or more updated blockchain transactions corresponding to one or more private keys, server 118 may decrypt the retrieved encrypted one or more private keys and sign one or more updated blockchain transactions corresponding to the decrypted one or more private keys (steps 414-416).
[0059] In some embodiments, to retrieve one or more private keys in encrypted form, server 118 can retrieve one or more private keys in encrypted form from one or more key management system (KMS) directories in one or more mapping relationships from a KMS (e.g., KMS 409 of server 118) (step 412). The KMS may be part of server 405 or located outside of server 405. A KMS, also known as a cryptographic key management system (CKMS), is an integrated method for generating, distributing, and managing cryptographic keys for devices and applications. They may cover aspects from secure key generation to secure key exchange, and the security of secure key processing and storage. Therefore, a KMS includes backend functions for key generation, distribution, and replacement, as well as client functions for injecting, storing, and managing keys on devices.
[0060] One or more mappings associate one or more local accounts with one or more blockchain addresses and one or more KMS directories. One or more KMS directories are linked to one or more private keys in encrypted form. For example, in database 406 of server-side 118, server-side 118 may store mappings between local accounts, blockchain addresses created associated with the local accounts, corresponding KMS directories, and blockchain identifiers of the blockchain addresses. KMS directories are linked to the corresponding encrypted private keys of the blockchain addresses. For example, as shown in the figure, in the first entry, local account 1 is stored in association with blockchain address 1, KMS directory 1, and blockchain ID 1 of blockchain 1; in the second entry, local account 1 is stored in association with blockchain address 2, KMS directory 2, and blockchain ID 2 of blockchain 2; in the third entry, local account 2 is stored in association with blockchain address 3, KMS directory 3, and blockchain ID 2 of blockchain 2; and so on.
[0061] Therefore, by querying any local account in database 406, server 118 can find one or more blockchain accounts and their corresponding KMS directories in the blockchain. The directory leads to an encrypted private key stored in the KMS, which can be decrypted in a Trusted Execution Environment (TEE). The TEE can be part of server 405 or located outside of server 405. Generally, a TEE provides an execution space offering a higher level of security. In one embodiment, the TEE is a secure area of the main processor. It guarantees the confidentiality and integrity of internally loaded code and data. As an isolated execution environment, the TEE provides security features such as isolated execution, the integrity of applications executed using the TEE, and the confidentiality of their assets. To enhance security, the private key can be in plaintext inside the TEE but encrypted outside of it. Therefore, encryption and decryption of the private key can be performed inside the TEE. The private key can be encrypted based on various methods or standards, such as Data Encryption Standard (DES), TripleDES, RSA, Advanced Encryption Standard (AES), Twofish, etc.
[0062] In some embodiments, in order to decrypt one or more private keys in the retrieved encrypted form and sign one or more updated blockchain transactions accordingly using one or more private keys in the decrypted form, server 118 may decrypt one or more private keys in the retrieved encrypted form (step 415) and sign one or more updated blockchain transactions accordingly using one or more private keys in the decrypted form (step 416) in a Trusted Execution Environment (TEE) (e.g., TEE 407 of server 118).
[0063] In some embodiments, server 118 can construct a main blockchain transaction including one or more signed blockchain transactions; and send the main blockchain transaction to one or more blockchain nodes of one or more blockchains for execution based on one or more identifiers of one or more blockchains (step 417). Therefore, various blockchain data update requests are compiled into a single main blockchain transaction for effective execution. For example, if a user of local account 1 wants to update some data in blockchain 1 and blockchain 2, and a user of local account 2 wants to add some data to blockchain 2, server 118 can construct a main blockchain transaction that includes a single blockchain transaction for implementing the data update in the corresponding blockchain. After successful execution, server 118 can send a notification to the client for the client 111 to notify of the successful update of the blockchain data.
[0064] In some embodiments, if one or more blockchain nodes maintain both blockchain 1 and blockchain 2, the server 118 can construct a master blockchain transaction for the blockchain nodes to execute. The one or more blockchain nodes may or may not be all the blockchain nodes of any given blockchain. However, if blockchain 1 and blockchain 2 are maintained by different blockchain nodes, the server 118 can construct two master blockchain transactions for execution for two different groups of blockchain nodes (one group maintaining blockchain 1 and the other maintaining blockchain 2).
[0065] In some embodiments, to construct blockchain transactions, server-side 118 can maintain and apply general algorithms such as encryption / decryption, data analysis, task flow, and state storage to multiple blockchain data update requests. Therefore, overall network computing power is saved by avoiding the duplication of blockchain transactions across different blockchain nodes.
[0066] In addition to updating multiple data entries individually in one or more blockchains, server-side 118 can batch update data across multiple blockchains. In some embodiments, a local account may be associated with multiple blockchain addresses in one or more blockchains. Server-side 118 can batch update multiple data entries in multiple blockchains for multiple blockchain addresses. For example, server-side 118 may receive one or more requests for correspondingly updating multiple data entries in multiple blockchains associated with a local account, and correspondingly batch update the multiple data entries in multiple blockchains.
[0067] In some embodiments, multiple local accounts may be associated with multiple blockchain addresses in a blockchain. Server 118 may batch update multiple blockchain data entries in a blockchain for multiple blockchain addresses. For example, server 118 may receive one or more requests for correspondingly updating multiple data entries in a blockchain associated with multiple local accounts, and batch update multiple data entries in a blockchain.
[0068] In some embodiments, multiple local accounts may be associated with multiple blockchain addresses in multiple blockchains. Server 118 may batch update multiple blockchain data entries for multiple blockchain addresses in multiple blockchains. For example, server 118 may receive one or more requests for correspondingly updating multiple data entries in multiple blockchains associated with multiple local accounts, and correspondingly batch update multiple data entries in multiple blockchains.
[0069] In this way, server-side 118 can monitor operations related to blockchain data updates and ensure system security. As a result, the storage and security burden on clients is at least reduced. Since server-side 118 can serve many clients, it can maintain and update contract algorithms and other general algorithms for all requests. Therefore, by utilizing the disclosed system and methods, the efficiency, stability, and security of updating blockchain data are significantly improved. Consequently, clients can open blockchain accounts in a safer, faster, simpler, and more efficient manner.
[0070] Figure 4 and Figure 5 A flowchart of an exemplary method 510 for updating data in a blockchain, according to some embodiments, is shown. Method 510 can be performed by a device, apparatus, or system for updating data in a blockchain (e.g., server-side 118). Method 510 can be performed by... Figure 1 The method 510 is executed by one or more components of environment 100 (e.g., server-side 118). Server-side 118 may implement Blockchain as a Service (BaaS). Server-side 118 may include one or more servers or other computing devices. Method 510 may be implemented by a system or device (e.g., computer, server) including various hardware machines and / or software. For example, the system or device may include one or more processors and one or more non-transitory computer-readable storage media (e.g., one or more memories) coupled to one or more processors and configured with instructions executable by one or more processors to cause the system or device (e.g., processor) to perform method 510. The operation of method 510 shown below is intended to be illustrative. Depending on the implementation, method 510 may include additional, fewer, or alternative steps performed in various orders or in parallel. Further details of method 510 can be found in [reference needed]. Figures 1 to 3 And the related descriptions above. For example, method 510 includes references Figure 3 The steps described are for updating data in a blockchain.
[0071] Box 511 includes obtaining one or more requests for updating multiple pieces of data in one or more blockchains. Box 512 includes updating multiple pieces of data in one or more blockchains.
[0072] In some embodiments, a local account may be associated with multiple blockchain addresses in one or more blockchains. Server 118 may batch update multiple blockchain data entries in multiple blockchains for multiple blockchain addresses. For example, obtaining one or more requests for updating multiple data entries in the one or more blockchains includes: obtaining one or more requests for correspondingly updating multiple data entries in multiple blockchains associated with a local account; and updating multiple data entries in one or more blockchains includes: correspondingly batch updating multiple data entries in multiple blockchains.
[0073] In some embodiments, multiple local accounts may be associated with multiple blockchain addresses in a blockchain. Server 118 may batch update multiple blockchain data entries in a blockchain for multiple blockchain addresses. For example, obtaining one or more requests for updating multiple data entries in the one or more blockchains includes: obtaining one or more requests for correspondingly updating multiple data entries in a blockchain associated with multiple local accounts; and updating multiple data entries in one or more blockchains includes: batch updating multiple data entries in a single blockchain.
[0074] In some embodiments, multiple local accounts may be associated with multiple blockchain addresses in multiple blockchains. Server 118 may batch update multiple blockchain data entries in multiple blockchains for multiple blockchain addresses. For example, obtaining one or more requests for updating multiple data entries in the one or more blockchains includes: obtaining one or more requests for correspondingly updating multiple data entries in multiple blockchains associated with multiple local accounts; and updating multiple data entries in one or more blockchains includes: correspondingly batch updating multiple data entries in multiple blockchains.
[0075] In some embodiments, box 511 includes box 521. Obtaining one or more requests for updating multiple pieces of data in one or more blockchains includes: obtaining one or more local accounts, one or more unsigned blockchain transactions to be executed to correspondingly update the multiple pieces of data associated with the one or more local accounts, information about the multiple pieces of data, and one or more identifiers of the one or more blockchains corresponding to the one or more blockchain transactions. The information about the multiple pieces of data includes: new data to be added to the one or more blockchains or changes to existing data in the one or more blockchains (e.g., deletion, modification, or similar operations). For each local account, blockchain data updates can be performed on one or more blockchain addresses in the one or more blockchains. Each blockchain address can uniquely identify the blockchain account associated with the local account. In one example, one request for updating multiple pieces of data associated with one or more local accounts can be obtained. In another example, multiple requests can be obtained that are collectively used to update multiple pieces of data associated with one or more local accounts.
[0076] In some embodiments, obtaining one or more requests for updating multiple data entries in one or more blockchains includes obtaining one or more requests from a client for updating multiple data entries in one or more blockchains in accordance with the Light Directory Access Protocol (LDAP).
[0077] In some embodiments, box 512 includes boxes 522 to 525. Updating multiple data entries on one or more blockchains includes: obtaining one or more blockchain addresses associated with one or more local accounts and one or more private keys correspondingly associated with the one or more blockchain addresses; updating one or more unsigned blockchain transactions correspondingly based on the one or more blockchain addresses; signing one or more updated blockchain transactions correspondingly using the one or more private keys; and sending the signed one or more blockchain transactions to one or more blockchain nodes of the one or more blockchains for execution.
[0078] In some embodiments, sending one or more signed blockchain transactions to one or more blockchain nodes for execution includes: constructing a master blockchain transaction that includes the one or more signed blockchain transactions; and sending the master blockchain transaction to one or more blockchain nodes of one or more blockchains for execution based on one or more identifiers of one or more blockchains.
[0079] In some embodiments, obtaining one or more requests for updating multiple data entries in one or more blockchains includes obtaining one or more requests from a client for updating multiple data entries in one or more blockchains. In one embodiment, the client may include one or more servers or similar computing devices of an entity such as a website, mobile application, company, organization, etc. The client may store and maintain one or more local accounts, such as user accounts registered on a website or user accounts of company employees. The client may not store (1) one or more blockchain addresses associated with one or more local accounts and / or (2) one or more private keys associated with one or more blockchain addresses.
[0080] In some embodiments, obtaining one or more private keys corresponding to one or more blockchain addresses includes: retrieving the one or more private keys in encrypted form. Updating one or more unsigned blockchain transactions based on the one or more blockchain addresses includes: adding the one or more blockchain addresses to the one or more unsigned blockchain transactions. Signing one or more updated blockchain transactions using the one or more private keys includes: decrypting the retrieved encrypted form of the one or more private keys and signing the one or more updated blockchain transactions using the decrypted form of the one or more private keys.
[0081] In some embodiments, retrieving the one or more private keys in the encrypted form includes: retrieving the one or more private keys in the encrypted form from a KMS based on one or more Key Management System (KMS) directories in one or more mapping relationships; one or more mapping relationships associating one or more local accounts with one or more blockchain addresses and one or more KMS directories; and one or more KMS directories linking to the one or more private keys in the encrypted form. For example, the server may have stored the mapping relationships in a database.
[0082] In some embodiments, decrypting one or more private keys in the retrieved encrypted form and signing one or more updated blockchain transactions corresponding to the one or more private keys in the decrypted form includes: in a Trusted Execution Environment (TEE), decrypting one or more private keys in the retrieved encrypted form and signing one or more updated blockchain transactions corresponding to the one or more private keys in the decrypted form.
[0083] Figure 6A block diagram of a system 610 for updating data in a blockchain, according to some embodiments, is shown. System 610 (e.g., a computer system) may be an example of an implementation of the server-side 118 described above, a similar device or system of devices, or a combination of server-side 118 and one or more additional devices. For example, method 510 may be implemented by system 610. Computer system 610 may include one or more processors and one or more non-transitory computer-readable storage media (e.g., one or more memories) coupled to and configured to be executable by the one or more processors to cause the system or device (e.g., a processor) to perform the methods and operations described above, such as method 510. System 610 may include various units / modules corresponding to instructions (e.g., software instructions).
[0084] In some embodiments, system 610 may be referred to as an apparatus for updating data in a blockchain. The apparatus may include: an obtaining module 611 for obtaining one or more requests for updating multiple pieces of data in one or more blockchains, and an updating module 612 for updating multiple pieces of data in one or more blockchains.
[0085] The techniques described herein are implemented by one or more dedicated computing devices. A dedicated computing device can be a desktop computer system, a server computer system, a portable computer system, a handheld device, a network device, or any other device or combination of devices that includes hard-wired and / or program logic to implement these techniques. A dedicated computing device can be implemented as a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination thereof. Computing devices are typically controlled and coordinated by operating system software. Traditional operating systems control and schedule computer processes for execution, perform memory management, provide file systems, networking, I / O services, and provide user interface functions such as graphical user interfaces (“GUIs”). The various systems, apparatuses, storage media, modules, and units described herein can be implemented in a dedicated computing device or one or more computing chips within one or more dedicated computing devices. In some embodiments, the instructions described herein can be implemented in a virtual machine on a dedicated computing device. When executed, the instructions can cause the dedicated computing device to perform the various methods described herein. A virtual machine can include software, hardware, or a combination thereof.
[0086] Figure 7This is a block diagram illustrating a computer system 700 on which any of the embodiments described herein may be implemented. System 700 may perform any of the methods described herein (e.g., method 510 and related steps). System 700 may be implemented in any system described herein (e.g., system 610, server 118). Computer system 700 includes a bus 702 or other communication mechanism for transmitting information, and one or more hardware processors 704 coupled to the bus 702 for processing information. Hardware processor 704 may be, for example, one or more general-purpose microprocessors.
[0087] Computer system 700 also includes main memory 706, such as random access memory (RAM), cache, and / or other dynamic storage devices, coupled to bus 702 for storing information and instructions to be executed by processor 704. Main memory 706 may also be used to store temporary variables or other intermediate information during the execution of instructions executable by one or more processors 704. When these instructions are stored in storage media accessible to processor 704, they cause computer system 700 to function as a dedicated machine customized to perform the operations specified in the instructions. Computer system 700 also includes read-only memory (ROM) 708 or other static storage devices coupled to bus 702 for storing static information and instructions for processor 704. Storage devices 710, such as disks, optical discs, or USB thumb drives (flash drives), are provided and coupled to bus 702 for storing information and instructions.
[0088] Computer system 700 may implement the techniques described herein using custom hardwired logic, one or more ASICs or FPGAs, firmware, and / or program logic, which, when combined with the computer system, enables computer system 700 to be a special-purpose machine or to be programmed as such. According to one embodiment, in response to processor 704 executing one or more sequences of one or more instructions contained in main memory 706, computer system 700 performs the operations, methods, and processes described herein. These instructions may be read into main memory 706 from another storage medium, such as storage device 710. Executing the sequence of instructions contained in main memory 706 causes processor 704 to perform the processing steps described herein. In alternative embodiments, hardwired circuitry may be used instead of software instructions or in combination with software instructions.
[0089] Main memory 706, ROM 708, and / or storage device 710 may include non-transitory storage media. As used herein, the term "non-transitory media" and similar terms refer to a medium that stores data and / or instructions that cause a machine to operate in a particular manner, excluding transient signals. Such non-transitory media may include non-volatile media and / or volatile media. Non-volatile media include, for example, optical discs or magnetic disks, such as storage device 710. Volatile media include dynamic memory, such as main memory 706. Conventional forms of non-transitory media include, for example, floppy disks, hard disks, solid-state drives, magnetic tape or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical media with a perforated pattern, RAM, PROMs and EPROMs, FLASH-EPROMs, NVRAMs, any other memory chips or cassette tapes and their network versions.
[0090] Computer system 700 also includes a network interface 718 coupled to bus 702. Network interface 718 provides bidirectional data communication coupled to one or more network links connected to one or more local networks. For example, network interface 718 may be an Integrated Services Digital Network (ISDN) card, a cable modem, a satellite modem, or a modem providing data communication connectivity to a corresponding type of telephone line. As another example, network interface 718 may be a LAN card providing data communication connectivity to a compatible local area network (LAN) (or a WAN component communicating with a WAN). Wireless links may also be implemented. In any such implementation, network interface 718 transmits and receives electrical, electromagnetic, or optical signals carrying digital data streams representing various types of information.
[0091] Computer system 700 can send messages and receive data, including program code, via a network, network link, and network interface 718. In the Internet example, the server can transmit requested application code via the Internet, ISP, local network, and network interface 718.
[0092] The received code can be executed by processor 704 upon receipt and / or stored in storage device 710 or other non-volatile storage device for later execution.
[0093] Each process, method, and algorithm described in the preceding sections can be embodied in a code module executed by one or more computer systems or computer processors, including computer hardware, and implemented by them, either fully or partially automatically. The processes and algorithms can be implemented, partially or entirely, in dedicated circuitry.
[0094] The various features and processes described above can be used independently of each other or combined in various ways. All possible combinations and sub-combinations are intended to fall within the scope of this document. Additionally, certain method or process blocks may be omitted in some embodiments. The methods and processes described herein are not limited to any particular order, and the associated blocks or states may be performed in other suitable orders. For example, the described blocks or states may be performed in an order different from that specifically disclosed, or multiple blocks or states may be combined in a single block or state. Examples of blocks or states may be performed serially, in parallel, or in some other manner. Blocks or states may be added to or removed from the disclosed embodiments. Examples of systems and components described herein may be configured differently from those described. For example, elements may be added, removed, or rearranged compared to the disclosed embodiments.
[0095] The various operations of the methods described herein can be performed, at least in part, by one or more processors that are temporarily configured (e.g., by software) or permanently configured to perform the relevant operations. Whether temporarily or permanently configured, such processors can constitute the engine of a processor implementation for performing one or more operations or functions described herein.
[0096] Similarly, the methods described herein can be implemented at least in part by a processor, where a particular processor or one or more processors are examples of hardware. For example, at least some operations of the methods can be performed by one or more processors or an engine implemented by the processor. Furthermore, one or more processors can also be operated to support the performance of related operations in a “cloud computing” environment, or as “Software as a Service” (SaaS) operations. For example, at least some operations can be performed by a group of computers (as an example of a machine including processors), and these operations can be accessed via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., application programming interfaces (APIs)).
[0097] The performance of certain operations can be distributed among processors, not just residing on a single machine, but deployed across multiple machines. In some embodiments, the processor or processor-implemented engine may reside in a single geographic location (e.g., within a home environment, office environment, or server cluster). In other embodiments, the processor or processor-implemented engine may be distributed across multiple geographic locations.
[0098] In this document, multiple instances can implement the components, operations, or structures described as a single instance. Although the individual operations of one or more methods are shown and described as independent operations, one or more independent operations can be performed simultaneously, and they do not need to be performed in the order shown. Structures and functions presented as independent components in a configuration can be implemented as composite structures or components. Similarly, structures and functions presented as single components can be implemented as independent components. These and other variations, modifications, additions, and improvements all fall within the scope of the subject matter herein. Furthermore, the related terms used herein (such as "first," "second," "third," etc.) do not indicate any order, hierarchy, or importance, but are used to distinguish one element from another. Additionally, the terms "a," "an," and "a plurality" do not indicate a limitation on quantity herein, but rather indicate the presence of at least one of the described items.
[0099] Although an overview of the subject matter has been described with reference to specific embodiments, various modifications and changes can be made to these embodiments without departing from the broad scope of the embodiments described herein. The specific details should not be considered limiting, and the scope of the various embodiments is defined only by the appended claims and the full scope of their equivalents.
Claims
1. A computer-implemented method for updating data in a blockchain, applied to a server providing a blockchain-as-a-service, the server being responsible for receiving requests from clients and interacting with the blockchain based on the received requests; the method comprising: Obtain one or more requests to update multiple pieces of data in one or more blockchains; The one or more blockchains are associated with at least one local account; as well as Updating the multiple data entries in one or more blockchains includes: updating the multiple data entries in batches based on the one or more blockchains.
2. The method according to claim 1, wherein: Obtaining the one or more requests for updating the plurality of data entries in the one or more blockchains includes: obtaining the one or more requests for correspondingly updating the plurality of data entries in multiple blockchains associated with a local account; and The step of batch updating the multiple data entries based on the one or more blockchains includes: correspondingly batch updating the multiple data entries in the multiple blockchains.
3. The method according to claim 1, wherein: Obtaining the one or more requests for updating the plurality of data entries in the one or more blockchains includes: obtaining the one or more requests for correspondingly updating the plurality of data entries in a blockchain associated with multiple local accounts; and The step of batch updating the multiple data entries based on the one or more blockchains includes: batch updating the multiple data entries in one of the blockchains.
4. The method according to claim 1, wherein: Obtaining the one or more requests for updating the plurality of data entries in the one or more blockchains includes: obtaining the one or more requests for correspondingly updating the plurality of data entries in multiple blockchains associated with multiple local accounts; and The step of batch updating the multiple data entries based on the one or more blockchains includes: correspondingly batch updating the multiple data entries in the multiple blockchains.
5. The method according to claim 1, wherein The request to obtain one or more pieces of data for updating one or more blockchains includes: Obtain one or more local accounts, one or more unsigned blockchain transactions to be executed to correspondingly update the multiple data associated with the one or more local accounts, information about the multiple data, and one or more identifiers of the one or more blockchains corresponding to the one or more blockchain transactions; as well as, The information in the multiple data entries includes: new data to be added to the one or more blockchains, or changes to existing data in the one or more blockchains.
6. The method according to claim 5, wherein the step of batch updating the plurality of data based on the one or more blockchains includes: Obtain one or more blockchain addresses associated with the one or more local accounts and one or more private keys correspondingly associated with the one or more blockchain addresses; Update the one or more unsigned blockchain transactions corresponding to the one or more blockchain addresses; Sign the one or more updated blockchain transactions using the one or more private keys respectively; One or more signed blockchain transactions are sent to one or more blockchain nodes of the one or more blockchains for execution.
7. The method of claim 6, wherein, Sending one or more signed blockchain transactions to one or more blockchain nodes for execution includes: Construct a main blockchain transaction that includes one or more blockchain transactions with the aforementioned signature; and The main blockchain transaction is sent to the one or more blockchain nodes of the one or more blockchains for execution, based on the one or more identifiers of the one or more blockchains.
8. The method of claim 6, wherein: Obtaining the one or more requests for updating the plurality of data in the one or more blockchains includes: obtaining the one or more requests for updating the plurality of data in the one or more blockchains from a client; and The client does not store (1) the one or more blockchain addresses associated with the one or more local accounts and / or (2) the one or more private keys associated with the one or more blockchain addresses.
9. The method of claim 6, wherein: Obtaining the one or more private keys corresponding to the one or more blockchain addresses includes: retrieving the one or more private keys in encrypted form; Updating the one or more unsigned blockchain transactions based on the one or more blockchain addresses includes: adding the one or more blockchain addresses to the one or more unsigned blockchain transactions accordingly; and Signing one or more updated blockchain transactions using the one or more private keys includes: decrypting the retrieved encrypted form of one or more private keys and signing the one or more updated blockchain transactions using the decrypted form of the one or more private keys.
10. The method of claim 9, wherein: Retrieving the one or more private keys of the encrypted form includes: retrieving the one or more private keys of the encrypted form from a KMS (Key Management System) directory based on one or more mapping relationships; The one or more mapping relationships associate the one or more local accounts with the one or more blockchain addresses and the one or more KMS directories; and The one or more KMS directories are linked to the one or more private keys in the encrypted form.
11. The method of claim 9, wherein: Decrypting one or more private keys in the retrieved encrypted form and signing one or more updated blockchain transactions accordingly using the decrypted private keys includes: in a Trusted Execution Environment (TEE), decrypting one or more private keys in the retrieved encrypted form and signing one or more updated blockchain transactions accordingly using the decrypted private keys.
12. The method of claim 1, wherein: Obtaining one or more requests for updating the multiple data entries in the one or more blockchains includes: obtaining one or more requests from a client for updating the multiple data entries in the one or more blockchains in accordance with the Light Directory Access Protocol (LDAP).
13. A system for updating data in a blockchain, comprising: One or more processors; as well as One or more computer-readable storage devices coupled to the one or more processors and storing instructions thereon, the instructions being executable by the one or more processors to perform the method of any one of claims 1 to 12.
14. An apparatus for updating data in a blockchain, comprising a plurality of modules for performing the method of any one of claims 1 to 12.
15. A non-transitory computer-readable medium storing instructions that, when executed by a processor of a device, cause the device to perform the method of any one of claims 1 to 12.