Trusted platform based on blockchain

By introducing recording rules and bitstream conversion rules on blockchain nodes, combined with gateway encrypted transmission and trusted module verification, the problems of data field mismatch and low efficiency in cross-network communication are solved, achieving efficient and secure data recording and transmission.

CN113597608BActive Publication Date: 2024-09-10ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080014851.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-25
Publication Date
2024-09-10
Estimated Expiration
2040-11-25

AI Technical Summary

Technical Problem

When blockchain nodes record ledger data, recording failures occur due to mismatched data fields or inconsistent bitstream conversion rules. Furthermore, data transmission efficiency is low and security is poor in cross-network and cross-chain communication.

Method used

Recording rules and bitstream conversion rules are introduced to ensure data field matching, and data is transmitted encrypted through a gateway. Trusted time module, trusted identity module, and trusted computing module are used to verify data integrity, establish a secure communication channel, and realize cross-chain communication.

Benefits of technology

It improves the success rate of data recording by blockchain nodes, enhances the security and efficiency of data transmission, and ensures the immutability and trustworthiness of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113597608B
    Figure CN113597608B
Patent Text Reader

Abstract

Disclosed herein are methods, systems, and apparatus for recording and verifying ledger data in a trusted system based on a blockchain, including a computer program encoded on a computer storage medium. One of the methods includes: receiving first ledger data to be recorded on a blockchain from a client device via a record input interface. Then, it can be determined whether the original ledger data associated with the first ledger data satisfies a record rule, wherein the record rule includes one or more record input parameters associated with the record input interface. In response to determining that the original ledger data associated with the first ledger data satisfies the record rule, the original ledger data can be recorded on the blockchain. Then, a record receipt associated with the first ledger data can be generated. Then, the record receipt can be sent to the client device via a record output interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to a blockchain-based trusted platform for enabling trusted digital transactions. Background Art

[0002] A distributed ledger system (DLS), which may also be referred to as a consensus network and / or a blockchain network, enables participating entities to store data securely and immutably. Without reference to any specific use case, a DLS is often referred to as a blockchain network. Examples of types of blockchain networks may include public blockchain networks, private blockchain networks, and consortium blockchain networks. A consortium blockchain network is provided for a selected group of entities that controls the consensus process and includes an access control layer.

[0003] In the prior art, a blockchain node may generally record ledger data on a blockchain using a standard format. If a blockchain node of a blockchain network receives a request from a requester to record ledger data on a blockchain associated with the blockchain network, the requester may not follow the standard format of the blockchain network, and thus the data fields included in the ledger data to be recorded may be different from the data fields provided in the standard format of the blockchain network. Therefore, the recording may fail because the ledger data to be recorded does not meet the standard format of the blockchain node of the ledger data to be recorded.

[0004] It is necessary to reduce the recording failure caused by not meeting the standard format of the blockchain node to record the ledger data. Summary of the invention

[0005] Embodiments of the described subject matter may include one or more features alone or in combination.

[0006] For example, in one embodiment, a method includes: receiving first ledger data to be recorded on a blockchain from a client device via a record input interface; determining whether raw ledger data associated with the first ledger data satisfies a record rule, wherein the record rule includes one or more record input parameters associated with the record input interface; in response to determining that the raw ledger data associated with the first ledger data satisfies the record rule, recording the raw ledger data on the blockchain; generating a record receipt associated with the first ledger data; and sending the record receipt to the client device via a record output interface.

[0007] In some embodiments, these general and specific aspects may be implemented using a system, method, or computer program, or any combination of a system, method, and computer program. The foregoing and other described embodiments may optionally each include one or more of the following aspects:

[0008] In some embodiments, the method further includes: receiving second ledger data from the client device via a verification input interface; determining whether the second ledger data satisfies a verification rule, wherein the verification rule includes one or more verification input parameters associated with the verification input interface; in response to determining that the second ledger data satisfies the verification rule, determining whether the second ledger data corresponds to the original ledger data recorded on the blockchain; in response to determining that the second ledger data corresponds to the original ledger data recorded on the blockchain, generating a verification receipt associated with the second ledger data, wherein the verification receipt indicates that the original data associated with the second ledger data has not been tampered with; and sending the verification receipt to the client device via the verification output interface.

[0009] In some embodiments, determining whether the second ledger data corresponds to the original ledger data includes determining whether a first hash value included in the original ledger data matches a second hash value included in the second ledger data.

[0010] In some embodiments, the first ledger data includes a bitstream, and before receiving the first ledger data, the client device converts the original ledger data into the bitstream based on a conversion rule, and the computer-implemented method further includes: converting the bitstream based on the conversion rule to obtain the original ledger data.

[0011] In some embodiments, the conversion rule comprises at least one of: an encoding scheme corresponding to each of the one or more recorded input parameters; or an order in which the one or more recorded input parameters are arranged in the bitstream.

[0012] In some embodiments, the method further includes: calling a trusted time module to generate a first record timestamp indicating the time when the first ledger data was received; calling a trusted identity module to verify the user identity associated with the client device; calling the trusted time module to generate a second record timestamp indicating the time when the original ledger data was recorded on the blockchain; and calling a trusted computing module to generate a blockchain transaction, the blockchain transaction including the original ledger data, the user identity, the first record timestamp and the second record timestamp.

[0013] In some embodiments, the method further includes: before receiving the first ledger data, establishing a secure communication channel with the client device based on at least one of a two-way Transport Layer Security (TLS) protocol, a two-way Hypertext Transfer Protocol Secure (HTTPS) protocol, or a one-way HTTPS protocol.

[0014] In some embodiments, the first ledger data is associated with a first data file, and the one or more record input parameters include one or more of a hash value of the first data file, attribute information of the first data file, service information of the first data file, a timestamp of the first data file, and signature data of the first data file.

[0015] In some embodiments, the second ledger data is associated with a second data file, and the one or more verification input parameters include one or more of a hash value of the second data file, service information of the second data file, a timestamp of the second data file, and signature data of the second data file.

[0016] In some embodiments, the client device is associated with an additional blockchain different than the blockchain.

[0017] It should be understood that the method described herein may include any combination of the various aspects and features described herein. That is, the method according to this article is not limited to the combination of various aspects and features specifically described herein, but also includes any combination of various aspects and features provided.

[0018] The details of one or more embodiments of the present invention will be set forth in the accompanying drawings and the following description. Other features and advantages of the present invention will be presented through the description and drawings, as well as the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a diagram illustrating an example of an environment that can be used to implement embodiments herein.

[0020] Figure 2 is a diagram showing an example of an architecture according to embodiments herein.

[0021] Figure 3 An example of a system for blockchain transactions according to embodiments herein is depicted.

[0022] Figure 4 Depicted is an example of blockchain data record processing in a service system mode that can be performed according to embodiments of the present invention.

[0023] Figure 5 An example of blockchain data verification processing in a service system mode that can be performed according to embodiments of the present invention is depicted.

[0024] Figure 6 Depicted is an example of blockchain data record processing in a blockchain platform mode that can be performed according to embodiments of the present invention.

[0025] Figure 7An example of blockchain data verification processing in a blockchain platform mode that can be performed according to embodiments of this document is depicted.

[0026] Figure 8 is a schematic diagram showing an example of a blockchain-based trusted platform according to an embodiment of this document.

[0027] Fig. 9 is a diagram showing an example of a system for online transactions according to an embodiment of this document.

[0028] Fig.10 is a diagram showing an example of a system for providing trusted time according to embodiments of the present invention.

[0029] Fig.11 is a diagram showing an example of a system for providing a trusted identity according to embodiments herein.

[0030] Fig.12 is a diagram illustrating an example of a system for trusted execution according to embodiments herein.

[0031] Fig.13 is a diagram showing an example of an architecture for blockchain security according to embodiments of the present invention.

[0032] Fig.14 is a diagram showing an example of a cross-chain communication system according to an embodiment of the present invention.

[0033] Fig.15 Depicted are examples of processing for cross-chain communication that may be performed according to embodiments herein.

[0034] Fig.16 An example of data storage in a blockchain-based trusted platform according to embodiments of the present invention is depicted.

[0035] Fig.17 An example of a system for implementing a blockchain-based trusted platform according to embodiments herein is depicted.

[0036] Fig.18 An example of a process for recording ledger data according to embodiments herein is depicted.

[0037] Fig.19 An example of a process for validating ledger data according to embodiments herein is depicted.

[0038] Fig. 20 Depicted are examples of cross-chain and cross-network data transfer according to embodiments of the present invention.

[0039] Fig.21 Depicted are examples of processing for cross-chain and cross-network data transfers according to embodiments of the present invention.

[0040] Fig. 22 Depicted are examples of cross-network and cross-chain data communications according to embodiments of this document.

[0041] Fig.23 An example of a blockchain-based trusted platform according to embodiments herein is depicted.

[0042] Fig.24 Another example of a blockchain-based trusted platform according to embodiments herein is depicted.

[0043] Fig.25 Depicted are examples of processes that may be performed according to embodiments herein.

[0044] Fig.26 Examples of modules of an apparatus according to embodiments herein are depicted.

[0045] Like reference numbers and designations throughout the various drawings represent like elements. DETAILED DESCRIPTION

[0046] This article describes technologies for a blockchain-based trusted platform. The technologies generally involve blockchain transactions in a blockchain-based trusted platform.

[0047] This article also describes a technology for blockchain nodes to record or verify ledger data. In the prior art, blockchain nodes can generally record ledger data on a blockchain using a standard format. For example, state data can be stored as a key-value pair in a tree structure. The tree structure may include one or more predetermined data fields. When a blockchain node of a blockchain network receives a request from a requester to record ledger data on a blockchain associated with the blockchain network, the requester may not follow the standard format of the blockchain network, so the data fields included in the ledger data to be recorded may be different from the data fields provided in the standard format of the blockchain network. For example, the requester may be a different blockchain node of a different blockchain network, wherein the blockchain network of the requester uses a different standard format, and the ledger data to be recorded may include data fields different from the data fields provided in the standard format of the blockchain node recording the ledger data. Thus, the request to record ledger data on the blockchain may fail due to a mismatch in the data fields.

[0048] Even if the requester generates raw ledger data that meets the standard format of the blockchain network, another problem arises when the requester converts the raw ledger data into a bitstream and sends the bitstream to the blockchain node that records the raw ledger data, where the blockchain node needs to decode the bitstream to obtain the raw ledger data and record the raw ledger data. For example, the blockchain node that records the raw ledger data and the blockchain node of the requester may use different conversion rules to convert between the raw ledger data and the bitstream, so the ledger data decoded by the blockchain node for recording may be different from the original ledger data. Therefore, the recording may fail because the decoded ledger data may not meet the standard format of the blockchain node that records the raw ledger data, even if the raw ledger data may meet the standard format.

[0049] This article describes a possible solution to this problem. A blockchain node of a blockchain network may determine a recording rule that includes one or more recording input parameters for ledger data to be recorded. The recording rule may be public so that a requester may include the one or more recording input parameters in the ledger data to be recorded. The recording rule may also include a bitstream conversion rule so that a requester and a blockchain node may use the same bitstream conversion rule in converting between raw ledger data and a bitstream.

[0050] This article also describes cross-network and cross-chain communication techniques. Blockchain nodes of a blockchain network can perform cross-network and cross-chain communications with different blockchain nodes of different blockchain networks. For example, the life cycle of a contract may involve multiple steps such as negotiating a contract, signing a contract, recording a contract, and executing a contract, and the multiple steps may involve multiple entities such as contracting parties, financial institutions, judicial institutions, and government agencies. Some entities such as financial institutions, judicial institutions, and government agencies may have high requirements for data privacy and security, so they may use a secure private computer network (isolated from the Internet air) to connect their computing devices, so that the computing devices of the Internet cannot exchange data with the computing devices of the private network without permission. Some entities such as contracting parties may not need such high standards of data privacy and security, so they can rely on the Internet to connect their computing devices. The isolation of the Internet and private networks creates technical problems for transmitting data between the Internet and private networks, especially when entities associated with the Internet need to communicate with entities associated with private networks. Existing methods may require the use of external storage (e.g., USB flash drives, external hard drives, or other removable media) to transfer data between the Internet and private networks.

[0051] This problem is magnified when two computing devices of two different computer networks are associated with two different blockchain networks. For example, a computing device associated with the Internet may be a blockchain node of a blockchain network, and a computing device associated with a private network may be a different blockchain node of a different blockchain network. Challenges may exist in cross-chain communication between a blockchain node associated with the Internet and a blockchain node associated with a private network. For example, raw data may be stored on a blockchain associated with the Internet in a standard format including one or more data fields. However, a blockchain network associated with a private network can only parse a different standard format. As a result, a blockchain node associated with a private network may not be able to parse raw data sent by a blockchain node associated with the Internet.

[0052] In order to handle data transmission between two blockchain nodes associated with two different computer networks and two different blockchain networks, the prior art may require an entity associated with a blockchain network to apply for permission to transmit data with another blockchain network. For example, the entity needs to fill out multiple data transmission application forms, and the application forms need to be manually reviewed. In addition, it may be necessary to negotiate conversion rules to format the data to be transmitted so that the blockchain node receiving the data can use the conversion rules to convert the data into a standard format that can be parsed by the blockchain node. The manual review process and the negotiation of conversion rules usually take a long time to complete, thereby reducing the efficiency of data transmission. In addition, because data transmission may rely on removable media and manual transmission of removable media, the data being transmitted may have a risk of leakage from the removable media during the transmission process, so the data privacy and security are low.

[0053] This article describes a feasible solution to this problem. A gateway can be deployed to connect the Internet and a private network. When raw data is transmitted from one blockchain node to another blockchain node, the blockchain node sending the raw data can encrypt the raw data and send the ciphertext to the gateway so that the plaintext of the raw data is not exposed in the data transmission. Then, the other blockchain node can obtain the ciphertext from the gateway and decrypt the ciphertext to obtain the raw data. In addition, the blockchain node sending the raw data can convert the raw data based on a predetermined conversion rule to obtain the converted raw data that can be parsed by another blockchain node.

[0054] The technology described herein produces several technical effects. In some embodiments, the described technology can be applied in various applications and scenarios to provide an effective, trusted, scalable and high-performance blockchain-based environment for online transactions. The described technology provides a blockchain-based trusted platform that allows users to conduct transactions (e.g., legal proceedings, commercial contract execution) in an effective and secure manner in a blockchain-based environment. In some embodiments, the described technology allows users to access blockchain nodes deployed in a blockchain-based trusted platform through a service system that is outside the blockchain-based trusted platform. This prevents users from directly accessing blockchain nodes, thereby reducing the possibility of malicious actors endangering data stored in blockchain nodes. In some embodiments, the described technology supports encryption and authentication using key pairs between a service system and a blockchain-based trusted platform. For example, a service system can send public key-encrypted data to a blockchain-based trusted platform so that the blockchain-based trusted platform can decrypt the encrypted data using a private key. In an example, a blockchain-based trusted platform can send a private key-based digital signature to a service system so that the service system can authenticate the digital signature using a public key. This can provide an additional layer of data security in data transmission between a service system and a blockchain-based trusted platform. In some embodiments, a hash function or algorithm is used to verify whether the data stored in the system has been changed. In one example, the service system or blockchain-based trusted platform can calculate a hash value of the received data and compare the hash value with a previously stored hash value. If the two hash values ​​match, it can be determined that the data has not been changed. If the two hash values ​​do not match, it can be determined that the data has been changed. This can reduce the possibility that the data stored in the system has been forged or tampered with.

[0055] In some embodiments, a blockchain-based trusted platform can be implemented in a trusted execution environment (TEE). A TEE is a trusted execution environment that is isolated from the operating environment of the hardware (e.g., operating system (OS), basic input / output system (BIOS)) within the hardware (one or more processors, memory). A TEE is a separate secure area of ​​the processor that ensures the confidentiality and integrity of the code executed within the main processor and the data loaded into the main processor. The blockchain and TEE technologies described herein can be used to generate highly reliable records related to online transactions. In addition to the TEE, the described technology allows a blockchain-based trusted platform to utilize the functions of a trusted time module, a trusted identity module, and a trusted computing module to authenticate documents and / or user identities in a manner that complies with relevant evidence rules. This can enable applications based on blockchain-based trusted platforms that provide services to save verified records of information related to events that occur at each of multiple steps or key time points in the service in a manner that complies with (or is more consistent with than previous systems) evidence rules (e.g., who, what, and when). Therefore, the credibility of data generated by applications running in blockchain-based trusted platforms can be enhanced.

[0056] In some embodiments, the described technology provides a cross-chain communication system that allows reliable and efficient data transmission between two blockchain networks. In one example, the cross-chain communication system can utilize the functions of service smart contracts and cross-chain smart contracts executed in blockchain nodes of a blockchain network. In the example, the cross-chain communication system can also utilize the functions of cross-chain relay components and oracle machines implemented in cross-chain communication components of the blockchain network. Smart contracts and cross-chain communication components enable automatic and efficient cross-chain data transmission, for example, by converting ledger data into a unified data format.

[0057] In some embodiments, the described technology provides a predetermined recording rule for a blockchain-based trusted platform to record account data, wherein the recording rule provides one or more recording input parameters and an input format associated with the one or more recording input parameters for the account data to be recorded. This allows a requester who intends to record account data on a blockchain-based trusted platform to include one or more recording input parameters in the account data and ensure that the input value of the requester to the one or more recording input parameters satisfies the input format. In some embodiments, a verification rule is also predetermined for a blockchain-based trusted platform, wherein the verification rule provides one or more verification input parameters and an input format associated with one or more verification input parameters for the account data to be verified. This allows a requester who intends to verify account data on a blockchain-based trusted platform to include one or more verification input parameters in the account data and ensure that the input value of the one or more verification input parameters of the requester satisfies the input format. In some embodiments, a bitstream conversion rule is predetermined for a blockchain-based trusted platform so that the requester and the blockchain node that records or verifies the account data can use the same bitstream conversion rule in the conversion between the original account data and the bitstream. Therefore, the described technology can prevent recording or verification failures due to mismatches in data fields, data formats, and / or bitstream conversion rules. The described technology can therefore reduce data retransmission and data reprocessing due to recording or verification failures, thereby reducing the consumption of computing, memory, and networking resources of blockchain nodes.

[0058] In some embodiments, the described technology can establish a secure communication channel between a blockchain-based trusted platform and a requester. The secure communication channel can be established based on, for example, a two-way Transport Layer Security (TLS) protocol, a two-way Hypertext Transfer Protocol Secure (HTTP) protocol, a one-way HTTP protocol, etc. This can enhance the data security of the ledger data transmitted between the blockchain-based trusted platform and the requester.

[0059] In some embodiments, the described technology provides a trusted time module for generating a record timestamp, a trusted identity module for verifying a user identity associated with a requester, and a trusted computing module for generating a blockchain transaction when recording the original ledger data. This can enable a blockchain-based trusted platform to save a verified record of information about events that occurred during the recording of the original ledger data (e.g., who, what, when). Therefore, the credibility of the original ledger data recorded by the blockchain-based trusted platform can be enhanced.

[0060] In some embodiments, the described technology enables a blockchain-based trusted platform to verify that the original data (e.g., a data file) associated with the ledger data has not been tampered with based on the hash value of the original data. The blockchain-based trusted platform can compare the hash value of the original data with the hash value recorded in the blockchain-based trusted platform. If the blockchain-based trusted platform finds that the hash value of the original data matches the hash value recorded in the blockchain-based trusted platform, the blockchain-based trusted platform can determine that the original data has not been tampered with. This allows the blockchain-based trusted platform to verify the original data without the requester sending the original data itself to the blockchain-based trusted platform. Therefore, the data privacy and data security of the original data can be enhanced.

[0061] In some embodiments, the described technology provides a gateway for interconnecting a blockchain network associated with the Internet and another blockchain network associated with a private network. When a blockchain node of one blockchain network sends raw data to another blockchain node of another blockchain network, the blockchain node sending the raw data can encrypt the raw data and send the ciphertext to the gateway. Then, the blockchain node receiving the raw data can obtain the ciphertext from the gateway. It allows the ciphertext to remain encrypted in the data transmission between the two blockchain nodes, thereby improving the data privacy and security of the raw data. In some embodiments, the blockchain node sending the ciphertext can generate one or more zero-knowledge proofs (ZKPs) associated with the raw data, wherein the one or more ZKPs can be used to determine that the data to be decrypted from the ciphertext is safe without decrypting the ciphertext. This can reduce the security risks of the private network and the Internet, for example, by reducing the risk of viruses or malware. Since the ciphertext can be verified without decryption, the data privacy and data security of the raw data can also be enhanced. In some embodiments, the blockchain node sending the raw data can convert the raw data based on a predetermined conversion rule to obtain the converted raw data that can be parsed by another blockchain node of another blockchain network. This can prevent parsing failures caused by mismatches in data fields, data formats, and / or bitstream conversion rules between the two blockchain nodes. This can reduce data retransmission and data reprocessing due to parsing failures, thereby reducing the consumption of computing, memory, and network resources of blockchain nodes.

[0062] To provide further background for the embodiments herein, as described above, a distributed ledger system (DLS), which may also be referred to as a consensus network (e.g., composed of peer-to-peer nodes) and a blockchain network, enables participating entities to conduct transactions and store data securely and immutably. Although the term blockchain is often associated with a specific network and / or use case, blockchain as used herein generally refers to a DLS without reference to any specific use case.

[0063] The blockchain is a data structure that stores transactions in a way that they cannot be tampered with. Therefore, the transactions recorded on the blockchain are reliable and trustworthy. The blockchain includes one or more blocks. Each block in the chain is linked to the previous block by a cryptographic hash of the previous block immediately preceding it in the chain. Each block also includes a timestamp, its own cryptographic hash, and one or more transactions. Transactions that have been verified by nodes in the blockchain network are hashed and encoded into a Merkle tree. A Merkle tree is a data structure in which the data at the leaf nodes of the tree are hashed, and all hash values ​​in each branch of the tree are cascaded at the root of the branch. This process proceeds along the tree until the root of the entire tree, where hash values ​​representing all the data in the tree are stored. The hash value can be quickly verified by determining whether the hash value claimed to be a transaction stored in the tree is consistent with the structure of the tree.

[0064] A blockchain is a decentralized or at least partially decentralized data structure for storing transactions, and a blockchain network is a network of computing nodes that manage, update, and maintain one or more blockchains by broadcasting, verifying, and confirming transactions. As described above, a blockchain network may be provided as a public blockchain network, a private blockchain network, or a consortium blockchain network. The embodiments of the present invention are further described in detail herein with reference to a consortium blockchain network. However, it is contemplated that the embodiments of the present invention may be implemented in any suitable type of blockchain network.

[0065] Typically, consortium blockchain networks are private among participating entities. In a consortium blockchain network, the consensus process is controlled by a set of authorized nodes, which may be referred to as consensus nodes, and one or more consensus nodes are operated by the respective entity (e.g., financial institution, insurance company). For example, a consortium of ten (10) entities (e.g., financial institutions, insurance companies) may operate a consortium blockchain network, with each entity operating at least one node in the consortium blockchain network.

[0066] In some examples, in a consortium blockchain network, a global blockchain is provided as a blockchain replicated across all nodes. That is, all consensus nodes are in a state of complete consensus about the global blockchain. In order to reach consensus (e.g., agree to add a block to the blockchain), a consensus protocol is implemented within the consortium blockchain network. For example, the consortium blockchain network can implement a practical Byzantine fault tolerance (PBFT) consensus, which will be described in further detail below.

[0067] Figure 11 is a diagram showing an example of an environment 100 that can be used to perform embodiments of the present invention. In some examples, the environment 100 enables entities to participate in a consortium blockchain network 102. The environment 100 includes computing systems 106, 108 and a network 110. In some examples, the network 120 includes a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and connects websites, user devices (e.g., computing devices), and back-end systems. In some examples, the network 110 can be accessed through a wired and / or wireless communication link. In some examples, the network 110 enables communication with the consortium blockchain network 102, as well as communication within the consortium blockchain network 102. In general, the network 110 represents one or more communication networks. In some cases, the computing systems 106, 108 can be nodes of a cloud computing system (not shown), or each of the computing systems 106, 108 can be a separate cloud computing system that includes multiple computers interconnected by a network and used as a distributed processing system.

[0068] In the depicted example, computing systems 106, 108 may each include any suitable computing device capable of participating as a node in consortium blockchain network 102. Examples of computing devices include, but are not limited to, servers, desktop computers, laptop computers, tablet computing devices, and smart phones. In some examples, computing systems 106, 108 host one or more computer-implemented services for interacting with consortium blockchain network 102. For example, computing system 106 may host a computer-implemented service for a first entity (e.g., user A), such as a transaction management system used by the first entity to manage its transactions with one or more other entities (e.g., other users). Computing system 108 may host a computer-implemented service for a second entity (e.g., user B), such as a transaction management system used by the second entity to manage its transactions with one or more other entities (e.g., other users). Figure 1 In the example of , the consortium blockchain network 102 is represented as a peer-to-peer network of nodes, and the computing systems 106 , 108 provide nodes of a first entity and a second entity participating in the consortium blockchain network 102 , respectively.

[0069] Figure 2An example of an architecture 200 according to an embodiment of the present invention is depicted. The exemplary conceptual architecture 200 includes participant systems 202, 204, 206 corresponding to participant A, participant B, and participant C, respectively. Each participant (e.g., user, enterprise) participates in a blockchain network 212 provided as a peer-to-peer network, which includes multiple nodes 214, at least some of which record information in an unalterable manner in a blockchain 216. As further detailed herein, although a single blockchain 216 is schematically depicted in the blockchain network 212, multiple copies of the blockchain 216 are provided and maintained on the blockchain network 212.

[0070] In the depicted example, each participant system 202, 204, 206 is provided by or on behalf of participant A, participant B, and participant C, respectively, and serves as a respective node 214 in the blockchain network. As used herein, a node generally refers to an individual system (e.g., a computer, a server) that is connected to the blockchain network 212 and enables the corresponding participant to participate in the blockchain network. Figure 2 In the example of , a participant corresponds to each node 214. However, it is contemplated that a participant may operate multiple nodes 214 within the blockchain network 212, and / or multiple participants may share a node 214. In some examples, the participant systems 202, 204, 206 communicate with or through the blockchain network 212 using a protocol (e.g., Hypertext Transfer Protocol Secure (HTTPS)) and / or using remote procedure calls (RPCs).

[0071] The nodes 214 may have different levels of participation within the blockchain network 212. For example, some nodes 214 may participate in the consensus process while other nodes 214 do not. As another example, some nodes 214 store a complete copy of the blockchain 216 while other nodes 214 store only a partial copy of the blockchain 216. For example, data access permissions may limit the blockchain data stored by the corresponding participants within their respective systems. Figure 2 In the example of , participant systems 202 , 204 , and 206 store complete copies 216 ′, 216 ″, and 216 ′″ of blockchain 216 , respectively.

[0072] Blockchain (e.g. Figure 2The blockchain 216) consists of a chain of blocks, each of which stores data. Examples of data include transaction data representing a transaction between two or more participants. Although "transaction" is used herein by way of non-limiting example, it is contemplated that any suitable data may be stored in the blockchain (e.g., documents, images, videos, audio). Examples of transactions may include, but are not limited to, the exchange of valuables (e.g., assets, products, services, currencies). Transaction data is stored in an immutable manner in the blockchain. That is, the transaction data cannot be changed.

[0073] Before storing the transaction data in the block, the transaction data is hashed. Hashing is the process of converting the transaction data (provided as string data) into a fixed-length hash value (also provided as string data). It is impossible to un-hash the hash value to obtain the transaction data. Hashing ensures that even a small change in the transaction data will result in a completely different hash value. In addition, as mentioned above, the hash value has a fixed length. That is, regardless of the size of the transaction data, the length of the hash value is fixed. Hashing includes processing the transaction data through a hash function to generate a hash value. Examples of hash functions include, but are not limited to, the Secure Hash Algorithm (SHA)-256 that outputs a 256-bit hash value.

[0074] The transaction data of multiple transactions are hashed and stored in a block. For example, the hashes of two transactions are provided and they themselves are hashed to provide another hash. This process is repeated until a single hash is provided for all transactions to be stored in a block. This hash is called the Merkle root hash and is stored in the header of the block. Changes in any transaction will cause its hash to change and ultimately the Merkle root hash to change.

[0075] Blocks are added to the blockchain through a consensus protocol. Multiple nodes in the blockchain network participate in the consensus protocol and perform work to add blocks to the blockchain. Such nodes are called consensus nodes. The PBFT introduced above is used as a non-limiting example of a consensus protocol. Consensus nodes execute the consensus protocol to add transactions to the blockchain and update the overall state of the blockchain network.

[0076] In more detail, the consensus node generates a block header, hashes all transactions in the block, and combines the hashes in pairs to generate further hashes until a single hash (Merkle root hash) is provided for all transactions in the block. This hash is added to the block header. The consensus node also determines the hash of the latest block in the blockchain (i.e. the last block added to the blockchain). The consensus node also adds a nonce value and a timestamp to the block header.

[0077] In general, PBFT provides practical Byzantine state machine replication that tolerates Byzantine faults (e.g., faulty nodes, malicious nodes). This is achieved by assuming in PBFT that failures will occur (e.g., assuming that there are independent node failures and / or manipulated messages sent by consensus nodes). In PBFT, consensus nodes are provided in a sequence that includes a primary consensus node and a backup consensus node. The primary consensus node is changed periodically. Transactions are added to the blockchain by all consensus nodes within the blockchain network reaching a consensus on the world state of the blockchain network. In this process, messages are transmitted between consensus nodes, and each consensus node proves that the message was received from a specified peer node and verifies that the message was not modified during transmission.

[0078] In PBFT, the consensus protocol is provided in multiple stages with all consensus nodes starting from the same state. First, the client sends a request to the primary consensus node to invoke a service operation (e.g., execute a transaction within the blockchain network). In response to receiving the request, the primary consensus node multicasts the request to the backup consensus nodes. The backup consensus nodes execute the request, and each node sends a reply to the client. The client waits until a threshold number of replies are received. In some examples, the client waits until f+1 replies are received, where f is the maximum number of faulty consensus nodes that can be tolerated within the blockchain network. The end result is that a sufficient number of consensus nodes agree on the requirements for the record to be added to the blockchain, and the record is either accepted or rejected.

[0079] In some blockchain networks, cryptographic schemes are implemented to maintain the privacy of transactions. For example, if two nodes want to keep a transaction private so that other nodes in the blockchain network cannot see the details of the transaction, the two nodes can encrypt the transaction data. Examples of encryption include, but are not limited to, symmetric encryption and asymmetric encryption. Symmetric encryption refers to the use of a single key for both encryption (generating ciphertext from plaintext) and decryption (generating plaintext from ciphertext). In symmetric encryption, the same key can be used by multiple nodes so that each node can encrypt / decrypt the transaction data.

[0080] Asymmetric encryption uses key pairs, each of which consists of a private key and a public key, where the private key is known only to the corresponding node and the public key is known to any or all other nodes in the blockchain network. A node can encrypt data using the public key of another node, and the encrypted data can be decrypted using the private key of the other node. For example, referring again to Figure 2, participant A can encrypt data using participant B's public key and send the encrypted data to participant B. Participant B can decrypt the encrypted data (ciphertext) using its private key and extract the original data (plaintext). Messages encrypted using a node's public key can only be decrypted using the node's private key.

[0081] Asymmetric encryption is used to provide digital signatures, which allow participants in a transaction to confirm the other participants in the transaction and the validity of the transaction. For example, a node can digitally sign a message, and another node can confirm that the message was sent by the node based on the digital signature of participant A. Digital signatures can also be used to ensure that the message has not been tampered with during transmission. For example, again referring to Figure 2 , participant A sends a message to participant B. Participant A generates a hash value of the message and then encrypts the hash value using its private key to provide a digital signature that is an encrypted hash value. Participant A appends the digital signature to the message and sends the message with the digital signature to participant B. Participant B decrypts the digital signature using participant A's public key and extracts the hash value. Participant B hashes the message and compares the hash values. If the hash values ​​are the same, participant B can confirm that the message is indeed from participant A and has not been tampered with.

[0082] In some embodiments, nodes of the blockchain network and / or nodes communicating with the blockchain network are able to operate using a trusted execution environment (TEE). At a high level, a TEE is a trusted execution environment within the hardware (one or more processors, memory) that is isolated from the operating environment of the hardware (e.g., operating system (OS), basic input / output system (BIOS)). In more detail, a TEE is a separate secure area of ​​the processor that ensures the confidentiality and integrity of the code executed within the main processor and the data loaded into the main processor. Within the processor, the trusted execution environment runs in parallel with the operating system. At least part of the so-called trusted application (TA) is executed within the trusted execution environment and has access to the processor and memory. Through the trusted execution environment, trusted applications can be protected from other applications running in the main operating system. In addition, the trusted execution environment encrypts and isolates trusted applications from each other within the trusted execution environment.

[0083] An example of a trusted execution environment includes Software Guard Extensions (SGX) provided by Intel Corporation of Santa Clara, California, U.S. Although SGX is discussed herein by way of example, it is contemplated that any suitable trusted execution environment may be used to implement the embodiments herein.

[0084] SGX provides a hardware-based trusted execution environment. In SGX, the trusted hardware is the core of the central processing unit (CPU), and a portion of the physical memory is isolated to protect selected code and data. The isolated portion of the memory is called an enclave. More specifically, the enclave is provided as an enclave page cache (EPC) in the memory and mapped to the application address space. The memory (e.g., DRAM) includes a reserved random access memory (PRM) for SGX. The random access memory is a continuous memory space at the lowest BIOS level and cannot be accessed by any software. Each enclave page cache is a memory set (e.g., 4 KB) allocated by the operating system to load application data and code in the random access memory. The enclave page cache metadata (EPCM) is the entry address of the corresponding enclave page cache and ensures that each enclave page cache can only be shared by one enclave. That is, a single enclave can use multiple enclave page caches, and the enclave page cache is dedicated to a single enclave.

[0085] During the execution of a trusted application, the processor runs in so-called enclave mode when accessing data stored in the enclave. Running in enclave mode performs additional hardware checks on each memory access. In Software Guard Extensions (SGX), trusted applications are compiled into trusted and untrusted parts. For example, the OS, BIOS, privileged system code, virtual machine manager (VMM), system management mode (SMM), etc. cannot access the trusted part. In operation, the trusted application runs in the PRM of the memory and creates an enclave. The trusted function executed by the trusted part within the enclave is called by the untrusted part, and the code executed within the enclave treats the data as plaintext data (unencrypted) and denies external access to the data. The trusted part provides an encrypted response to the call, and the trusted application continues to execute.

[0086] An attestation process may be performed to verify that the expected code (e.g., a trusted portion of a trusted application) is being securely executed within the trusted execution environment provided by SGX. Typically, the attestation process includes the trusted application receiving an attestation request from a challenger (e.g., another node in a blockchain network, a key management system (KMS) of the blockchain network). In response, the trusted application requests its enclave to generate a remote attestation, also referred to as a quote. Generating a remote attestation includes the local attestation being sent from the enclave to a so-called quote enclave, which verifies the local attestation, and converting the local attestation to a remote attestation by signing the local attestation with an asymmetric attestation key. The remote attestation (quote) is provided to the challenger (e.g., a key management system of the blockchain network).

[0087] The challenger uses the attestation verification service to verify the remote attestation. For SGX, Intel provides the Intel Attestation Service (IAS), which receives the remote attestation from the challenger and verifies the remote attestation. More specifically, IAS processes the remote attestation and provides a report (e.g., an attestation verification report (AVR)) indicating whether the remote attestation has been confirmed. If not confirmed, an error may be indicated. If confirmed (the expected code is securely executed in the trusted execution environment), the challenger can start or continue to interact with the trusted application. For example, in response to verification, the key management system (as a challenger) can issue asymmetric encryption keys (e.g., public and private key pairs) to the node executing the trusted execution environment (e.g., after a key exchange process, such as Elliptic Curve Diffie-Hellman (ECDH)) to enable the node to communicate securely with other nodes and / or clients.

[0088] This document describes techniques for implementing a blockchain-based system (which may be a trusted online system) that enhances trust between users and provides various services or processing tools to allow users to conduct transactions (e.g., legal proceedings, commercial contract execution) in an efficient manner. Figure 3 , Figure 3 An example of a system 300 for blockchain transactions is shown. In some embodiments, the system 300 may be a blockchain system associated with a judicial institution and / or a user of judicial services. The system 300 may be deployed on a private network or the Internet. In some embodiments, the system 300 may be a blockchain system for executing and recording contracts or agreements between parties (e.g., real estate contracts). Figure 3 In the example shown, the system 300 includes a blockchain-based trusted platform / system 312, which includes a blockchain access layer 314, participating nodes (e.g., nodes 308-1, 308-2, 310-1, and 310-2), and a blockchain platform layer 316. In some embodiments, the blockchain access layer 314 may include a communication interface that allows entities external to the blockchain-based trusted platform 312 to communicate with participating nodes of the blockchain-based trusted platform 312. The blockchain access layer 314 may include one or more of a graphical user interface (GUI), a command line, a script, and an application programming interface (API). In some embodiments, the blockchain platform layer 316 may provide service capabilities for Internet information infrastructure and may support cloud storage deployments such as public clouds and private clouds. The blockchain platform layer 316 may also provide support for secure storage, analysis, and computation of data stored in the trusted platform 312.

[0089] Participating nodes of the blockchain-based trusted platform 312 include blockchain nodes such as nodes 308-1 and 308-2. In the example shown, blockchain nodes 308-1 and 308-2 may be blockchain nodes deployed by a court or judicial institution. The blockchain-based trusted platform 312 also includes third-party blockchain nodes such as nodes 310-1 and 310-2. In some embodiments, third-party blockchain nodes may have identity management, permission control functions (e.g., permission management based on smart contracts, users, blockchains), and hierarchical access control. In some examples, third-party nodes 310-1 and 310-2 may include blockchain nodes, such as credential issuing authority nodes, time service nodes, and forensic expertise nodes. Note that for illustrative purposes, the blockchain-based trusted platform 312 is shown to include nodes 308-1, 308-1, 310-1, and 310-2. The blockchain-based trusted platform 312 may include any suitable number of non-third-party nodes and third-party nodes. In some embodiments, one or more of the nodes 308 - 1 , 308 - 1 , 310 - 1 , and 310 - 2 may be consensus nodes participating in a consensus process of the blockchain-based trusted platform 312 .

[0090] As previously described, the blockchain access layer 314 may include a communication interface that allows entities external to the blockchain-based trusted platform 312 to communicate with participating nodes of the blockchain-based trusted platform 312. In the example shown, the blockchain access layer 314 may be configured to allow external service systems (e.g., service systems 306-1 to 306-6) to communicate with participating blockchain nodes (e.g., nodes 308-1, 308-1, 310-1, and 310-2) in the blockchain-based trusted platform 312. In some embodiments, the service systems 306-1 to 306-6 may include computer systems that do not participate in the consensus processing of the blockchain-based trusted platform 312. The service systems 306-1 to 306-6 may be configured to provide services to the user 302 by accessing the blockchain-based trusted platform 312. In some examples, the service system (e.g., service system 306-1) may allow the user to digitally fill out and submit legal documents in accordance with the consensus processing performed by the participating nodes of the blockchain-based trusted platform 312 in a manner that complies with relevant legal regulations. In some examples, a service system (e.g., service system 306-2) may allow a party to execute a court order in a manner consistent with relevant legal provisions, such as issuing a bank levy court order digitally to the other party's bank. In some embodiments, one or more service systems and blockchain nodes of a blockchain-based trusted platform 312 may form a subsystem. In the example shown, service systems 306-1 and 306-2 and blockchain node 308-1 may form a subsystem 304-1 deployed in a judicial institution (e.g., a court). Note that for illustrative purposes only, subsystem 304-1 is shown as being deployed in a judicial institution (e.g., a court). Subsystem 304-1 and other subsystems 304-2 and 304-3 may be systems deployed in any suitable type of institution or facility, such as a real estate agent, broker, commercial bank, third-party escrow, police station, government agency, etc. In some embodiments, a subsystem including at least one blockchain node of a blockchain-based trusted platform 312 may be referred to as a node subsystem, and a subsystem not including any blockchain node of a blockchain-based trusted platform 312 may be referred to as a non-node subsystem. In the example shown, subsystem 304-1 includes a blockchain node 308-1 in a blockchain-based trusted platform 312, so the court deploying subsystem 304-1 can be referred to as a court connected to the blockchain (e.g., a node court). Subsystem 304-2 does not include any blockchain node of the blockchain-based trusted platform 312, so the court deploying subsystem 304-2 is referred to as a court not connected to the blockchain (e.g., a non-node court).

[0091] In some embodiments, the services provided by the service systems 306-1 to 306-6 may include two types: blockchain data recording and blockchain data verification. In some examples, the blockchain data recording service may be initiated by the user 302 sending data in a digital document or file (e.g., a legal document, a business contract) to the service system (e.g., the service system 306-1). The data may be processed by the service system and recorded in the blockchain in the blockchain node (e.g., blockchain node 308-1) stored in the blockchain-based trusted platform 312. The blockchain data verification service may be initiated by the user sending a request to the service system to verify the data. The service system receiving the request may process the request and verify the data. In some embodiments, the ledger data may be generated during the blockchain data recording and verification process. In some embodiments, the blockchain data recording and verification process may be performed in one or more of the service system mode and the blockchain platform mode. In the service system mode, the service system (e.g., the service system 306-1) may generate the ledger data based on the data received from the user (e.g., user 302), and send the ledger data to the blockchain node (e.g., blockchain node 308-1) for recording. In a blockchain platform-based model, a blockchain node (e.g., blockchain node 308-2) may generate ledger data based on data received from a user (e.g., user 302), and record the ledger data in a blockchain stored in the blockchain node. Figures 4 to 7 The blockchain data record verification process in both modes is described in more detail.

[0092] Figure 4 An example of a blockchain data record process 400 in a service system mode that can be performed according to embodiments of the present invention is depicted. For convenience, the process 400 will be described as being performed by a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, an appropriately programmed computer such as Figure 3 The blockchain-based system of system 300 may perform process 400 .

[0093] Process 400 begins at step 410, where a user 402 sends data for recording to a service system 404. In some embodiments, user 402 may send a request for recording data to service system 404, where the request includes data. In some embodiments, the data may be in the format of a digital document (e.g., a business agreement) or a digital file (e.g., a forensic image, video, etc.).

[0094] User 402 can be as in Figure 3In some embodiments, user 402 may include, for example, any computer, module, server, or computing element that is coded to perform the methods described herein. In some examples, user 402 may include a web browser and software applications for providing various functions of a client computing device. In some embodiments, service system 404 may be, for example, Figure 3 The service system described in the description of (eg, service system 306 - 1 ).

[0095] At step 412, service system 404 may trigger data recording after receiving data from user 402. In some embodiments, service system 404 may automatically trigger data recording in response to receiving data or a request from user 402. In some examples, service system 404 may include a smart contract for processing data or requests received from user 402. Once the smart contract receives data or a request from a user, the smart contract may automatically execute to perform the following data recording process.

[0096] In some embodiments, service system 404 may verify the identity of user 402 after receiving data from user 402. In some examples, user 402 may send a user identification along with the data to service system 404 so that service system 404 may compare the received user identification with the user identifications of authorized users stored in service system 404. If it is determined that user 402 is an unauthorized user, service system 404 may ignore the request from user 402 and discard the data. If it is determined that user 402 is an authorized user, service system 404 may continue to process the received data.

[0097] At step 414, the service system 404 calculates a hash value based on the data received from the user 402. In some embodiments, the hash value may be calculated according to a predetermined cryptographic hash function or algorithm (e.g., an MD5 message digest algorithm, a SHA-1 (Secure Hash Algorithm 1) hash function, and a Whirlpool hash function, etc.). In some examples, the service system 404 may apply a predetermined hash function to the data received from the user and generate a hash value for the data. In some examples, the service system 404 may generate a hash value based on the data received from the user 404 and a user identification of the user 404.

[0098] In step 416, the service system 404 stores the data received from the user 402 in the local storage of the service system 404. In some embodiments, the service system 404 may also include a local storage subsystem, which includes a storage medium such as a non-volatile memory express (NVME), an SSD, a hard disk drive (HDD), or a laminated magnetic recording (SMR). In some embodiments, the local storage subsystem of the service system 404 may be generated or expanded to obtain better availability, partition tolerance, flexibility, and cost. For example, the local storage subsystem of the service system 404 may be expanded by adding more servers or storage nodes and thereby increasing capacity and performance. The local storage subsystem may also use standard servers, drives, and networks at lower prices. In some embodiments, the local storage subsystem of the storage system 404 may improve the utilization of standard servers, thereby resulting in less power consumption, maintenance costs, better cooling efficiency, space utilization, and the like.

[0099] In some embodiments, the service system 404 may include a multi-layer storage subsystem including multiple storage devices configured to store data based on the frequency of data access. In some examples, the service system 404 may include a first storage device, such as a cloud disk or a cloud-based storage device (e.g., an SSD cloud disk, an embedded SSD (ESSD) cloud disk), for storing the most frequently accessed data. The service system 404 may include a second storage device, such as a NAS (network attached storage) device, for storing data with a lower access frequency.

[0100] In step 418, the service system 404 generates ledger data based on the hash value generated in step 414, and sends the ledger data to the blockchain-based trusted platform 406. In some embodiments, the blockchain-based trusted system 406 can be implemented as Figure 3 In some examples, the blockchain-based trusted system 406 may include one or more blockchain nodes (e.g., blockchain node 308-1), and the service system 404 may send the ledger data to a blockchain node of the blockchain-based trusted system 406. In some embodiments, the service system 404 may send the ledger data to a blockchain node of the blockchain-based trusted system 406. Figure 3 The communication interface such as the blockchain access layer 314 sends the ledger data to the blockchain-based trusted system 406.

[0101] In some embodiments, the ledger data includes the hash value generated in step 414. The ledger data may include additional information, such as metadata of the data and the hash value received from user 402. In some examples, the metadata may include one or more of the author of the data or hash value, the creation date, the modification date, and the file size.

[0102] In some embodiments, the service system 404 may encrypt the ledger data according to a predetermined encryption function or algorithm. In some examples, the service system 404 may encrypt the ledger data using a public key of the blockchain-based trusted platform 406, and send the encrypted ledger data to the blockchain-based trusted platform 406 to decrypt the encrypted ledger data using its private key.

[0103] In step 420, after receiving the ledger data from the service system 404, the blockchain-based trusted platform 406 stores the ledger data including the hash value in the blockchain-based trusted platform 406. In some embodiments, the blockchain-based trusted platform 406 may store the ledger data in one or more participating nodes of the blockchain-based trusted platform 406. In some embodiments, the one or more participating nodes of the blockchain-based trusted platform 406 may be consensus nodes participating in the consensus processing of the blockchain. In some embodiments, the consensus nodes (e.g., Figure 3 The blockchain nodes 308-1, 308-2 and / or third-party blockchain nodes 310-1 and 310-2 of the blockchain can perform consensus processing on the ledger data. After reaching a consensus among the consensus nodes, the blockchain-based trusted platform 406 can record the ledger data in a blockchain stored in one or more participating nodes of the blockchain-based trusted platform 406.

[0104] In some embodiments, the blockchain-based trusted platform 406 may receive encrypted ledger data from the service system 404. In some examples, the encrypted ledger data may be encrypted using a public key based on asymmetric key encryption of the blockchain-based trusted platform 406. The blockchain-based trusted platform 406 may decrypt the encrypted ledger data using a private key paired with the public key and obtain the ledger data.

[0105] At step 422, the blockchain-based trusted platform 406 generates a credential corresponding to the ledger data. In some embodiments, the credential may include any suitable type of credential for recording the ledger data. In some examples, the credential may include an identification of the ledger data and / or a digital signature of the blockchain-based trusted platform 406, which is generated based on the ledger data using a private key of the blockchain-based trusted platform 406. In some embodiments, the credential may uniquely identify the ledger data.

[0106] At step 424, the blockchain-based trusted platform 406 may return the credential to the service system 404. In some examples, the credential may include a digital signature generated using a private key of the blockchain-based trusted platform 406 based on the ledger data, such that the service system 404 may verify the digital signature using a public key of the blockchain-based trusted platform 406.

[0107] In step 426, after receiving the credential from the blockchain-based trusted platform 406, the service system 404 sends the recording result to the user 402. In some embodiments, the recording result includes the credential. In some embodiments, the recording result includes a notification to the user 402 indicating whether the data recording is completed. In some embodiments, the service system 404 may verify the credential, for example, when the credential includes a digital signature of the blockchain-based trusted platform 406. In some examples, the service system 404 may verify the digital signature using the public key of the blockchain-based trusted platform 406. If the digital signature is valid, the service system 404 may send the credential in the recording result to the user 402 and notify the user 402 in the recording result that the data recording is completed. If the digital signature is invalid, the service system 404 may not send the credential to the user 402, or the service system 404 may notify the user 402 that the data recording is not completed.

[0108] Figure 5 An example of a blockchain data verification process 500 in a service system mode that can be performed according to embodiments of the present invention is depicted. For convenience, the process 500 will be described as being performed by a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, a blockchain-based system that is appropriately programmed, such as Figure 3 The system 300 may perform the process 500 .

[0109] Process 500 begins at step 510, where a user 502 sends a request for verification data to a service system 504. User 502 may be, for example, Figure 3 User 302 is depicted. In some embodiments, user 502 may include, for example, any suitable computer, module, server, or computing element that is encoded to perform the methods described herein. In some examples, user 502 may include a web browser and software applications for providing various functions of a client computing device. In some embodiments, service system 504 may be implemented as Figure 3 A service system in, for example, service system 306-1.

[0110] In some embodiments, a request for verification of data may include credentials corresponding to ledger data generated based on the data. In some embodiments, the credentials may be configured to uniquely identify the data and the ledger data. In some examples, the credentials and the ledger data may be in a format similar to Figure 4 The ledger data may be generated in a previous data recording process of the process 400 of . In this example, the ledger data may be generated by the service system 504 and recorded in the blockchain-based trusted platform 506 in the previous data recording process. The ledger data may include a hash value of the data. In some embodiments, the hash value may be calculated by the service system 504 according to a predetermined cryptographic hash function or algorithm (e.g., an MD5 message digest algorithm, a SHA-1 (Secure Hash Algorithm 1) hash function, and a Whirlpool hash function, etc.). The ledger data may include additional information, such as metadata of the data. The metadata may include one or more of the author, creation date, modification date, and file size of the data.

[0111] In the above example, the credential may be generated by the blockchain-based trusted platform 506 and sent to the user 502 in a previous data record process. In some embodiments, the credential may include an identification of the ledger data. In some embodiments, the credential may include a digital signature of the blockchain-based trusted platform 506, which is generated based on the ledger data using a private key of the blockchain-based trusted platform 506.

[0112] In step 512, after receiving the request for verifying the data, the service system 504 obtains the data from the local storage of the service system 504. In some embodiments, the local storage of the service system 504 may include storage media such as NVME, SSD, HDD, and SMR. In some embodiments, the service system 502 may obtain the data based on the credentials included in the request.

[0113] At step 514, the service system 504 calculates a hash value based on the data obtained at step 512. In some embodiments, the hash value may be calculated by the service system 504 according to the same cryptographic hash function or algorithm used to calculate the hash value in the previous data record process.

[0114] At step 516, the service system 504 sends the calculated hash value to the blockchain-based trusted platform 506. In some embodiments, the service system 504 may send the credential with the calculated hash value to the blockchain-based trusted platform 506. In some embodiments, the service system 504 may encrypt the hash value and / or the credential and send the encrypted information to the blockchain-based trusted platform 506. In some examples, the service system 504 may encrypt the hash value and / or the credential using the public key of the blockchain-based trusted platform 506 so that the blockchain-based trusted platform 506 can decrypt the encrypted information using its private key.

[0115] At step 518, after receiving the hash value from the service system 504, the blockchain-based trusted platform 506 compares the received hash value with the hash value previously stored in the blockchain-based trusted platform 506. In some embodiments, the blockchain-based trusted platform 506 may receive an encrypted hash value and / or credential from the service system 504. In some examples, the encrypted hash value and / or credential may be encrypted using a public key of the blockchain-based trusted platform 506. The blockchain-based trusted platform 506 may decrypt the encrypted data using a private key paired with the public key and obtain the hash value and / or credential.

[0116] In some embodiments, the blockchain-based trusted platform 506 can obtain the ledger data from the local storage of the blockchain-based trusted platform 506 according to the credentials received from the service system 504, and obtain the hash value in the ledger data. In some embodiments, the blockchain-based trusted platform 506 can obtain the ledger data from one or more participating blockchain nodes of the blockchain-based trusted platform 506 according to the credentials, and obtain the hash value in the ledger data.

[0117] In step 520, the blockchain-based trusted platform 506 sends the verification result to the service system 504. In some embodiments, the verification result includes the comparison result of the received hash value in step 518 and the hash value in the hash data. In some embodiments, the verification result may also include a digital signature of the blockchain-based trusted platform 506. In some examples, the digital signature of the blockchain-based trusted platform 506 may be generated using a private key of the blockchain-based trusted platform 506 based on at least one of the two hash values.

[0118] At step 522, after receiving the verification result from the blockchain-based trusted platform 506, the service system 504 sends a verification response to the user 502. In some embodiments, the service system 504 may verify the digital signature included in the verification result. In some examples, the service system 504 may verify the digital signature using the public key of the blockchain-based trusted platform 506. In this example, if the digital signature is determined to be invalid, the service system 504 may ignore the verification result. If the digital signature is determined to be valid, the service system may continue to process the verification result.

[0119] In some embodiments, the service system 504 determines whether the two hash values ​​match based on the verification result. If the two hash values ​​match, the service system 504 can determine that the data stored in the service system 504 has not been tampered with. The service system 504 can also include the data in a verification response and send a verification response indicating that the data has not been tampered with to the user 502. If the two hash values ​​do not match, the service system 504 can notify the user 502 in the verification response that the data may have been tampered with.

[0120] Figure 6 An example of a blockchain data record process 600 in a blockchain platform mode that can be performed according to embodiments of the present invention is depicted. For convenience, the process 600 will be described as being performed by a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, an appropriately programmed blockchain-based system (e.g., Figure 3 The system 300 may perform the process 600 .

[0121] Process 600 begins at step 610, where user 602 sends data for recording to service system 604. In some embodiments, user 602 may send a request for recording data to service system 604, where the request includes the data. In some examples, the data may be included in a digital file or document, such as a legal document, a business contract, an image, a video, a web page, a spreadsheet, etc.

[0122] User 602 may be Figure 3 In some embodiments, user 602 may include, for example, any suitable computer, module, server, or computing element that is coded to perform the methods described herein. In some examples, user 602 may include a web browser and software applications for providing various functions of a client computing device. In some embodiments, service system 604 may be implemented as Figure 3 's service system (eg, service system 306 - 1 ).

[0123] At step 612, the service system 404 triggers data recording after receiving data from the user 602. In some embodiments, the service system 604 may automatically trigger data recording in response to receiving data or a request from the user 602. In some examples, the service system 604 may include a smart contract for processing the data or request received from the user 602. Once the smart contract receives the data or request from the user, the smart contract may automatically execute to perform the following data recording process.

[0124] In some embodiments, service system 604 may verify the identity of user 602 after receiving data from user 602. In some examples, user 602 may send a user identification along with the data to service system 604 so that service system 604 may compare the received user identification with the user identifications of authorized users stored in service system 604. If it is determined that user 602 is an unauthorized user, service system 604 may ignore the request from user 602 and discard the data. If it is determined that user 602 is an authorized user, service system 604 may continue to process the received data.

[0125] In step 614, the service system 604 stores the data received from the user 602 in the local storage of the service system 604. In some embodiments, the service system 604 may include a local storage subsystem, which includes a storage medium such as NVME, SSD, HDD or SMR. In some embodiments, the local storage subsystem of the service system 604 can be generated or expanded to obtain better availability, partition tolerance, flexibility and cost. For example, the local storage subsystem of the service system 604 can be expanded by adding more servers or storage nodes and thereby linearly increase capacity and performance. It can use inexpensive standard servers, drives and networks. In some embodiments, the local storage subsystem of the storage system 604 can improve the utilization of standard servers, thereby resulting in less power consumption, better cooling efficiency, better space utilization, less maintenance costs, etc.

[0126] In some embodiments, the service system 604 may include a multi-layer storage subsystem including multiple storage devices configured to store data based on the frequency of data access. In some examples, the service system 604 may include a first storage device, such as a cloud disk or a cloud-based storage device (e.g., an SSD cloud disk, an ESSD cloud disk), for storing the most frequently accessed data. The service system 604 may include a second storage device, such as a NAS device, for storing data with a lower access frequency.

[0127] At step 616, the service system 604 sends a request for recording data to the blockchain-based trusted platform 606. In some embodiments, the blockchain-based trusted platform 606 may be implemented as Figure 3 The blockchain-based trusted system 312. In some embodiments, the request includes data received from the user 602.

[0128] In some embodiments, the service system 604 can be connected via a Figure 3 A communication interface such as the blockchain access layer 314 sends the data to the blockchain-based trusted system 606.

[0129] In some embodiments, the service system 604 may encrypt the data and send the encrypted data in the request to the blockchain-based trusted platform 606. In some embodiments, the service system 604 may encrypt the data according to a predetermined encryption function or algorithm. In some examples, the service system 604 may encrypt the data using the public key of the blockchain-based trusted platform 606 so that the blockchain-based trusted platform 606 may decrypt the encrypted data using its private key.

[0130] In step 618, the blockchain-based trusted platform 606 calculates a hash value based on the data received from the service system 604. In some embodiments, the blockchain-based trusted platform 606 may receive encrypted data from the service system 604. In some examples, the encrypted data may be encrypted using a public key of the blockchain-based trusted platform 606. The blockchain-based trusted platform 606 may decrypt the encrypted data using a private key paired with the public key and obtain the data.

[0131] In some embodiments, the hash value may be calculated according to a predetermined cryptographic hash function or algorithm (e.g., MD5 message digest algorithm, SHA-1 (Secure Hash Algorithm 1) hash function, Whirlpool hash function, etc.). In some examples, the blockchain-based trusted system 606 may apply a predetermined hash function to data received from the service system 604 and generate a hash value for the data.

[0132] At step 620, the blockchain-based trusted system 606 stores the hash value generated at step 618. In some embodiments, the blockchain-based trusted system 606 may generate and store ledger data based on the hash value. In some embodiments, the ledger data may include the hash value and / or additional data, such as metadata of the data received from the user 602 or metadata of the hash value. In some examples, the metadata may include one or more of the author, creation date, modification date, and file size of the data.

[0133] In some embodiments, the blockchain-based trusted platform 606 may store the ledger data in one or more participating nodes of the blockchain-based trusted platform 606. In some embodiments, the consensus node (e.g., Figure 3 The blockchain nodes 308-1, 308-2 and / or third-party blockchain nodes 310-1 and 310-2 of the blockchain may perform consensus processing on the ledger data. After consensus is reached between the consensus nodes, the blockchain-based trusted platform 606 may record the ledger data in a blockchain stored in one or more participating nodes of the blockchain-based trusted platform 606.

[0134] In step 622, the blockchain-based trusted platform 606 generates a credential corresponding to the ledger data. In some embodiments, the credential may include any suitable type of credential for recording the ledger data. In some examples, the credential may include an identification of the ledger data. In some examples, the credential may include a digital signature of the blockchain-based trusted platform 606, which is generated based on the ledger data using a private key of the blockchain-based trusted platform 606. In some embodiments, the credential may be configured to uniquely identify the data and the ledger data.

[0135] At step 624, the blockchain-based trusted platform 606 returns the credential to the service system 604. In some examples, the credential may include a digital signature generated based on the ledger data using a private key of the blockchain-based trusted platform 606, so that the service system 604 can verify the digital signature using a public key of the blockchain-based trusted platform 606.

[0136] In step 626, after receiving the credentials from the blockchain-based trusted platform 606, the service system 604 sends the recording result to the user 602. In some embodiments, the recording result includes the credentials. In some embodiments, the recording result includes a notification to the user 602 indicating whether the data recording is completed. In some embodiments, the service system 604 may verify the credentials, for example, when the credentials include a digital signature of the blockchain-based trusted platform 406. In some examples, the service system 604 may use the public key of the blockchain-based trusted platform 606 to verify the digital signature included in the credentials. If the digital signature is valid, the service system 604 may send the credentials in the recording result to the user 602 and notify the user 602 in the recording result that the data recording is completed. If the digital signature is invalid, the service system 604 may not send the credentials to the user 602 and notify the user 602 that the data recording is not completed.

[0137] Figure 7 An example of a blockchain data verification process 700 in a blockchain platform mode that can be performed according to embodiments of the present invention is depicted. For convenience, the process 700 will be described as being performed by a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, an appropriately programmed blockchain-based system (e.g., Figure 3 The system 300 may perform the process 700 .

[0138] Process 700 begins at step 710, where a user 702 sends a request for verification data to a service system 704. User 702 may be, for example, Figure 3In some embodiments, user 702 may include, for example, any suitable computer, module, server, or computing element that is encoded to perform the methods described herein. In some examples, user 702 may include a web browser and software applications for providing various functions of a client computing device. In some embodiments, service system 704 may be, for example, Figure 3 The service system (eg, service system 306 - 1 ) 300 described in , for example, service system 306 - 1 .

[0139] In some embodiments, the request for verification of data may include a credential for the ledger data. In some embodiments, the credential may be configured to uniquely identify the original data and the ledger data. In some examples, the credential and the ledger data may be in a format similar to Figure 6 The ledger data may be generated in a previous data recording process similar to the process 600 of . In this example, the ledger data may be generated by the service system 704 and recorded in the blockchain-based trusted platform 706 in the previous data recording process. The ledger data may include a hash value of the original data. In some embodiments, the hash value may be calculated by the service system 704 according to a predetermined cryptographic hash function or algorithm (e.g., MD5 message digest algorithm, SHA-1 (Secure Hash Algorithm 1) hash function, Whirlpool hash function, etc.). The ledger data may include additional information, such as metadata of the data and / or metadata of the hash value. The metadata may include one or more of the author, creation date, modification date, and file size of the data.

[0140] In the above example, the credential may be generated by the blockchain-based trusted platform 706 and sent to the user 702 in a previous data record process. In some embodiments, the credential may include an identification of the ledger data. In some embodiments, the credential may include a digital signature of the blockchain-based trusted platform 706, which is generated based on the ledger data using a private key of the blockchain-based trusted platform 706.

[0141] In step 712, the service system 704 obtains data from the local storage of the service system 704 after receiving the request from the user 702. In some embodiments, the local storage of the service system 704 may include storage media such as NVME, SSD, HDD, or SMR. In some embodiments, the service system 702 may obtain data based on the credentials included in the request.

[0142] In step 714, the service system 704 sends the data obtained in step 712 to the blockchain-based trusted platform 706. In some embodiments, the service system 704 may send the credentials and the obtained data to the blockchain-based trusted platform 706. In some embodiments, the service system 704 may encrypt the obtained data and / or credentials and send the encrypted information to the blockchain-based trusted platform 706. In some examples, the service system 704 may encrypt the obtained data and / or credentials using the public key of the blockchain-based trusted platform 706 so that the blockchain-based trusted platform 706 can decrypt the encrypted information using its private key.

[0143] At step 716, the blockchain-based trusted platform 706 calculates a hash value based on the data received from the service system 704. In some embodiments, the hash value may be calculated by the blockchain-based trusted platform 706 according to the same cryptographic hash function or algorithm used to calculate the hash value in the previous data record processing.

[0144] In some embodiments, the blockchain-based trusted platform 706 may receive encrypted data and / or credentials from the service system 704. In some examples, the encrypted data and / or credentials may be generated using a public key of the blockchain-based trusted platform 706. The blockchain-based trusted platform 706 may decrypt the encrypted data using a private key paired with the public key and obtain the data and / or credentials.

[0145] In step 718, the blockchain-based trusted platform 706 compares the calculated hash value with the hash value previously stored in the blockchain-based trusted platform 706. In some embodiments, the blockchain-based trusted platform 706 can obtain the ledger data from the local storage of the blockchain-based trusted platform 706 based on the credentials received from the service system 704, and obtain the hash value in the ledger data. In some embodiments, the blockchain-based trusted platform 706 can obtain the ledger data from one or more participating blockchain nodes of the blockchain-based trusted platform 706 based on the credentials, and obtain the hash value in the ledger data. The obtained hash value can then be compared with the calculated hash value. In some embodiments, the blockchain-based trusted platform 706 generates a verification result based on the comparison of the two hash values.

[0146] In step 720, the blockchain-based trusted platform 706 sends the verification result to the service system 704. In some embodiments, the verification result includes a comparison result of the two hash values ​​as in step 718. In some embodiments, the verification result may also include a digital signature of the blockchain-based trusted platform 706. In some examples, the digital signature of the blockchain-based trusted platform 706 may be generated using a private key of the blockchain-based trusted platform 706 based on at least one of the two hash values.

[0147] In step 722, after receiving the verification result from the blockchain-based trusted platform 706, the service system 704 sends a verification response to the user 702. In some embodiments, the service system 704 can verify the digital signature included in the verification result. In some examples, the service system 704 can verify the digital signature using the public key of the blockchain-based trusted platform 706. If the digital signature is determined to be invalid, the service system 704 can ignore the verification result. If the digital signature is determined to be valid, the service system 704 can continue to process the verification result.

[0148] In some embodiments, the service system 704 determines whether the two hash values ​​match based on the verification result. If the two hash values ​​match, the service system 704 can determine that the data stored in the service system 704 has not been tampered with. The service system 704 can also include the data in a verification response and send a verification response indicating that the data has not been tampered with to the user 702. If the two hash values ​​do not match, the service system 704 can notify the user 702 in the verification response that the data has been tampered with.

[0149] Figure 8 800 is a schematic diagram showing an example of a blockchain-based trusted platform 800 according to an embodiment of the present invention. In some embodiments, the blockchain-based trusted platform 800 can be implemented as Figure 3 The blockchain-based trusted platform 312. The blockchain-based trusted platform 800 as described herein can be implemented to enhance trust between users and provide various services or processing tools to allow users to perform online transactions in an efficient manner. In the example shown, the trusted platform 800 includes a trusted application layer 814 and a trusted service layer 816. The trusted application layer 814 includes a plurality of applications, including a first application 802, a second application 804, and up to the Nth application 806, which utilize the functions of the trusted time module 808, the trusted identity module 810, and the trusted computing module 812 in the trusted service layer 816. In some embodiments, the applications 802, 804, 806 and the trusted time module 808, the trusted identity module 810, and the trusted computing module 812 can be implemented in each participating blockchain node of the blockchain-based trusted platform.

[0150] The blockchain-based trusted platform 800 solves the above problems by providing a set of service applications that utilize the functions of the trusted time module 808, the trusted identity module 810 and the trusted computing module 812 to authenticate documents and / or user identities in a manner that complies with (or is more consistent than previous systems) relevant evidentiary rules.

[0151] In some embodiments, the blockchain-based trusted platform 800 is characterized in that the platform provides trusted time, trusted identity, and trusted computing so that applications that provide services can save verified records of information related to events that occurred at each of multiple steps or important time points of the service (e.g., who, what, when) in a manner that complies with (or is more consistent with than previous systems) the rules of evidence. These records can be added to the blockchain through the consensus of blockchain nodes associated with legal, law enforcement, or dispute resolution agencies. Once added, these records become immutable and can be trusted by the court or parties as evidence of the corresponding legal service or procedure.

[0152] For example, there are tools that provide hashing and digital signature capabilities to allow users to digitally sign data so that other users can verify that the data has not been altered since it was endorsed by the digital signature, and can verify the identity of the user who signed the data. However, there is still the possibility that the digitally signed data contains errors, for example, the data has been damaged or tampered with before it was signed without the signer's knowledge, or the original digitally signed data was intercepted by a hacker during transmission and replaced with forged digitally signed data. Based solely on the digitally signed data, it may be difficult to prove or disprove the authenticity and accuracy of the data. Therefore, it may be difficult to use digitally signed data in legal proceedings without further proof, such as an affidavit from a notary or a licensed attorney attesting to the authenticity and accuracy of the data. The technical problem to be solved is how to improve the credibility of data generated by online applications that provide legal services.

[0153] The blockchain-based trusted platform 800 enhances the credibility of data generated by applications that provide services through the network by capturing snapshots of each of the multiple steps (or several important time points) in the process of providing services, and reduces the possibility of forgery or tampering. Each snapshot may include information provided by a trusted time module 808 and / or a trusted identity module 810. The trusted platform 800 uses a trusted computing module 812 to store the snapshot in the blockchain to process blockchain data. The snapshot may include, for example, information such as who, when, and what is associated with an event that occurs at a corresponding step or time point. The probability of forgery or tampering in each of the multiple steps (or time points) is less than the probability of forgery or tampering in a single step (or time point). The trusted time module 808 provides a trusted or verified timestamp, the trusted identity module 810 provides trusted or verified identity information, and the trusted computing module 812 ensures the credibility of the data recorded in the relevant blockchain.

[0154] In some embodiments, the functions of modules 808, 810, and 812 can be called by one or more blockchain-based applications or smart contracts executed in the TEE. The TEE is hosted by one or more data processors isolated from the operating system of the one or more data processors and is configured to provide enhanced confidentiality and integrity for the code executed and the data loaded in the one or more data processors. In some examples, the application or smart contract can call the functions of the module through an API.

[0155] The blockchain-based trusted platform 800 produces the following technical effects: the service-related data provided by the service application supported by the blockchain-based trusted platform 800 has a higher degree of credibility (compared to previous systems). A highly reliable record of the transaction history that occurred during the provision of the service can be saved, including the modification history of the document and the responses from all parties.

[0156] In some embodiments, the trusted service layer 816 may include additional modules, such as a trusted location module, that provide a verified location indicating where a transaction occurred. For example, the trusted location module may be used to prove that an infringement occurred in a certain geographic area and may be filed in a court of competent jurisdiction. For example, the trusted location module may generate verified location information based on data provided by a verified global positioning system (GPS) receiver connected to a client terminal.

[0157] Fig. 9 is a diagram showing an example of a system 900 for online transactions according to an embodiment of the present invention. In the example shown, the system 900 includes a blockchain-based trusted platform 902. In some embodiments, the blockchain-based trusted platform can be implemented as Figure 3 A trusted blockchain-based platform 312 or Figure 8 A blockchain-based trusted platform 800.

[0158] In some embodiments, the trusted platform 902 may be accessed through a network 914, such as the Internet. A user 924 accesses the trusted platform 902 using a client terminal 922, which may be, for example, a mobile phone, a personal computer, or any computing device that can connect to the network 914. In some examples, the trusted platform 902 provides limited functionality to users who have not registered with the platform 902.

[0159] When registering on the platform 902, the user has a user identification (ID) that is used to identify the user 924 when the user 924 uses the tools and services of the platform 902. Each registered user has an account associated with the platform 902 and can access the functions of the platform 902 after logging into the account. In some examples, the user 924 can register on the platform 902 by providing personal information such as the user's phone number and email address. In some examples, the user 924 can register on the platform 902 by providing biometric information such as one or more fingerprints, one or more voiceprints, or iris information through a fingerprint sensor, microphone, or iris scanner that is communicatively coupled to the modules 906, 908, 910. When the user 924 accesses the functions of the trusted platform 902, the user can provide additional information to the trusted platform 902, and the trusted platform 902 associates the additional information with the user account.

[0160] For example, user 924 may provide a mobile phone number so that user 924 can receive messages from trusted platform 902 on the mobile phone. User 924 may provide payment account information so that user 924 can pay for services on trusted platform 902. For example, a user account may include one or more of the following information that can be used to verify the identity of user 924: (i) a mobile phone number, (ii) a credit card number, (iii) a user ID associated with an online payment system, (iv) a user ID associated with an online shopping account, (v) a user ID associated with a music streaming or downloading account, (vi) a user ID associated with a movie streaming or downloading account, (vii) a user ID associated with a messaging or chat account, (viii) a user ID associated with an online banking account, (ix) a user ID associated with a ride-hailing service, (x) a user ID associated with an online food ordering service, (xi) a social security number; (xii) a driver's license number, (xiii) a passport number, (xiv) a user ID associated with an online gaming service, (xv) an ID issued by a government entity, (xvi) one or more fingerprints, (xvii) one or more voice prints, or (xviii) iris information.

[0161] exist Fig. 9 In the example of , user 924 accesses Internet evidence collection web browser 904 to search and view web pages on Internet 914. A client component (not shown) of the web browser is executed at client terminal 922 and provides a user interface for displaying web pages to user 924 and receiving user instructions for processing web pages (e.g., clicks for controlling navigation between web pages).

[0162] In some examples, user 924 uses web browser 904 to access web pages 918 (including, for example, web pages 918-1 and 918-2) hosted by a publisher on web server 916. User 924 may initially provide a URL for the publisher's homepage and then click on a web link to browse the web pages hosted on web server 908. In some embodiments, when user 924 browses web pages using Internet evidence collection web browser 904, web browser 904 calls trusted identity module 908 to verify the identity of user 924. For example, trusted identity module 908 may verify the identity of user 924 using any amount of information associated with a user account.

[0163] In the above example, whenever an event of a predetermined type associated with the user 924 using the web browser 904 occurs, the web browser 904 calls the trusted time module 906 to obtain a verified timestamp as to when the event occurred. The event of the predetermined type may include, for example, receiving input from the user 924, providing output to the user 924, and performing a predetermined type of action or calculation. Receiving input from the user 924 may include, for example, receiving a URL of a web page, receiving a click command or a selection command from the user 924, receiving an edit command such as a copy command from the user 924, or receiving a file command such as a save command from the user 924. Providing output to the user 924 may include, for example, displaying the contents of a web page to the user 924, playing an audio file to the user 924, or playing a video file to the user 924.

[0164] Thus, whenever an event occurs, in which user 924 performs a predetermined type of action, such as providing a URL to web browser 904, clicking a web link on web page 918, copying text or an image from web page 918, or downloading content from web page 918, web browser 904 performs the action requested by user 924 and also calls trusted time module 906 to obtain a verified timestamp indicating the time when the action was performed or the time when the event occurred. Web browser 904 calls trusted computing module 910 to generate a snapshot of the event, wherein the snapshot may be in the format of a record, including: the identity of user 924, a description of the event (e.g., a description of the action performed), a verified timestamp indicating when the event occurred (e.g., when the action was performed), and information about the web page associated with the action (e.g., a URL). Trusted computing module 910 generates a hash value of the record and adds a block including the record and the hash value to blockchain 912, which stores the record associated with user 924.

[0165] When each event occurs, the web browser 904 calls the trusted time module 906 to obtain a verified timestamp indicating the time when the event occurred. The web browser 904 calls the trusted computing module 910 to update the blockchain 912, thereby adding a record with information about the event.

[0166] The trusted platform 902 is associated with one of the nodes (e.g., node 928) of the blockchain network 930, wherein the blockchain 912 is replicated across the blockchain network 930. For example, one of the nodes may be associated with a computer server 926 that maintains a version of the blockchain 912.

[0167] Fig.10 1 is a diagram showing an example of a system for providing trusted time according to an embodiment of the present invention. In some embodiments, the trusted time module 1010 generates a verified timestamp based on the coordinated universal time (UTC) 1020 allocated by a national standards body or time information generated by a global positioning system (GPS) receiver 1030, wherein the global positioning system (GPS) receiver 1030 obtains time information from a positioning system such as the Beidou navigation satellite system maintained by China, the Global Positioning System maintained by the United States, the Galileo global navigation satellite system maintained by the European Union, the Global Orbiting Navigation Satellite System (GLONASS) maintained by Russia, and / or the Quasi-Zenith Satellite System maintained by Japan.

[0168] Fig.111 is a diagram showing an example of a system for providing a trusted identity according to an embodiment of the present invention. In some embodiments, the trusted identity module 1100 maintains a user account database 1102, which includes information about the registered user provided by the registered user himself. The trusted identity module 1100 also accesses other databases to verify the account information provided by the user. For example, the trusted identity module 1100 can access a government ID database 1104 to verify the accuracy of the government ID provided by the user. If the trusted identity module 1100 determines that the government ID provided by the user matches the name or phone number of another user listed in the government ID database 1104, the trusted identity module 1100 can generate an alert message indicating a possible fraudulent identity. In some embodiments, the trusted identity module 1100 can access a database 1106 of an account of a user accessing an online banking service (e.g., Alipay), which allows the user to digitally pay for services provided on a trusted platform. The trusted identity module 1100 can access a database 1108 related to the account of a user using an online payment service. The trusted identity module 1100 may access a database 1110 related to accounts of users using social media services provided on a trusted platform. The trusted identity module 1100 may access a database 1112 related to accounts of users using communication services provided on a trusted platform.

[0169] The trusted identity module 1100 may access a database 1118 associated with an account of a user of an online shopping service that allows the user to shop for products online. The trusted identity module 1100 may access a database 1116 associated with an account of a user using an online entertainment service that allows the user to listen to music or watch movies by downloading or streaming the music or movies. The trusted identity module 1100 may access a biometric database 1114 that stores biometric information provided by the user during registration, such as one or more fingerprints, one or more voiceprints, or iris information.

[0170] In some embodiments, the trusted identity module 1100 may attempt to verify the identity of the user using multiple databases, thereby increasing the trustworthiness of the verified identity information provided by the trusted identity module 1100 .

[0171] In some embodiments, various databases 1104, 1106, 1108, 1110, 1112, 1114, 1116, and 1118 can be maintained independently of one another. For example, a user can modify information in an online banking account without modifying information in an online shopping account. A user can update information in different accounts at different time periods. The same user can use different user names or aliases for different services. Multiple users can share the same account, for example, family members can share the same movie streaming account. The same user can open multiple accounts for a service, for example, a user can have multiple mobile phone numbers, multiple email addresses, and / or multiple messaging IDs. Therefore, information based on a single database may not be sufficient to accurately verify the identity of a user. However, by combining information from multiple databases, the identity of a user can be more reliably verified.

[0172] Fig.12 is a diagram showing an example of a system 1200 for trusted execution according to an embodiment of the present invention. In some embodiments, nodes of a blockchain network and / or nodes communicating with a blockchain network may operate using a trusted execution environment (TEE) or a rich execution environment (REE). Typically, a trusted execution environment is a secure, integrity-protected processing environment that includes processing, memory, and storage capabilities. In some embodiments, the trusted execution environment may be isolated from a "normal" processing environment (e.g., REE) in which a device operating system and applications run. The trusted execution environment may make it possible to build REE applications and services with better security and availability by partitioning REE applications and services so that sensitive operations are limited to the trusted execution environment and sensitive data (e.g., encryption keys).

[0173] In the example shown, blockchain nodes 1210 and 1230 run using both TEE and REE. As shown, virtual machines 1214 and 1234 run using TEE, as do caches 1216 and 1236. Services 1212 and 1232 (e.g., transactions, queries, distribution, and network services) run in REE. Unlike caches that run in TEE, storage 1218 and 1238 run in REE.

[0174] TEE is a trusted environment within the hardware (one or more processors, memory) that is isolated from the hardware's operating environment (e.g., operating system (OS), basic input / output system (BIOS)). In more detail, TEE is a separate, secure area of ​​the processor that ensures the privacy and integrity of code execution and data loaded in the main processor. Within the processor, the trusted execution environment runs in parallel with the operating system. At least part of the so-called trusted application (TA) is executed within the trusted execution environment and has access rights to the processor and memory. Through the trusted execution environment, trusted applications are protected from other applications running in the main operating system. In addition, the trusted execution environment cryptographically isolates trusted applications from each other within the trusted execution environment.

[0175] Examples of trusted execution environments include software protection extensions (SGX) provided by Intel Corporation of Santa Clara, California, USA. Although SGX is discussed herein by way of example, it is contemplated that any suitable trusted execution environment may be used to implement the embodiments herein. SGX provides a hardware-based trusted execution environment. In SGX, the trusted hardware is the core of the central processing unit (CPU), and a portion of the physical memory is isolated to protect selected code and data. The isolated portion of the memory is referred to as an enclave. More specifically, the enclave is provided as an enclave page cache (EPC) in the memory and mapped to the application address space. The memory (e.g., DRAM) includes a reserved random access memory (PRM) for SGX. The random access memory is a continuous memory space at the lowest BIOS level and cannot be accessed by any software. Each enclave page cache is a storage set (e.g., 4 KB) allocated by the operating system to load application data and code in the random access memory. The enclave page cache metadata (EPCM) is the entry address of the corresponding enclave page cache and ensures that each enclave page cache can only be shared by one enclave. That is, a single enclave may use multiple enclave page caches, while an enclave page cache is dedicated to a single enclave.

[0176] The above-mentioned blockchain and TEE technologies can be used to generate highly reliable records related to online transactions. Online transactions usually involve multiple steps. Instead of generating a verified record of the final result of the transaction (for example, generating a hash value of the data generated at the end of the transaction), the novel system described in this article uses data generated during multiple events occurring in multiple steps of the transaction to generate a record that can be used to verify the transaction. The verified record of data derived from events associated with multiple steps of the transaction is much more reliable than the verified record based only on the final result of the transaction. In some embodiments, for each piece of data that needs to be verified, not only is each piece of data itself verified, but the process of generating each piece of data is also verified. The process of generating the data may involve multiple steps, and each step of the process is verified. This ensures that the final data is highly reliable because the probability that each step of the process is fraudulently modified is very low. In some embodiments, a tool for collecting evidence in the form of digital data is provided. For each piece of evidence that needs to be verified, not only is the evidence itself verified, but the process of collecting or generating each piece of evidence is also verified. The process of collecting or generating evidence may involve multiple steps, and each step of the process is verified. This ensures that the evidence collected or generated at the end of the process is highly reliable, as the probability of someone fraudulently modifying the data at each step of the process is very low.

[0177] Fig.13 1 is a diagram showing an example of an architecture 1300 for blockchain security according to an embodiment of the present invention. The architecture 1300 can be implemented to provide a trusted system based on a blockchain (such as Figure 3 A trusted blockchain-based platform 312 or Figure 8 In the example shown, the security architecture 1300 includes the following components: an application security component 1310, a data security component 1320, a protocol and algorithm security component 1330, and a security management component 1340.

[0178] In some embodiments, the application security component 1310 may include functions such as an identity management function 1312, an access control function 1314, and a smart contract audit function 1316. In some embodiments, the identity management function 1312 may include a credential-based authentication mechanism for user authentication. In some examples, the credential-based authentication mechanism may include authentication between the service system and the blockchain node and authentication between different blockchain nodes using TLS (Transport Layer Security). In this example, after successful authentication, services may be allowed to be transmitted on a reliable channel. Communications between the service system and the blockchain node and between blockchain nodes may be encrypted by TLS to mitigate malicious network attacks. In some embodiments, a blockchain-based trusted system may support the TLS protocol and the HTTPS (Hypertext Transfer Protocol Secure) protocol, both of which may support credential-based two-way authentication. In some embodiments, HTTPS may be configured to support one-way authentication according to user needs. In some embodiments, a handshake procedure may be implemented between blockchain nodes. Reliable communication between blockchain nodes may be achieved by requiring one blockchain node to verify the private key signature of another blockchain node in a handshake procedure. In some embodiments, the access control function 1314 may be configured to support access control to user accounts. In some examples, access control function 1314 can support different account access rights with different levels / priorities. Access control function 1314 can support different account permissions of different categories. Access control function 1314 can support mutual authorization of different accounts and modification of account permissions. Smart contract audit function 1316 can provide security for smart contracts in terms of processing and implementation, and manage the entire life cycle of smart contracts, including cooperation, auditing, initialization, upgrade, revocation, etc., to reduce security risks caused by code and service vulnerabilities.

[0179] The data security component 1320 includes a storage security function 1322 and a transmission security function 1324. In some examples, the storage security function 1322 can provide support for multi-node data storage so that data loss in a single blockchain node does not affect the entire blockchain network. The storage security function 1322 can provide a data synchronization mechanism between blockchain nodes to ensure the correct replication of data and provide a data archiving tool for data archiving and backup. The transmission security function 1324 can support private key-based transaction signatures to prevent transaction content from being tampered with. The transmission security function 1324 can support a hash mechanism that improves the data security of transactions recorded in the blockchain. The transmission security function 1324 can support the non-visibility of confidential information through private transactions based on zero-knowledge proofs to ensure that confidential information cannot be obtained by third parties.

[0180] The protocol and algorithm security component 1330 includes a smart contract security function 1332, a cryptographic algorithm security function 1334, and a key security function 1336. In some embodiments, the smart contract security function 1332 can provide support for code security, operating mechanism security, service logic security, and user security. In some examples, the smart contract security function 1332 can support the use of a virtual machine to load and execute smart contracts. In this example, a separate virtual machine can be created for each blockchain transaction. When the blockchain transaction is completed, the virtual machine used for the blockchain transaction can be destroyed. The virtual machine can be configured to detect inappropriate smart contract content and interrupt the execution of smart contracts with inappropriate content. In some embodiments, the cryptographic algorithm security function 1334 can provide practical security for encryption, signature, and hash algorithms and functions. In some examples, the cryptographic algorithm security function 1334 can support multiple sets of cryptographic suites according to the needs of different service scenarios. The following Table 1 shows an example of a description of a cryptographic suite according to an embodiment of this document.

[0181] Table 1. Cipher suite descriptions

[0182]

[0183] The key security function 1336 can provide security for keys such as public keys and private keys by maintaining a key management system. In some examples, the key security function 1336 can support the life cycle management of keys and credentials, including the generation, import, storage, export, distribution, exchange, use, and update of keys and credentials. The key security function 1336 can support the secure storage of private keys used to generate digital signatures. The key security function 1336 can provide user information protection and user account lockout in the event of key loss. The key security function 1336 can also support private key loss reporting and signature protection mechanisms.

[0184] The security management component 1340 includes a security audit function 1342, a supervisory support function 1344, and a configuration management function 1346. In some examples, the security audit function 1342 may support a security audit based on an application log. In this example, a security audit may be performed on definable log command rules, print formats, alert levels, and time savings. The security audit may also include discovering, analyzing, and tracking abnormal events based on access time, IP address, behavior, and other information recorded in the log. In some embodiments, the supervisory support function 1344 may support administrator permission to allow users to access the blockchain network to obtain ledger data. In some embodiments, the configuration management function 1346 may support configuring and establishing a genesis block to establish initial trust by configuring the trusted root and core parameters of the blockchain network.

[0185] Fig.141400 is a diagram showing an example of a cross-chain communication system 1400 according to an embodiment of the present invention. In some embodiments, the cross-chain system 1400 can be implemented to facilitate communication between different blockchain networks. For example, the judicial blockchain network may need to communicate with the public blockchain network to provide services to clients accessing the public blockchain network. The judicial blockchain network and the public blockchain network can be implemented in the cross-chain system 1400 to ensure data security during data transmission and storage between and between the two blockchain networks. In the example shown, the cross-chain system 1400 includes a first blockchain network 1410 and a second blockchain network 1430. In some embodiments, each blockchain network may include a cross-chain communication component or node to facilitate communication between a blockchain node of a blockchain network and a blockchain node of another blockchain network. In the above example, the first blockchain network includes a first blockchain node 1412 and a first cross-chain communication component 1418, and the second blockchain network includes a second blockchain node 1432 and a second cross-chain communication component 1438. Note that for illustrative purposes only, blockchain nodes 1412 and 1432 are shown to each include a blockchain node and a cross-chain communication component. Blockchain nodes 1412 and 1432 may have any suitable number of blockchain nodes and cross-chain communication components.

[0186] In some embodiments, the cross-chain communication component may be configured to facilitate a communication interface for communication between a blockchain node in the same blockchain network as the cross-chain communication component and another cross-chain communication component in another blockchain network. In the example shown, the cross-chain communication component 1418 is configured to allow communication between the blockchain node 1412 and the cross-chain communication component 1438, and the cross-chain communication component 1438 is configured to allow communication between the blockchain node 1432 and the cross-chain communication component 1418. In this way, data communication can be achieved between two blockchain nodes 1412 and 1432 in different blockchain networks 1410 and 1430 using cross-chain communication components 1418 and 1438. In some embodiments, the cross-chain communication component may be configured to support data verification and data proof on a local blockchain network. The cross-chain communication component may also be configured to support unified data format conversion of cross-chain messages, cross-chain communication network protocols, and routing of cross-chain messages.

[0187] In the example shown, each blockchain node includes a service-side smart contract and a cross-chain smart contract. As shown, blockchain node 1412 includes a service smart contract 1414 and a cross-chain smart contract 1416, while blockchain node 1432 includes a service smart contract 1434 and a cross-chain smart contract 1436. In some embodiments, the service smart contract can be configured to allow users to access blockchain nodes and submit blockchain transactions, such as transactions for recording data to blockchains, transactions for transferring data to another blockchain network, and so on. The cross-chain contract can be configured to implement a cross-chain protocol to facilitate communication between blockchain nodes and cross-chain communication components. In some examples, the cross-chain smart contract can be configured to support the definition of cross-chain message formats and cross-chain message communication protocols. In some embodiments, the cross-chain smart contract can also be configured to verify cross-chain proofs and parse formatted data.

[0188] In the example shown, each cross-chain communication component includes a cross-chain relay component and a oracle. As shown, the cross-chain communication component 1418 includes a cross-chain relay component 1420 and a oracle 1422, while the cross-chain communication component 1438 includes a cross-chain relay component 1440 and a oracle 1442. In some embodiments, the cross-chain relay component can be configured to extract the ledger data and the ledger proof from the message received by the cross-chain smart contract. In the example shown, the cross-chain relay component 1420 can receive a message from the cross-chain smart contract 1416 and extract the ledger data and the ledger proof from the message. In some embodiments, the cross-chain relay component can be configured to communicate with another cross-chain relay component in a different blockchain network. Continuing with the above example, the cross-chain relay component 1420 can process a message from a cross-chain smart contract 1416, extract the ledger data from the message, generate a cross-chain message based on the ledger data, and send the cross-chain message to the cross-chain relay component 1440. In some embodiments, the oracle (e.g., oracle 1422 and 1442) may be configured to perform signature verification and perform uniform data formatting on data received from the cross-chain relay component. In some embodiments, the oracle may include any suitable hardware and / or software to perform the methods described herein. Fig.15 A more detailed discussion of cross-chain communication using cross-chain relay components and oracles.

[0189] Fig.15 An example of a cross-chain communication process 1500 that can be performed according to embodiments of the present invention is depicted. For convenience, the process 1500 will be described as being performed by a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, a blockchain-based system that is appropriately programmed, such as Fig.14 The system 1400 may perform the process 1500. In some embodiments, the blockchain networks 1510 and 1520 may each be implemented as Fig.14 1410 and 1430 of the blockchain network. In the example shown, the blockchain network 1510 includes a blockchain node 1502 and a cross-chain communication component 1504, and the blockchain network 1520 includes a blockchain node 1508 and a cross-chain communication component 1506. As shown, the service smart contract 1512 and the cross-chain smart contract 1514 are executed on the blockchain node 1502 of the blockchain network 1510, while the service smart contract 1528 and the cross-chain smart contract 1526 are executed on the blockchain node 1508 of the blockchain network 1520. The cross-chain relay component 1516 and the oracle 1518 are implemented in the cross-chain communication component 1504, while the cross-chain relay component 1524 and the oracle 1522 are implemented in the cross-chain communication component 1506.

[0190] Process 1500 begins at step 1530, where the service smart contract 1512 sends a message including ledger data to the cross-chain smart contract 1514. In some examples, the ledger data may include legal documents, business contracts, etc. In some embodiments, the format of the ledger data may include images, videos, web pages, spreadsheets, etc. In some embodiments, the ledger data may include plaintext data and / or hash values ​​of plaintext data.

[0191] At step 1532, after receiving the message, the cross-chain smart contract 1514 sends a message including the ledger data to the cross-chain relay component 1516. In some embodiments, the cross-chain smart contract 1514 may send a ledger proof of the ledger data in the message. In some embodiments, the ledger proof includes a digital signature generated based on the ledger data according to a predetermined encryption or cryptographic algorithm. In some examples, the digital signature may be generated based on the ledger data using the private key of the blockchain node 1502 executing the cross-chain smart contract 1514.

[0192] At step 1534, the cross-chain relay component 1516 sends the ledger data to the oracle 1518. In some embodiments, the cross-chain relay component 1516 obtains the ledger data from the message received from the cross-chain smart contract 1514. In some embodiments, the cross-chain relay component 1516 also obtains the ledger proof from the message. In some embodiments, the cross-chain relay component 1516 can send the ledger data and the ledger proof to the oracle 1518.

[0193] At step 1536, oracle 1518 validates the ledger data and determines whether the ledger data is valid. In some embodiments, oracle 1518 may validate the ledger data based on the ledger proof. In some examples, oracle 1518 may validate a digital signature included in the ledger proof. If the digital signature is valid, oracle 1518 may determine that the ledger data is valid and continue processing the ledger data. If the digital signature is invalid, oracle 1518 may discard the ledger data.

[0194] In step 1538, the oracle 1518 generates formatted ledger data based on the ledger data. In some embodiments, the oracle may format the ledger data according to a unified data format and in accordance with the cross-chain communication protocol. In some embodiments, the oracle 1518 may generate formatted ledger data based on the ledger data and the ledger proof.

[0195] At step 1540, the oracle 1518 returns the formatted ledger data to the cross-chain relay component 1516. In some embodiments, the oracle 1518 may generate a hash value of the formatted ledger data and send the hash value to the cross-chain relay component 1516.

[0196] In step 1542, after receiving the formatted ledger data from the oracle 1518, the cross-chain relay component 1516 sends the cross-chain message to the cross-chain relay component 1524. In some embodiments, the cross-chain relay component 1516 can generate a cross-chain message based on the formatted ledger data. In some embodiments, the cross-chain message can include the formatted ledger data and the hash value of the formatted ledger data.

[0197] At step 1544, the cross-chain relay component 1524 sends the formatted ledger data to the cross-chain smart contract 1526 after receiving the cross-chain message. In some embodiments, the cross-chain relay component 1524 obtains the formatted ledger data from the cross-chain message received from the cross-chain relay component 1516. In some embodiments, the cross-chain relay component 1524 can obtain the hash value of the formatted ledger data from the cross-chain message. In some embodiments, the cross-chain relay component 1524 can send the hash value together with the formatted ledger data to the cross-chain smart contract 1526.

[0198] In step 1546, the cross-chain smart contract 1526 verifies the formatted ledger data and determines whether the formatted ledger data is valid. In some embodiments, the cross-chain smart contract 1526 may verify the formatted ledger data based on the hash value received from the cross-chain relay component 1524. In some examples, the cross-chain smart contract 1526 may calculate the hash value of the formatted ledger data and compare the calculated hash value with the received hash value. If the two hash values ​​match, the cross-chain smart contract 1526 may determine that the formatted ledger data is valid. If the two hash values ​​do not match, the cross-chain smart contract 1526 may determine that the formatted ledger data is invalid and discard the formatted ledger data. In some embodiments, the cross-chain smart contract 1526 may determine whether the format of the formatted ledger data matches the predetermined data format. If the format of the formatted ledger data matches the predetermined data format, the cross-chain smart contract 1526 may determine that the formatted ledger data is valid. If the format of the formatted ledger data does not match the predetermined data format, the cross-chain smart contract 1526 may determine that the formatted ledger data is invalid.

[0199] At step 1548, the cross-chain smart contract 1526 parses the formatted ledger data. In some embodiments, the cross-chain smart contract 1526 may perform a predetermined parsing method on the formatted ledger data, such as by converting the formatted ledger data into an original ledger data format. In some examples, the cross-chain smart contract 1526 may obtain the ledger data by converting the formatted ledger data into an original ledger data format.

[0200] At step 1550, after obtaining the ledger data by parsing the formatted ledger data, the cross-chain smart contract 1526 sends the ledger data to the service smart contract 1528. The service smart contract 1528 receives the ledger data and makes the ledger data available to users accessing the blockchain network 1520.

[0201] Fig.16An example 1600 of data storage in a blockchain-based trusted platform according to an embodiment of the present invention is depicted. At a high level, the data storage of a blockchain node 1602 may include a smart contract data cache 1606 and a blockchain database 1610. The smart contract data cache 1606 may be used to store variable data managed by a smart contract, while the blockchain database 1610 may be used to store incremental immutable blockchain data, such as smart contract code, input, output, and execution log of a smart contract. The blockchain database 1610 may be a key-value database, including a block database 1612, a state database 1618, and an extended database 1624. The block database 1612 may store blockchain data including a block header 1614 and a block body 1616. The state database 1618 may store state information related to the blockchain data, including a state tree 1620 and a storage tree 1622. The extended database 1624 may store smart contract data including multiple smart contract pools 1626 and metadata 1628 associated with the multiple smart contract pools 1626.

[0202] Blockchain node 1602 can call virtual machine 1608 to execute smart contracts. In some embodiments, virtual machine 1608 can be deployed in a trusted computing environment such as TEE. In some embodiments, virtual machine 1608 can be configured to perform smart contract operations by executing instructions of a smart contract programming language. In some examples, virtual machine 1608 can access resources outside the TEE during the execution of the operation, such as an external server, blockchain, database, or other resources indicated by the operation. In some embodiments, access to external resources can be restricted or denied so that the overall execution of the operation depends only on the data stored in the TEE (e.g., smart contract state). This restriction can also reduce the possibility of tampering with the execution of the operation.

[0203] A smart contract operation may include the execution state of the smart contract associated with the requested contract operation (e.g., adding a document, updating a document state, etc.). During the execution of a smart contract, multiple blockchain nodes of a blockchain network may execute each instruction of the smart contract separately and produce a result indicating the execution state of the smart contract after executing the instructions. The execution state may include data associated with the smart contract. Each executed instruction of the contract may change the content of the data (e.g., store a value to be used by subsequent instructions in the smart contract).

[0204] After executing the instructions of the smart contract, the nodes of the blockchain network can reach a consensus on the new execution state after executing the instructions. This consensus process is performed on each instruction executed in the smart contract, thereby prompting a consensus on the execution path of the smart contract. The execution path can be recorded as a corresponding smart contract execution event log recorded in the block database 1612. Finally, the final result (i.e., output) of the execution is also recorded in the block database 1612.

[0205] Typically, variable data may include document type, document ID, document status, modifiable data of document content, transaction hashes associated with document data stored in smart contract data cache 1606 and blockchain database 1610, link information provided for linking different documents associated with the same order, encryption keys, and lists of authorized users of documents, etc. In some embodiments, smart contract data cache 1606 may also store index data to associate variable data and immutable data associated with the same document or transaction. As previously described, index data may include a document ID associated with a document and a transaction hash associated with a transaction. The document ID may be stored in smart contract data cache 1606 and blockchain database 1610 to link variable data and immutable data associated with the same document. The transaction hash may be stored in smart contract data cache 1606 and blockchain database 1612 to link variable data and immutable data associated with the same transaction. In this way, when querying a document or a transaction associated with a document, variable data and immutable data may be identified from two storage locations.

[0206] The document type and document ID may indicate the type and ID of the document, respectively. The document status may indicate the status of the document. The modifiable data of the document content may be specific content such as overhead inserted into the document by the creator of the document for data processing.

[0207] The transaction hash may be a hash value of the immutable blockchain data stored in the blockchain database 1610. The encryption key may include a symmetric key used to encrypt the document data before storing it on the blockchain in the blockchain database 1610. The encryption key may also include a symmetric key used to encrypt the document data before storing it on the blockchain in the blockchain database 1610. Figure 3 The encryption key associated with the user of the blockchain-based trusted platform 300 described in the description of . The data stored in the blockchain database 1610 can be encrypted to protect the privacy of the document owner.

[0208] The document owner can provide access to the plaintext document to another user of the blockchain-based trusted platform by publishing an encrypted version of the symmetric key using the public key of the user. The encrypted data is immutable and stored in the blockchain database 1610, and a hash value of the encrypted data (i.e., a transaction hash) can be generated and stored in the smart contract data cache 1606 under the same data structure together with the encrypted version of the symmetric key. In general, the transaction hash can be used to link the variable data stored in the smart contract data cache 1606 with the immutable blockchain data associated with the same order stored in the blockchain database 1610. For example, an order document and one or more logistics documents associated with the order may include variable data stored in the smart contract data cache 1606 and an encrypted document stored in the blockchain database 1610. The transaction hash of the encrypted document stored in the blockchain database 1610 can be stored together with the variable data under the same data structure in the smart contract data cache 1606. In this way, data stored in different locations can be linked when queried.

[0209] To query data, a permitted user can search the smart contract data cache 1606 to obtain the hash value and the encrypted version of the symmetric key. The user can decrypt the encrypted version of the symmetric key using his private key. If the symmetric key is successfully decrypted, the user can determine that he has access to the plaintext data. The user can then use the hash value to locate the encrypted data from the blockchain database 1610 and decrypt the encrypted data using the symmetric key.

[0210] In some embodiments, the variable data in the smart contract data cache 1606 is stored as KVP. Cache storage can be a relatively high-speed, high-cost, and low-capacity storage medium compared to other storage media such as hard drives. When the capacity of the KVP exceeds a certain threshold (e.g., 5GB), a cache-miss state may occur. A cache miss refers to a state in which the data required for processing by a component or application cannot be found in the cache memory. A cache miss may require the program or application to obtain data from other cache levels or main memory, resulting in execution delays.

[0211] In some embodiments, multiple smart contract pools 1626 may be created in the blockchain database 1610 to store at least a portion of the variable data managed by the smart contract in the smart contract data cache 1606. At least a portion of the variable data may then be moved from the high-cost cache storage to the blockchain database 1610 to reduce the overall storage cost and mitigate cache miss conditions.

[0212] In some embodiments, the blockchain node 1602 may add a new smart contract address to the configuration file 1604 to create a corresponding smart contract. When the configuration file 1604 is executed, the virtual machine 1608 may create a smart contract based on the smart contract address. When the corresponding smart contract is created, a smart contract pool corresponding to the smart contract may be automatically created in the extended database 1624.

[0213] In some embodiments, the data stored in the smart contract pool 1626 is also recorded in the block database 1612 through consensus. In some embodiments, the data stored in the smart contract pool can be managed exclusively by the corresponding smart contract. The contract ID of the smart contract can be added to the data stored in the corresponding smart contract pool so that the data in the pool can be easily queried, retrieved, or otherwise managed by the smart contract.

[0214] In some embodiments, a document may be stored in one of the smart contract pools 1626 based on a hash value of one or more of a document ID or a document type. The hash value range may be predetermined and assigned to each smart contract pool 1626. For example, for a document with a document ID of 000001, its md3 hash value is 769924EADBBF6F72C6581377419FCB77. Assuming there are 16 smart contract pools, based on the first hexadecimal digit of the hash value, the document may be stored in the seventh smart contract pool. Similarly, a document with a document ID of 000003 has an md3 hash value of 4DE1F0F6DA993FC4AB439CDCA5E084F6. Based on the first hexadecimal digit of the hash value, the document may be stored in the fourth smart contract pool.

[0215] In some embodiments, order files, logistics files, and payment files associated with the same order can be assigned to the same file ID or tag. In this way, they can be easily located when queried from the smart contract data cache 1606, the smart contract pool 1626, and the blockchain 814. In order to link documents associated with the same order stored in different smart contract pools 1626, the document ID of the corresponding smart contract can be added to each document together with the corresponding document ID. In this way, documents can be retrieved from different smart contract pools 1626 according to the document ID. In some embodiments, the document ID can be a transaction hash of the corresponding document. The transaction hash can be used to locate the corresponding immutable data stored in the block database 1612.

[0216] In some embodiments, new smart contract pools may be created periodically. For example, if a new smart contract pool is created every month, the smart contract may be associated with a creation time (expressed as MMYYYY, where MM represents the creation month and YYYY represents the creation year). In this way, mutable data created in a particular month may be stored in the smart contract pool created in that month.

[0217] In some embodiments, documents may be stored in each smart contract pool 1626 in a round-robin manner. In some examples, after a smart contract pool reaches its storage capacity, variable data for new documents may be stored in the next smart contract pool. In some examples, after a smart contract pool has stored variable data for a predetermined number of documents, variable data for new documents may be stored in the next smart contract pool.

[0218] Fig.17 An example of a system 1700 for implementing a blockchain-based trusted platform 1702 according to an embodiment of the present invention is depicted. The blockchain-based trusted platform 1702 provides an integrated interface that allows users to manage information used in various stages of contract formulation and execution. In some embodiments, the blockchain-based trusted platform 1702 provides services to one or more contracting parties (e.g., contracting party A 1768 and contracting party B 1770) so that contracts negotiated and signed by the contracting parties can be securely stored (e.g., as in Fig.16 In some embodiments, the blockchain-based trusted platform 1702 may also provide services to other entities associated with the contract, such as one or more banks 1772, one or more judicial institutions 1774, and one or more government agencies 1776, through a network 1764 (e.g., the Internet).

[0219] Party A 1768 may be a buyer of services or goods from Party B 1770. Party A 1768 and Party B 1770 may negotiate a contract that defines the goods or services to be purchased, the delivery date, the payment method, liquidated damages, etc. When both parties agree to the terms of the contract, they may sign the contract, and Party A 1768 or Party B 1770 may send a copy of the contract to the blockchain-based trusted platform 1702 for record keeping, for example, by storing a copy of the contract in the blockchain database 1610 and / or the smart contract data cache 1606.

[0220] The bank 1772 can maintain the bank accounts of the contracting parties and send and receive payments between the contracting parties. The bank 1772 can provide payment information related to the contract to the blockchain-based trusted platform 1702. The bank can generate a payment document including payment information related to the contract and send the payment document to the blockchain-based trusted platform 1702.

[0221] The judicial institution 1774 can resolve disputes during the execution of the contract. For example, party A 1768 can default to pay party B 1770. The judicial institution 1774 can issue a court order identifying party A 1768 as the debtor and party B 1770 as the creditor, as well as the judgment amount. The judicial institution 1774 can send a copy of the court order to the blockchain-based trusted platform 1702 for record keeping, for example, by storing a copy of the court order in the blockchain database 1610 and / or the smart contract data cache 1606. Party B 1770 can then send a request to the blockchain-based trusted platform 1702 to collect the judgment amount from party A 1768. After verifying that the request is associated with an authentic court order stored in the blockchain, the blockchain-based trusted platform 1702 can identify one or more bank accounts associated with party A 1768 whose total balance is not less than the judgment amount, and transfer the judgment amount from the one or more bank accounts 1768 associated with party A to one or more bank accounts associated with party B.

[0222] Government agency 1776 may be a government agency that oversees and regulates contract-related activities, such as determining whether a contract complies with laws, regulations, or rules and regulations, and assessing and collecting duties, taxes, and fees related to the import and export of goods. Government agency 1776 may also be responsible for detecting fraudulent activities related to contracts. Government agency 1776 may access and retrieve contracts stored in blockchain-based trusted platform 1702. Blockchain-based trusted platform 1702 may provide services to government agency 1776, such as checking for potential violations or fraud in contracts.

[0223] The blockchain-based trusted platform 1702 interacts with a blockchain network 1756 including multiple blockchain nodes 1758 to securely record contract information in a blockchain database 1610 and a smart contract data cache 1606. As described above, the smart contract data cache 1606 can store variable data in the form of smart contract data, and the blockchain database 1610 can store incremental, immutable, and permanent blockchain data. This provides a good balance between the processing efficiency and storage cost of blockchain data.

[0224] In some embodiments, the blockchain-based trusted platform 1702 includes an application layer 1704, a trusted service layer 1710, a blockchain layer 1718, an infrastructure layer 1738, and a tool platform 1744.

[0225] The application layer 1704 may provide one or more contracting parties (e.g., contracting party A 1768 and contracting party B 1770, one or more banks 1772, one or more judicial authorities 1774, and one or more government agencies 1776) to conveniently and securely access and process contract data. For example, the application layer 1704 may include a data recording function 1706 that enables recording of contract data on a blockchain. The application layer 1704 may also include a data verification function 1708 that enables verification of whether specific contract data is recorded on the blockchain. The application layer 1704 may call other layers of the blockchain-based trusted platform 1702.

[0226] The trusted service layer 1710 can provide trusted blockchain services to the application layer 1704 to ensure that the data recorded on the blockchain is credible. The trusted service layer 1710 can include a trusted identity module 1712, a trusted time module 1714, and a trusted computing module 1716.

[0227] The blockchain layer 1718 may provide core functions for the blockchain-based trusted platform 1702, and may include an API layer 1720, a platform management layer 1734, and a basic service layer 1736. The API layer 1720 may include an interface for inputting data to and outputting data from the blockchain-based trusted platform 1702. The API layer 1720 may include: a record input interface 1722 for receiving data to be recorded on the blockchain; a record output interface 1724 for outputting the result of recording data on the blockchain; a verification input interface 1726 for receiving data to be verified based on the data recorded on the blockchain; a verification output interface 1728 for outputting the result of verifying the data based on the data recorded on the blockchain; a data history search interface 1730 for querying data recorded on the blockchain; a transaction search interface 1732 for querying transactions recorded on the blockchain. The platform management layer 1734 may provide management functions, such as chain domain management, node management, and organization management. Chain domain management may provide network management and configuration management at the blockchain level. Node management may manage the joining or exit of consensus nodes. Organization management may specify access rights for entities accessing the platform. The basic service layer 1736 may include modules that provide basic functions for the blockchain-based trusted platform 1702, such as a consensus strategy module, a privacy protection module, a network protocol module, a blockchain storage module, a ZKP generation module, and a ZKP verification module. The consensus strategy module can enable blockchain nodes to reach a consensus on the data to be recorded on the blockchain. The privacy protection module can protect the identity of entities accessing the platform and the privacy of transactions. The network protocol module can enable reliable communication between blockchain nodes. The blockchain storage module can enable data to be reliably stored on the blockchain. The ZKP generation module can be used to generate one or more ZKPs based on the data to be hidden. The ZKP verification module can be used to verify one or more ZKPs based on input proofs.

[0228] The infrastructure layer 1738 may provide computing and communication capabilities for the blockchain-based trusted platform 1702. The infrastructure layer 1738 may provide cloud services such as a public cloud 1740 and a private cloud 1742. The infrastructure layer 1738 may ensure secure data storage, analysis, and computing.

[0229] The tool platform 1744 may provide tools for monitoring, management, and operation and maintenance of the blockchain-based trusted platform 1702. The tool platform 1744 may include a statistics display tool 1746, a status monitoring tool 1748, a log collection tool 1750, a performance analysis tool 1752, and a network topology tool 1754.

[0230] Fig.18An example of a process 1800 for recording ledger data according to an embodiment of the present invention is depicted. Process 1800 may be performed by a blockchain-based trusted platform (e.g., blockchain-based trusted platform 1702) implemented on one or more blockchain nodes or on one or more computing devices communicatively coupled to one or more blockchain nodes. For clarity of presentation, the following description generally describes process 1800 in the context of other figures herein. However, it should be understood that process 1800 may be appropriately performed, for example, by any system, environment, software, and hardware, or a combination of systems, environments, software, and hardware. In some embodiments, the various steps of process 1800 may be run in parallel, combined, looped, or in any order.

[0231] At 1802, ledger data to be recorded on a blockchain may be received from a client device via a record input interface (e.g., record input interface 1722). In some embodiments, a blockchain-based trusted platform includes a data recording function (e.g., data recording function 1706) for recording ledger data on a blockchain; a data verification function (e.g., data verification function 1708) for verifying ledger data recorded on a blockchain; a trusted service layer (e.g., trusted service layer 1710) for providing trusted computing; and a blockchain layer (e.g., blockchain layer 1718) including a record input interface and a record output interface (e.g., record output interface 1724).

[0232] In some embodiments, the client device is associated with a second blockchain that is different from the first blockchain to which data is to be recorded. In some embodiments, the first blockchain may store blockchain data in a first standard format, and the second blockchain may store blockchain data in a second standard format that is different from the first standard format. For example, the first blockchain may be a public blockchain, and the corresponding transactions have a standard format including data fields such as total inputs, total outputs, fees, etc., while the second blockchain may be a consortium blockchain, and the corresponding transactions have a standard format including data fields such as value, random number, gas limit, etc. If the client device packages the data to be recorded in a consortium blockchain transaction and sends the consortium blockchain transaction to a public blockchain node for recording, the public blockchain node may not be able to parse the consortium blockchain transaction because, for example, the data fields of the consortium blockchain transaction are different from the data fields of the public blockchain transaction. In some embodiments, the client device is based on Fig.15 The process discussed in sends a cross-chain message including ledger data to the first blockchain.

[0233] In some embodiments, the ledger data includes one or more record input parameters defined in the record rule and accepted by the record input interface. In some embodiments, the ledger data includes one or more record input parameters associated with structured data. Structured data can be, for example, data in a standard format having one or more predetermined data fields. For example, a data record in a key-value table can be structured data. As another example, a blockchain transaction with predetermined data fields (e.g., total inputs, total outputs, fees) can also be structured data. In some embodiments, at least one of the position of a data field of the structured data or the number of bits associated with the data field is predetermined in a standard format.

[0234] In some embodiments, the ledger data includes one or more record input parameters associated with unstructured data. Unstructured data may be data that cannot be presented in a multidimensional table, for example. For example, the unstructured data may be a data file, such as a text file, an image file, a video file, an audio file, etc.

[0235] If the ledger data is associated with structured data, the one or more record input parameters may include one or more of the following: data information of the structured data, service information of the structured data, timestamp of the structured data, signature data of the structured data, and blockchain consensus result of the structured data. The data information of the structured data may include one or more of the following: a unique ID of the structured data and / or a hash value of the structured data calculated based on a hash function and at least a portion of the structured data. The service information of the structured data may include, for example, an ID of a contract associated with the structured data, one or more IDs associated with the parties to the contract, the name of the contract, etc. The timestamp of the structured data may indicate the time when the structured data was created or last modified. The signature data of the structured data may be structured data signed by using a private key of a user of a client device. The blockchain consensus result of the structured data may indicate whether a blockchain consensus has been reached on the structured data.

[0236] If the ledger data is associated with a data file, the one or more record input parameters may include one or more of the following: a hash value of the data file, attribute information of the data file, service information of the data file, a timestamp of the data file, and signature data of the data file. The hash value of the data file may be calculated based on a hash function and at least a portion of the data file. The attribute information of the data file may include one or more of the following: the type, source, status, name, size, user associated with the client device, and update time of the data file. The service information of the data file may include, for example, an ID of a contract associated with the data file, one or more IDs associated with the parties to the contract, the name of the contract, etc. The timestamp of the data file may indicate the time when the data file was created or last modified. The signature data of the data file may be a data file signed using a user private key of the client device.

[0237] In some embodiments, before the client device sends the ledger data to the blockchain-based trusted platform, a secure communication channel is established between the client device and the blockchain-based trusted platform. The secure communication channel can be established based on at least one of a two-way Transport Layer Security (TLS) protocol, a two-way Hypertext Transfer Protocol Security (HTTPS) protocol, or a one-way HTTPS protocol.

[0238] At 1804, it can be determined whether raw ledger data associated with the ledger data satisfies a recording rule.

[0239] In some embodiments, the original ledger data is the ledger data itself. In some embodiments, the ledger data includes a bitstream, and the original ledger data is obtained by converting the bitstream based on a conversion rule. The conversion rule may be included in the record rule. In some embodiments, before receiving the ledger data via the record input interface, the client device may generate original data including one or more record input parameters, and convert the original data into a bitstream based on the conversion rule. The conversion rule may include at least one of the following: an encoding scheme corresponding to each of the one or more record input parameters, or an order in which one or more record input parameters are arranged in the bitstream. For example, the client device may generate original data including one or more record input parameters, encode each data value of each record input parameter into each small bitstream, determine the order in which one or more record input parameters are arranged in the bitstream, and splice each small bitstream to generate a bitstream.

[0240] For example, the original data includes three record input parameters: record input parameter 1, record input parameter 2, and record input parameter 3. The value of record input parameter 1 is x. The value of record input parameter 2 is y. The value of record input parameter 3 is z. The encoding scheme of the conversion rule may provide: x is encoded as 1000, y is encoded as 1001, and z is encoded as 1101. The conversion rule may also refer to: the order of arranging the three record input parameters in the bit stream is {record input parameter 1, record input parameter 3, record input parameter 2}. Then, the obtained bit stream is 100011011001.

[0241] After receiving the ledger data, the bit stream included in the ledger data can then be converted into raw data including one or more record input parameters based on the conversion rule. For example, assuming that the bit stream 100011011001 is received, it can be determined that record input parameter 1, record input parameter 3, and record input parameter 2 are received, and their respective values ​​are x, z, and y.

[0242] In some embodiments, the recording rule defines one or more recording input parameters accepted by the recording input interface. In some embodiments, for each of the one or more recording input parameters, the recording rule provides an input format adopted by the corresponding recording input parameter. For example, the recording input parameter may be a variable accepted by the recording input interface, the ledger data may include a value corresponding to the variable, and the input format of the recording input parameter may be a data type of the variable, a size limit of the variable, characters excluded from use in the variable, etc. In some embodiments, if the original ledger data includes at least one of the one or more recording input parameters and satisfies the input format of the one or more recording input parameters, it is determined that the original ledger data satisfies the recording rule, and the process 1800 proceeds to 1806. Otherwise, it is determined that the original ledger data does not satisfy the recording rule, and the process 1800 proceeds to 1812.

[0243] At 1806, the original ledger data may be recorded on the blockchain. In some embodiments, the trusted service layer may include a trusted time module (e.g., trusted time module 1712), a trusted identity module (e.g., trusted identity module 1714), and a trusted computing module (e.g., trusted computing module 1716). In some embodiments, the data logging function may call the trusted time module to generate a first record timestamp, which indicates the time when the ledger data was received by the data logging function. In some embodiments, the data logging function may call the trusted identity module to verify the user identity associated with the client device, and call the trusted time module to generate a second record timestamp. The second record timestamp may indicate the time when the original ledger data was recorded on the blockchain. In some embodiments, the data logging function may call the trusted computing module to generate a blockchain transaction including the original ledger data, the user identity, the first record timestamp, and the second record timestamp. The blockchain transaction may then be shared with one or more blockchain nodes to perform a blockchain consensus, and the blockchain transaction may be added to the blockchain after the blockchain consensus is reached.

[0244] At 1808, a record receipt may be generated. In some embodiments, the record receipt indicates that the original ledger data has been successfully recorded on the blockchain.

[0245] At 1810 , a record receipt can be sent via a record output interface (eg, record output interface 1724 ).

[0246] At 1812, an error message may be sent via the record output interface. In some embodiments, the error message indicates that the original ledger data does not satisfy the record rule. In some embodiments, the error message may also include one or more reasons why the original ledger data does not satisfy the record rule.

[0247] Fig.19 An example of a process 1900 for verifying ledger data according to an embodiment of the present invention is depicted. Process 1900 may be performed by a blockchain-based trusted platform (e.g., blockchain-based trusted platform 1702) implemented on one or more blockchain nodes or on one or more computing devices communicatively coupled to one or more blockchain nodes. For clarity of presentation, the following description generally describes process 1900 in the context of other figures herein. However, it should be understood that process 1900 may be appropriately performed, for example, by any system, environment, software, and hardware, or a combination of systems, environments, software, and hardware. In some embodiments, the various steps of process 1900 may be run in parallel, combined, looped, or in any order.

[0248] At 1902, ledger data may be received from a client device via a verification input interface (e.g., verification input interface 1726). In some embodiments, the client device obtains raw data such as a contract document and intends to verify whether the raw data has been tampered with. The client device may then calculate a hash value for the raw data, generate ledger data including the hash value, and send the ledger data to a blockchain-based trusted platform for verification. The blockchain-based trusted platform may compare the hash value received from the client device with the hash value recorded on the blockchain. If the blockchain-based trusted platform finds that the hash value recorded on the blockchain matches the hash value received from the client device, the blockchain-based trusted platform may verify that the raw data has not been tampered with. The blockchain-based trusted platform may then send a verification receipt to the client device to indicate that the contract document has not been tampered with.

[0249] In some embodiments, the client device is associated with a second blockchain that is different from the first blockchain that receives the ledger data. In some embodiments, the first blockchain may use a first standard format to store blockchain data, and the second blockchain may use a second standard format that is different from the first standard format to store blockchain data. For example, the first blockchain may be a public blockchain, and the corresponding transactions have a standard format including data fields such as total inputs, total outputs, fees, etc., and the second blockchain may be a consortium blockchain, and the corresponding transactions have a standard format including data fields such as value, random number, gas limit, etc. If the client device packages the data to be recorded in a consortium blockchain transaction and sends the consortium blockchain transaction to a public blockchain node for recording, the public blockchain node may not be able to parse the consortium blockchain transaction because, for example, the data fields of the consortium blockchain transaction are different from the data fields of the public blockchain transaction. In some embodiments, the client device is based on Fig.15 The process discussed in sends a cross-chain message including ledger data to the first blockchain.

[0250] In some embodiments, the ledger data includes one or more validation input parameters defined in the validation rules and accepted by the validation input interface. Fig.18 One or more validation input parameters associated with the structured data or unstructured data discussed in .

[0251] If the account data is associated with structured data, the one or more verification input parameters may include one or more of the following: selection of a verification method for the account data, a unique ID of the structured data, service information of the structured data, a timestamp of the structured data, and signature data of the structured data. In some embodiments, the trusted platform based on blockchain provides multiple verification methods for the client device to select. For example, the multiple verification methods may include a bitstream verification method and a plaintext verification method. Under the bitstream verification method, before the account data can be verified, the account data includes a bitstream, and the bitstream needs to be converted into data values ​​of one or more verification input parameters. Under the plaintext verification method, the account data directly includes data values ​​of one or more verification input parameters that do not need to be converted. The unique ID of the structured data may be a hash value of the structured data calculated based on a hash function and at least a portion of the structured data. The service information of the structured data may include, for example, an ID of a contract associated with the structured data, one or more IDs associated with the parties to the contract, the name of the contract, etc. The timestamp of the structured data may indicate the time when the structured data was created or last modified. The signature data of the structured data may be structured data signed by using the private key of the user of the client device.

[0252] If the ledger data is associated with a data file, the one or more verification input parameters may include one or more of the following: a hash value of the data file, service information of the data file, a timestamp of the data file, and signature data of the data file. The hash value of the data file may be calculated based on the hash function and at least a portion of the data file. The service information of the data file may include, for example, an ID of a contract associated with the data file, one or more IDs associated with the parties to the contract, the name of the contract, etc. The timestamp of the data file may indicate the time when the data file was created or last modified. The signature data of the data file may be a data file signed by using a private key of a user of a client device.

[0253] At 1904, it may be determined whether raw ledger data associated with the ledger data satisfies the validation rule. In some embodiments, the raw ledger data is the ledger data itself. In some embodiments, the ledger data includes a bitstream, and the raw ledger data is obtained by transforming the bitstream based on a transformation rule. The transformation rule may be included in the validation rule. In some embodiments, the transformation between the bitstream and the raw data follows the same Fig.18 A similar treatment as discussed in .

[0254] In some embodiments, the validation rule defines one or more validation input parameters accepted by the validation input interface. In some embodiments, for each of the one or more validation input parameters, the validation rule provides an input format adopted by the corresponding validation input parameter. For example, the validation input parameter may be a variable accepted by the validation input interface, the ledger data may include a value corresponding to the variable, and the input format of the validation input parameter may be a data type of the variable, a size limit of the variable, characters excluded from use in the variable, etc. In some embodiments, if the original ledger data includes at least one of the one or more validation input parameters and satisfies the input format of the one or more validation input parameters, it is determined that the original ledger data satisfies the validation rule, and processing 1900 proceeds to 1906. Otherwise, it is determined that the original ledger data does not satisfy the validation rule, and processing 1900 proceeds to 1912.

[0255] At 1906, it may be determined whether the original ledger data is verified. In some embodiments, if the original ledger data matches the first ledger data recorded on the blockchain, the original ledger data is verified. In some embodiments, both the original ledger data and the first ledger data include a hash value of a data file or a hash value of structured data, and if the hash value included in the original ledger data matches the hash value included in the first ledger data, it is determined that the original ledger data corresponds to the first ledger data. If it is determined that the original ledger data is verified, process 1900 proceeds to 1908. Otherwise, process 1900 proceeds to 1912.

[0256] At 1908, a validation receipt can be generated. In some embodiments, the validation receipt indicates that the original data associated with the ledger data has not been tampered with.

[0257] At 1910 , a verification receipt can be sent to the client device via a verification output interface (eg, verification output interface 1726 ).

[0258] At 1912, an error message may be sent via the validation output interface. In some embodiments, the error message indicates that the original ledger data does not satisfy the validation rule and one or more reasons why the original ledger data does not satisfy the validation rule. In some embodiments, the error message indicates that the original data associated with the ledger data has been tampered with.

[0259] Fig. 20An example 2000 of cross-chain and cross-network data transmission according to an embodiment of the present invention is depicted. Example 2000 includes the Internet 2002, a private network 2004, and gateways 2006a and 2006b. In some embodiments, gateways 2006a and 2006b are two different gateways, wherein gateway 2006a processes data sent from the Internet 2002 to the private network 2004, and gateway 2006b processes data sent from the private network 2004 to the Internet 2002. In some embodiments, gateway 2006a and gateway 2006b are the same gateway. In some embodiments, the only physical network path between the Internet 2002 and the private network 2004 is via gateways 2006a and 2006b.

[0260] In some embodiments, a first plurality of blockchain nodes (e.g., blockchain node 1 2008a to blockchain node 5 2008e) of a first blockchain network are connected via the Internet 2002. For example, the first plurality of blockchain nodes may be associated with one or more participants of a contract. In some embodiments, a second plurality of blockchain nodes (e.g., blockchain node 1 2010a to blockchain node 5 2010e) of a second blockchain network are connected via a private network 2004. The second plurality of blockchain nodes may be associated with, for example, a judicial institution, a financial institution, a government agency, etc. In some embodiments, each of the first plurality of blockchain nodes and the second plurality of blockchain nodes may access a blockchain-based trusted platform 1702 via an API layer 1720.

[0261] In some embodiments, the gateway 2006a includes at least one network device and at least one server. The at least one network device can be interconnected with a router of the Internet 2002 and a router of the private network 2004. In some embodiments, the gateway 2006a allows one-way data transmission from the Internet to the private network, or one-way data transmission from the private network to the Internet, but does not allow two-way data transmission between the Internet and the private network.

[0262] In some embodiments, in order to perform unidirectional data transmission, the gateway 2006a uses a single optical fiber instead of a pair of optical fibers to connect at least one network device of the gateway 2006a and a router of the Internet. The gateway 2006a may use another single optical fiber to connect at least one network device of the gateway 2006a and a router of the private network. At least one network device of the gateway 2006a may be equipped with an optical receiver for connecting to a single optical fiber of the Internet 2002 and an optical transmitter for connecting to a single optical fiber of the private network 2004, thereby allowing data transmission in a single direction from the Internet 2002 to the private network 2004. In some embodiments, at least one network device of the gateway 2006a uses an optical receiver for connecting to a single optical fiber of the private network 2004 and an optical transmitter for connecting to a single optical fiber of the Internet 2002, thereby allowing data transmission in a single direction from the private network 2004 to the Internet 2002.

[0263] In some embodiments, at least one server of the gateway 2006a stores the ciphertext 2012 sent from the blockchain node of the first blockchain network, so that the second blockchain node of the second blockchain network can obtain the ciphertext 2012 from the at least one server of the gateway 2006a. In some embodiments, at least one server of the gateway 2006b stores the ciphertext 2014 sent from the blockchain node of the second blockchain network, so that the blockchain node of the first blockchain network can obtain the ciphertext 2014 from the at least one server of the gateway 2006b.

[0264] Fig.21 An example of a process 2100 for cross-chain and cross-network data transfer according to an embodiment of the present invention is depicted. At a high level, the participants in the process 2100 include a first blockchain node 2008a, a gateway 2006a, and a second blockchain node 2010a. The process 2100 can be performed to send data from the first blockchain node 2008a to the second blockchain node 2010a. As shown in Fig. 20 As discussed in the description of , the first blockchain node 2008a is associated with the first blockchain network and connected to other blockchain nodes of the first blockchain network through the Internet 2002, and the second blockchain node 2010a is associated with the second blockchain network and connected to other blockchain nodes of the second blockchain network through the private network 2004. The blockchain nodes of the first blockchain network can record blockchain data on the first blockchain, and the blockchain nodes of the second blockchain network can record blockchain data on the second blockchain.

[0265] At 2102, the first blockchain node 2008a may obtain the original data in the cross-chain message. The original data may be data recorded on the first blockchain. In some embodiments, before the first blockchain node 2008a obtains the original data, the third blockchain node of the first blockchain network retrieves the original data from the first blockchain, generates a cross-chain message, and sends the cross-chain message to the first blockchain node. In some embodiments, before the third blockchain node retrieves the original data, the third blockchain node may receive a data request for the original data from the private network. In some embodiments, the original data is a contract file recorded on the first blockchain, and the third blockchain node may send the contract file to the private network to be recorded on the second blockchain or verified by the second blockchain network.

[0266] At 2104, the first blockchain node may verify that the original data is stored in the first blockchain. The original data may be stored in the first blockchain using Fig.19 This can be verified by the processing discussed in .

[0267] At 2106, the first blockchain node may convert the original data to obtain first data.

[0268] In some embodiments, the original data includes one or more data values ​​associated with one or more data fields arranged using a first standard format of a first blockchain network. The first blockchain network may need to convert the original data into a second standard format that can be parsed by the second blockchain network. For example, the conversion is performed based on a conversion rule. The conversion rule may provide at least one of the following: an order of data fields to be arranged in the first data, or a coding scheme for converting each data value included in each data field. In some embodiments, the conversion rule is predetermined by the first blockchain network and the second blockchain network. In some embodiments, the second blockchain network converts the original data into a second standard format based on the following: Fig.18 The recording rules discussed in Fig.19 The first blockchain network may determine an input rule based on at least one of the validation rules discussed in , wherein the input rule provides at least one of the following: a plurality of input parameters input to the second blockchain network, an encoding scheme corresponding to each of the plurality of input parameters, or an order in which the plurality of input parameters are arranged in the input. The first blockchain network may then determine a conversion rule based on the input rule. For example, if a data field is not included in the plurality of input parameters provided by the input rule, the first blockchain node does not include the data field in the first data.

[0269] In some embodiments, the first data includes a bitstream obtained by encoding each data value of each data field into respective small bitstreams, determining an order in which one or more data values ​​are arranged in the bitstream, and concatenating the respective small bitstreams to generate the bitstream.

[0270] At 2108, the first blockchain node may encrypt the first data to generate a ciphertext. The encryption algorithm may be a symmetric encryption algorithm or an asymmetric encryption algorithm.

[0271] At 2110, the first blockchain node may generate a hash value of the first data.

[0272] At 2112, the first blockchain node may generate one or more ZKPs associated with the first data. Fig.17 The ZKP generation module discussed in and based on a ZKP algorithm, such as a zero-knowledge succinct non-interactive argument of knowledge (zk-SNARK) algorithm or a zero-knowledge scalable transparent argument of knowledge (zk-STARK) algorithm, can generate one or more ZKPs. The one or more ZKPs can be used by the gateway 2006a to confirm whether the ciphertext is secure without decrypting the ciphertext.

[0273] ZKP is a cryptographic technique that allows a prover to convince one or more verifiers that a statement is true, without providing any sensitive information to the verifier or verifiers.

[0274] ZKP algorithms usually include a key generation algorithm, a proof generation algorithm, and a proof verification algorithm. The key generation algorithm is responsible for calculating the proof key (which can be used as input data for generating proofs) and the verification key (which can be used as input data for verifying proofs). The proof generation algorithm is responsible for generating proofs. The proof verification algorithm is responsible for verifying the proof and obtaining a binary verification result of true or false.

[0275] Taking the zk-SNARK algorithm as an example, the zk-SNARK algorithm includes three algorithms: G, P, and V. The G algorithm represents the key generator, which is responsible for generating the proof key and the verification key. The P algorithm is responsible for generating the proof. The V algorithm is responsible for verifying the proof generated by the P algorithm and obtaining a true or false verification result.

[0276] It should be noted that when a proof is to be calculated by a blockchain node based on a proof generation algorithm, the content of the input data of the proof generation algorithm generally depends on the statement to be verified by the proof.

[0277] In some embodiments, gateway 2006 determines that the ciphertext is secure when at least one of the following statements is true.

[0278] Statement 1: The data to be decrypted from the ciphertext does not include any keywords defined in the restricted list maintained by gateway 2006a. To determine whether this statement is true, a ZKP can be generated by inputting at least the original data, the ciphertext, and the restriction list into a proof generation algorithm.

[0279] Statement 2: The data to be decrypted from the ciphertext satisfies the input rules of the second blockchain network. To determine whether this statement is true, a ZKP can be generated by inputting the original data, the ciphertext, and the input rules of the second blockchain network into a proof generation algorithm.

[0280] Statement 3: The file to be decrypted from the ciphertext is of a file type acceptable to the second blockchain network. To determine whether this statement is true, a ZKP can be generated by inputting the original data, the ciphertext, and a list of file types acceptable to the second blockchain network into a proof generation algorithm.

[0281] Statement 4: The data to be decrypted from the ciphertext does not contain malware or viruses. To determine whether this statement is true, a ZKP can be generated by inputting at least the original data, the ciphertext, and the code of the malware or virus into a proof generation algorithm.

[0282] At 2114, the first blockchain node may send the ciphertext, the hash value, and the one or more ZKPs to gateway 2006a.

[0283] At 2116, gateway 2006a may verify the ciphertext based on one or more ZKPs.

[0284] Specifically, as a verifier of one or more ZKPs, gateway 2006a may input at least the one or more ZKPs and the ciphertext as input data into a proof verification algorithm, and then determine whether the ciphertext is secure based on the above statement.

[0285] Taking the zk-SNARK algorithm as an example again, when a zero-knowledge verification is to be performed on one of the one or more ZKPs, the ZKP and the ciphertext can be input as input data into the V algorithm of the zk-SNARK algorithm for calculation. If the output result of the V algorithm is true, the ZKP is used to verify that the statement is true. On the contrary, if the output result of the V algorithm is false, the ZKP is used to verify that the statement is false.

[0286] At 2118, when the gateway 2006a determines that the ciphertext is secure based on the one or more ZKPs, the gateway 2006a stores the received ciphertext and the received hash value in at least one server included in the gateway 2006a.

[0287] At 2120, the gateway 2006a may send a data notification to the second blockchain node 2010a. The data notification may notify the second blockchain node that the ciphertext is stored in at least one server.

[0288] In response to the data notification, the second blockchain node 2010a may send a data retrieval request to the gateway 2006a at 2122. In response to the data retrieval request, a network connection may be established between the gateway 2006a and the second blockchain node 2010a.

[0289] At 2124, the gateway 2006a may send the ciphertext and the hash value to the second blockchain node 2010a.

[0290] At 2126, the second blockchain node 2010a may decrypt the ciphertext to generate second data. If the first data or the ciphertext has not been tampered with during data transmission, the second data may be the same as the first data. Otherwise, the second data may be different from the first data.

[0291] At 2128, the second blockchain node 2010a may verify the second data based on the hash value. For example, the second blockchain node 2010a may calculate a second hash value of the second data and compare the second hash value with the hash value. If the second hash value and the hash value are the same, the second blockchain node 2010a may determine that the first data or ciphertext has not been tampered with. Otherwise, the second blockchain node 2010a may determine that the first data or ciphertext has been tampered with.

[0292] At 2130, the second blockchain node 2010a may store one or more input parameters included in the second data on the second blockchain. In some embodiments, the second data includes one or more input parameters as defined in an input rule of the second blockchain network. In some embodiments, the second data includes a bitstream, and the second blockchain node 2010a converts the bitstream into the one or more input parameters based on the conversion rule used by the first blockchain node when converting the original data to the first data.

[0293] At 2132, the second blockchain node 2010a may send a data receipt to the gateway 2006a. In some embodiments, the data receipt indicates that the ciphertext was successfully received and the second data was stored on the second blockchain. In some embodiments, the data receipt indicates that the second data was not stored on the second blockchain and one or more reasons why the second data was not stored on the second blockchain. The one or more reasons may include, for example, that the ciphertext failed to be received by the second blockchain node 2010a, the hash value of the ciphertext does not match the received hash value, the second data does not satisfy the input rules of the second blockchain network, etc.

[0294] At 2134, the gateway 2006a may send a data receipt to the first blockchain node 2008a. In some embodiments, if the data receipt indicates that the second data is not stored on the second blockchain, the first blockchain node 2008a may restart the process 2100.

[0295] In some embodiments, the first blockchain node 2008a can obtain the additional ciphertext from the gateway 2006a, wherein the gateway 2006 receives the additional ciphertext from the blockchain node of the second blockchain network. The first blockchain node can then decrypt the additional ciphertext to generate third data, and then store the third data in the first blockchain.

[0296] In some embodiments, process 2100 may be performed to transfer data from a private network to the Internet. That is, a first blockchain node 2008a may be associated with a private network, while a second blockchain node 2010a may be associated with the Internet.

[0297] Fig. 22 An example 2200 of cross-network and cross-chain data communication according to embodiments of the present invention is depicted. At a high level, the example 2200 shows a process of sending a loan contract 2206a from a debtor 2202 associated with a first blockchain node of a first blockchain network to a bank 2204 associated with a second blockchain node of a second blockchain network. The first blockchain network may be connected via the Internet, and the second blockchain network may be connected via a private computer network that is air-gapped from the Internet.

[0298] The first blockchain node associated with the debtor may encrypt the loan contract 2206a to generate a ciphertext 2208a, and generate one or more ZKPs 2210 to prove that the ciphertext 2208a is secure. The first blockchain node may send the ciphertext 2208a and the one or more ZKPs 2210 to the gateway 2006a. The gateway 2006a may then verify that the ciphertext 2208a is secure based on the one or more ZKPs 2210, while the ciphertext 2208a remains encrypted during the verification process. After successful verification, the gateway 2006a may then store the ciphertext 2208a in the server of the gateway 2006a. The second blockchain node associated with the bank 2204 may then obtain the ciphertext 2208b from the server of the gateway 2206a. The bank 2204 may then decrypt the ciphertext 2208b to obtain the original loan contract 2206b, and perform subsequent operations on the loan contract 2206b.

[0299] Fig.23An example 2300 of a trusted platform based on blockchain according to an embodiment of the present invention is depicted. In some embodiments, a trusted platform 1702 based on blockchain can provide services to users in multiple computer networks by adopting data security rules in each computer network. In this example, merchants (e.g., Merchant 1 2302a to Merchant N 2302n) are associated with a merchant blockchain network connected using the Internet. Banks (e.g., Bank 1 2304a to Bank N 2304n) are associated with a bank blockchain network connected using a private bank network. Courts (e.g., Court 1 2306a to Court N 2306n) are associated with a court blockchain network connected using a private court network.

[0300] For example, merchant 1 2302a wishes to send a contract to bank 1 2304a to record the contract on a bank blockchain associated with the bank. The first blockchain node associated with merchant 1 2302a obtains the contract from the merchant blockchain database 2310 or smart contract data cache 2308 and based on Fig.21 The process 2100 discussed in the above discussion sends a cross-chain and cross-network message including the contract to a second blockchain node associated with Bank 1 2304a. Bank 1 2304a calls the service of the blockchain-based trusted platform 1702 based on Fig.18 The process 1800 discussed in the above discussion records the contract in the bank blockchain. The data security rules of the private bank network may require that the data of the contract be stored in a computer server located in the private bank network that is isolated from the Internet. When the blockchain-based trusted platform 1702 detects that the contract is to be recorded in the bank blockchain, the blockchain-based trusted platform 1702 records the contract in the bank blockchain database 2312 managed by the bank blockchain network and the bank smart contract data cache 2312 located in the private bank network.

[0301] In a similar manner, Merchant 1 2302a may need to send a court order to Court 1 2306a to enforce the court order. The first blockchain node associated with Merchant 1 2302a is based on Fig.21 The process 2100 discussed in the above sends a cross-chain and cross-network message including the court order to a third blockchain node associated with court 1 2306a. Court 1 2306a invokes the service of the blockchain-based trusted platform 1702 based on Fig.19The processing discussed in , verifies the authenticity of the court order. The data security rules of the private court network may require that the court data be stored in a computer server located in the private court network that is isolated from the Internet. When the blockchain-based trusted platform 1702 detects that the court order is to be verified based on the court data, the blockchain-based trusted platform 1702 accesses the court data in the court blockchain database 2316 managed by the court blockchain network and the court smart contract data cache 2318 located in the private court network to verify the court order based on the court data.

[0302] For another example, the blockchain-based trusted platform 1702 can treat merchant data, bank data, and court data differently. For example, each of a private bank network and a private court network can have data security rules that govern the procedures for handling sensitive data and the privacy protections applied to sensitive data. In some embodiments, the blockchain-based trusted platform 1702 provides the same API to merchants, banks, and courts, but the application layer 1704 will handle sensitive data differently depending on the computer network associated with the sensitive data.

[0303] For example, the blockchain-based trusted platform 1702 includes a rule database 2320 that includes information about the regulations of various computer networks in which the blockchain-based trusted platform 1702 operates. The application layer 1704 can access the rule database 2320 and operate in accordance with the regulations of each computer network. For example, when Bank 1 2304a calls the blockchain-based trusted platform 1702 to send the bank statement of Merchant 1 2302a to Court 1 2306a, the application layer 1704 can access the rule database 2320 to determine the data security rules of the private bank network, specifying that the social security code of the bank statement is to be edited when the bank statement is sent outside the private bank network, and then the blockchain-based trusted platform 1702 can edit the social security code of the bank statement and send the edited bank statement to Court 1 2306a.

[0304] Fig.24 Another example 2400 of a blockchain-based trusted platform according to an embodiment of the present invention is depicted. The blockchain-based trusted platform 1702 can be used to process customized customs clearance data based on a set of customized rules agreed by a group of people. For example, when a first group of people in a country agree to follow a set of rules regarding import taxes on goods, the blockchain-based trusted platform 1702 can be used to process import customs clearance data.

[0305] For example, a second group of environmentally conscious members may decide to purchase products primarily from sustainable sources and donate a percentage of the purchase price of goods purchased from non-sustainable sources to environmental causes. It is difficult for individuals to track products from sustainable or non-sustainable sources. The trusted platform 1702 based on blockchain allows the second group of members to easily set rules to help achieve their goals. For example, the trusted platform 1702 based on blockchain may include a rule database 2412 that specifies which consumer products come from sustainable sources, which agricultural products are produced using environmentally friendly methods, and which seafood products are produced by harvesting marine wildlife in a sustainable manner. The administrator may update the rule database 2412 from time to time. The second group of members (e.g., the first purchaser 2402, ..., the Nth purchaser 2404) may purchase products from merchants (e.g., the first merchant 2406, ..., the Mth merchant 2408) through the online business system 2414.

[0306] When a purchaser purchases a product through the online business system 2414 and indicates that the purchaser is a member of the second group, the online business system 2414 sends the purchase data to the blockchain-based trusted platform 1702 and indicates that the purchase data is associated with the second group (e.g., through an ID associated with the second group). The blockchain-based trusted platform 1702 records the purchase data on the blockchain database 2418 and / or the smart contract data cache 2416. The blockchain-based trusted platform 1702 includes a customs clearance approval module 2410 that analyzes the purchase data based on the rule database 2412 to determine whether the purchased product is from a sustainable source. If the product is not from a sustainable source, the customs clearance approval module 2410 determines the donation amount that the purchaser should donate (this is similar to the customs authorities determining the amount of import tax to be applied to imported goods).

[0307] For example, the customs clearance approval module 2410 may send a message to the purchaser indicating that the product is not from a sustainable source and that the purchaser should donate a certain amount of money based on an agreement between the second group members. The blockchain-based trusted platform 1702 may communicate with the purchaser's bank, request payment from the bank, and send the payment as a donation to, for example, an environmental non-profit organization. Transactions performed by the blockchain-based trusted platform 1702 may be recorded in a blockchain database 2418 that can be verified by the relevant parties. The services provided by the blockchain-based trusted platform 1702 may be automated using smart contracts.

[0308] Fig.25is a flow chart of an example of a process 2500 for recording and verifying ledger data. For convenience, process 2000 will be described as being performed by a system of one or more computers located in one or more locations and appropriately programmed according to the present disclosure. For example, an appropriately programmed blockchain-based system (e.g., Fig.17 The blockchain-based trusted system 1702) can perform processing 2500.

[0309] At 2502, a blockchain-based trusted system receives first ledger data to be recorded on a blockchain from a client device via a record input interface. In some embodiments, the first ledger data includes a bitstream. In some embodiments, before receiving the first ledger data, the client device converts the original ledger data into a bitstream based on a conversion rule. In some embodiments, the blockchain-based trusted system converts the bitstream based on the conversion rule to obtain the original ledger data. In some embodiments, the conversion rule includes at least one of: an encoding scheme corresponding to each record input parameter of one or more record input parameters; or an order in which one or more record input parameters are arranged in the bitstream. In some embodiments, before receiving the first ledger data, the blockchain-based trusted system establishes a secure communication channel with the client device based on at least one of a two-way transport layer security (TLS) protocol, a two-way hypertext transfer protocol secure (HTTPS) protocol, or a one-way HTTPS protocol. In some embodiments, the first ledger data is associated with a first data file, wherein the one or more record input parameters include a hash value of the first data file, attribute information of the first data file, service information of the first data file, a timestamp of the first data file, and one or more of signature data of the first data file. In some embodiments, the client device is associated with an additional blockchain different from the blockchain.

[0310] At 2504, the blockchain-based trusted system determines whether the original ledger data associated with the first ledger data satisfies a recording rule, wherein the recording rule includes one or more recording input parameters associated with the recording input interface. In some embodiments, determining whether the second ledger data corresponds to the original ledger data includes determining whether a first hash value included in the original ledger data matches a second hash value included in the second ledger data.

[0311] At 2506, in response to determining that the original ledger data associated with the first ledger data satisfies the recording rule, the blockchain-based trusted system records the original ledger data on the blockchain.

[0312] At 2508, the blockchain-based trusted system generates a record receipt associated with the first ledger data.

[0313] At 2510, the blockchain-based trusted system sends a record receipt to the client device via a record output interface.

[0314] In some embodiments, a blockchain-based trusted system receives second ledger data from a client device through a verification input interface. Then, the blockchain-based trusted system can determine whether the second ledger data satisfies the verification rules, wherein the verification rules include one or more verification input parameters associated with the verification input interface. In response to determining that the second ledger data satisfies the verification rules, the blockchain-based trusted system can then determine whether the second ledger data corresponds to the original ledger data recorded on the blockchain. In response to determining that the second ledger data corresponds to the original ledger data recorded on the blockchain, the blockchain-based trusted system can then generate a verification receipt associated with the second ledger data, and the verification receipt indicates that the original data associated with the second ledger data has not been tampered with. Then, the blockchain-based trusted system can transmit the verification receipt to the client device through the verification output interface. In some embodiments, the second ledger data is associated with a second data file, and the one or more verification input parameters include a hash value of the second data file, service information of the second data file, a timestamp of the second data file, and one or more of the signature data of the second data file.

[0315] In some embodiments, the blockchain-based trusted system calls the trusted time module to generate a first record timestamp indicating the time when the first ledger data was received. Then, the blockchain-based trusted system may call the trusted identity module to verify the user identity associated with the client device. Then, the blockchain-based trusted system may call the trusted time module to generate a second record timestamp indicating the time when the original ledger data was recorded on the blockchain. Then, the blockchain-based trusted system may call the trusted computing module to generate a blockchain transaction including the original ledger data, the user identity, the first record timestamp, and the second record timestamp.

[0316] Fig.26 is a diagram of an example of modules of an apparatus 2600 according to an embodiment of the present invention.

[0317] The apparatus 2600 may be an example of an embodiment of a computer system configured to record and verify ledger data in a trusted system based on a blockchain. The apparatus 260 may correspond to the above-mentioned embodiment, and the apparatus 260 includes: a receiving module 2602 for receiving first ledger data to be recorded on a blockchain from a client device and via a record input interface; a determining module 2604 for determining whether the original ledger data associated with the first ledger data satisfies a record rule, wherein the record rule includes one or more record input parameters associated with the record input interface; a recording module 2606 for recording the original ledger data on the blockchain in response to determining that the original ledger data associated with the first ledger data satisfies the record rule; a generating module 2608 for generating a record receipt associated with the first ledger data; and a sending module 2610 for sending the record receipt to the client device via a record output interface.

[0318] In an optional embodiment, the apparatus 260 further comprises the following: a second receiving module for receiving second ledger data from a client device via a verification input interface; a second determining module for determining whether the second ledger data satisfies a verification rule, wherein the verification rule comprises one or more verification input parameters associated with the verification input interface; a third determining module for determining whether the second ledger data corresponds to the original ledger data recorded on the blockchain in response to determining that the second ledger data satisfies the verification rule; a second generating module for generating a verification receipt associated with the second ledger data in response to determining that the second ledger data corresponds to the original ledger data recorded on the blockchain, wherein the verification receipt indicates that the original data associated with the second ledger data has not been tampered with; and a second sending module for sending the verification receipt to the client device via the verification output interface.

[0319] In an optional embodiment, determining whether the second ledger data corresponds to the original ledger data includes determining whether a first hash value included in the original ledger data matches a second hash value included in the second ledger data.

[0320] In an optional embodiment, the first ledger data includes a bit stream, wherein before receiving the first ledger data, the client device converts the original ledger data into the bit stream based on a conversion rule, and the apparatus 260 further includes the following: a conversion module, configured to convert the bit stream based on the conversion rule to obtain the original ledger data.

[0321] In an optional embodiment, the conversion rule comprises at least one of: an encoding scheme corresponding to each of the one or more record input parameters; or an order in which the one or more record input parameters are arranged in the bitstream.

[0322] In an optional embodiment, the device 260 also includes the following: a first calling module, used to call the trusted time module to generate a first record timestamp indicating the time when the first ledger data was received; a second calling module, used to call the trusted identity module to verify the user identity associated with the client device; a third calling module, used to call the trusted time module to generate a second record timestamp indicating the time when the original ledger data was recorded on the blockchain; and a fourth calling module, used to call the trusted computing module to generate a blockchain transaction including the original ledger data, the user identity, the first record timestamp and the second record timestamp.

[0323] In an optional embodiment, the device 260 further includes the following: an establishment module, configured to establish a secure communication channel with the client device based on at least one of a bidirectional transport layer security (TLS) protocol, a bidirectional hypertext transfer protocol (HTTP), or a unidirectional HTTP protocol before receiving the first ledger data.

[0324] In an optional embodiment, the first ledger data is associated with a first data file, wherein the one or more record input parameters include one or more of a hash value of the first data file, attribute information of the first data file, service information of the first data file, a timestamp of the first data file, and signature data of the first data file.

[0325] In an optional embodiment, the second ledger data is associated with a second data file, and the one or more verification input parameters include one or more of a hash value of the second data file, service information of the second data file, a timestamp of the second data file, and signature data of the second data file.

[0326] In an alternative embodiment, the client device is associated with an additional blockchain that is different from the blockchain.

[0327] The systems, devices, modules or units shown in the foregoing embodiments may be implemented by using a computer chip or entity, or may be implemented by using a product with a specific function. A typical embodiment device is a computer, which 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 receiving and sending device, a game console, a tablet computer, a wearable device or any combination of these devices.

[0328] For the implementation process of the functions and effects of each module in the device, reference may be made to the implementation process of the corresponding steps in the aforementioned method. For simplicity, the details are omitted here.

[0329] Since the device embodiment corresponds substantially to the method embodiment, for the relevant components, reference may be made to the relevant description in the method embodiment. The device embodiments described previously are examples only. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, may be located in one location, or may be distributed on multiple network modules. Some or all modules may be selected based on actual needs to achieve the goals of the solutions herein. Those of ordinary skill in the art can understand and implement the embodiments of the present application without having to make creative efforts.

[0330] See again Fig.26 , which can be interpreted as showing the internal functional modules and structure of the blockchain data recording and verification device. The blockchain data recording and verification device can be an example of a computer system configured to record and verify ledger data in a trusted system based on blockchain. In essence, the execution subject can be an electronic device, which includes the following: one or more processors; one or more computer-readable memories configured to store executable instructions of one or more processors. In some embodiments, the one or more computer-readable memories are coupled to the one or more processors and the one or more computer-readable memories have programming instructions stored thereon, which can be executed by the one or more processors to execute the algorithms, methods, functions, processes, processes and programs described herein. One or more non-transitory computer-readable storage media coupled to one or more processors and having instructions stored thereon are also provided herein, and when the instructions are executed by the one or more processors, the instructions will cause the one or more processors to perform operations in accordance with the embodiments of the method provided herein.

[0331] The present invention also provides a system for implementing the method provided herein. The system includes one or more processors, and a computer-readable storage medium coupled to the one or more processors and having instructions stored thereon, which, when executed by the one or more processors, causes the one or more processors to perform operations according to the method embodiments provided herein.

[0332] The embodiments of the subject matter, actions, and operations described herein may be implemented in digital electronic circuits, tangibly implemented computer software or firmware, computer hardware, including the structures disclosed herein and their structural equivalents, or a combination of one or more thereof. The embodiments of the subject matter described herein may be implemented as one or more computer programs, for example, modules of one or more computer program instructions, which are encoded on a computer program carrier for execution by a data processing device or for controlling the operation of a data processing device. For example, a computer program carrier may include one or more computer-readable storage media on which instructions are encoded or stored. The carrier may be a tangible, non-transitory computer-readable medium, for example, a magnetic disk, a magneto-optical disk or an optical disk, a solid-state drive, a random access memory (RAM), a read-only memory (ROM), or other media types. Alternatively or additionally, the carrier may be an artificially generated propagation signal, for example, a machine-generated electrical signal, an optical signal, or an electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device. The computer storage medium may be or partly be a machine-readable storage device, a machine-readable storage substrate, a random or serial access storage device, or a combination of one or more thereof. The computer storage medium is not a propagation signal.

[0333] A computer program may be referred to or described as a program, software, software application, app, module, software module, engine, script or code, and may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; which may be deployed in any form, including as a stand-alone program or as a module, component, engine, subroutine or other unit suitable for execution in a computing environment, which environment may include one or more computers interconnected by a data communications network in one or more locations.

[0334] A computer program may, but need not, correspond to a file in a file system. A computer program may be stored in: a portion of a file that holds other programs or data, such as one or more scripts in a markup language document; a single file dedicated to the program in question; or multiple coordinated files, such as a file that stores one or more modules, subroutines, or code portions.

[0335] Processors for executing computer programs include, for example, general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Typically, the processor will receive instructions and data for executing the computer program from a non-transitory computer readable medium coupled to the processor.

[0336] The term "data processing apparatus" covers all types of apparatus, devices and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. The data processing apparatus may include special-purpose logic circuits such as an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit) or a GPU (graphics processing unit). In addition to the hardware, the apparatus may also include code that creates an execution environment for a computer program, for example, code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0337] The processes and logic flows described herein can be performed by one or more computers or processors executing one or more computer programs to perform operations by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuits, such as FPGAs, ASICs, or GPUs, or by a combination of special purpose logic circuits and one or more programmed computers.

[0338] Computers suitable for executing computer programs may be based on general and / or special purpose microprocessors, or any other kind of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. Elements of a computer may include a central processing unit for executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory may be supplemented with or integrated in a special purpose logic circuit.

[0339] Typically, a computer will also include or be operably coupled to receive data from or transfer data to one or more storage devices. The storage device may be, for example, a magnetic disk, a magneto-optical disk or an optical disk, a solid-state drive, or any other type of non-transient computer-readable medium. However, a computer may not necessarily have such a device. Thus, a computer may be coupled to one or more storage devices, such as one or more memories located locally and / or remotely. For example, a computer may include one or more local memories as computer-integrated components, or a computer may be coupled to one or more remote memories located in a cloud network. In addition, a computer may also be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name just a few.

[0340] Components may be "coupled" to one another by being connected to one another for communication, either directly or via one or more intermediate components, such as electrical or optical connections. Components may also be "coupled" to one another if one of the components is integrated into another component. For example, a memory component (e.g., an L2 cache component) integrated into a processor is "coupled to" the processor.

[0341] To provide interaction with a user, embodiments of the subject matter described herein may be implemented on or configured to communicate with a computer having a display device, such as an LCD (liquid crystal display) monitor, for displaying information to a user, and an input device, such as a keyboard and a pointer device, such as a mouse, trackball, or touchpad. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and any form of input from the user may be received, including sound, voice, or tactile input. In addition, a computer may interact with a user by sending documents to and receiving documents from a device used by the user; for example, by sending a web page to a web browser on a user's device in response to a request received from the web browser, or by interacting with an application (app) running on a user's device, such as a smart phone or electronic tablet. A computer may also interact with a user by sending text messages or other forms of messages to a personal device, such as a smart phone running a messaging program, and receiving a response message from the user.

[0342] The term "configured to" is used herein with respect to systems, devices, and computer program components. For a system of one or more computers configured to perform a particular operation or action, it means that the system has installed thereon software, firmware, hardware, or a combination thereof that causes the system to perform the operation or action in operation. For one or more computer programs configured to perform a particular operation or action, it means that the one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action. For a dedicated logic circuit configured to perform a particular operation or action, it means that the circuit has electronic logic to perform the operation or action.

[0343] Although many specific implementation details are included herein, these should not be understood as limitations on the scope of the protection claimed, but rather as descriptions of features specific to a particular embodiment, the scope of the protection claimed is defined by the claims themselves. Certain features described herein in the context of separate embodiments may also be implemented in combination in a single embodiment. On the contrary, the various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination. Moreover, although the features described above may work in certain combinations and were even initially claimed, in some cases, one or more features in the combination may be deleted from the combination claimed, and the claims may also be directed to sub-combinations or variations of sub-combinations.

[0344] Similarly, although operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in sequence, or that all of the operations shown be performed, in order to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged into multiple software products.

[0345] Specific embodiments of the subject matter have been described. Other embodiments are also within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve the desired results. As an example, the processing depicted in the accompanying drawings does not require the specific order or sequence shown to achieve the desired results. In some cases, multi-tasking parallel processing may be advantageous.

Claims

1. A computer-implemented method for recording ledger data on a blockchain, performed by a blockchain-based trusted platform, the computer-implemented method comprising: Receiving first ledger data to be recorded on the blockchain from a client device via a record input interface; determining whether original ledger data associated with the first ledger data satisfies a recording rule, wherein the recording rule includes one or more recording input parameters associated with the recording input interface; In response to determining that the original ledger data associated with the first ledger data satisfies the recording rule, recording the original ledger data on the blockchain; generating a record receipt associated with the first ledger data; and sending the record receipt to the client device via a record output interface; Also includes: Receiving second ledger data from the client device via a verification input interface; Determining whether the second ledger data satisfies a validation rule, wherein the validation rule includes one or more validation input parameters associated with the validation input interface; In response to determining that the second ledger data satisfies the validation rule, determining whether the second ledger data corresponds to the original ledger data recorded on the blockchain; In response to determining that the second ledger data corresponds to the original ledger data recorded on the blockchain, generating a verification receipt associated with the second ledger data, wherein the verification receipt indicates that the original data associated with the second ledger data has not been tampered with; and The verification receipt is sent to the client device via a verification output interface.

2. The computer-implemented method of claim 1 , wherein: Determining whether the second ledger data corresponds to the original ledger data includes: determining whether a first hash value included in the original ledger data matches a second hash value included in the second ledger data.

3. The computer-implemented method of claim 1 , wherein: The first ledger data includes a bit stream. Before receiving the first ledger data, the client device converts the original ledger data into the bit stream based on a conversion rule. The computer-implemented method further includes: The bit stream is converted based on the conversion rule to obtain the original ledger data.

4. The computer-implemented method of claim 3, wherein: The conversion rule includes at least one of the following: an encoding scheme corresponding to each of the one or more recorded input parameters; or The one or more recorded input parameters are arranged in an order in the bitstream.

5. The computer-implemented method of claim 1 , further comprising: Calling a trusted time module to generate a first record timestamp indicating a time when the first ledger data is received; invoking a trusted identity module to verify an identity of a user associated with the client device; Calling the trusted time module to generate a second record timestamp indicating the time when the original ledger data is recorded on the blockchain; as well as A trusted computing module is called to generate a blockchain transaction, wherein the blockchain transaction includes the original ledger data, the user identity, the first record timestamp, and the second record timestamp.

6. The computer-implemented method of claim 1 , further comprising: Before receiving the first ledger data, a secure communication channel is established with the client device based on at least one of a two-way Transport Layer Security (TLS) protocol, a two-way Hypertext Transfer Protocol Security (HTTPS) protocol, or a one-way HTTPS protocol.

7. The computer-implemented method of claim 1 , wherein: The first ledger data is associated with a first data file, and the one or more record input parameters include one or more of a hash value of the first data file, attribute information of the first data file, service information of the first data file, a timestamp of the first data file, and signature data of the first data file.

8. The computer-implemented method of claim 1 , wherein: The second ledger data is associated with a second data file, and the one or more verification input parameters include one or more of a hash value of the second data file, service information of the second data file, a timestamp of the second data file, and signature data of the second data file.

9. A computer-implemented method according to any one of the preceding claims, wherein: The client device is associated with an additional blockchain that is different than the blockchain.

10. A computer-implemented system for recording ledger data on a blockchain, comprising: at least one processor; as well as A non-transitory computer-readable storage medium coupled to the at least one processor and storing programming instructions executed by the at least one processor, the programming instructions instructing the at least one processor to perform operations, the operations comprising: Perform data recording functions to record ledger data on the blockchain; Performing data verification functions to verify the ledger data recorded on the blockchain; Invoking a trusted service layer to provide trusted computing for performing the data recording function and the data verification function; and Calling a blockchain layer to interface the data recording function with the blockchain, wherein the blockchain layer includes a record input interface and a record output interface, and the data recording function is configured to: receiving first ledger data to be recorded on the blockchain from a client device via the record input interface; determining whether original ledger data associated with the first ledger data satisfies a recording rule, wherein the recording rule includes one or more recording input parameters associated with the recording input interface; In response to determining that the original ledger data associated with the first ledger data satisfies the recording rule, recording the original ledger data on the blockchain; generating a record receipt associated with the first ledger data; and sending the record receipt to the client device via the record output interface; Wherein, the blockchain layer includes a verification input interface and a verification output interface, and the data verification function is configured as follows: receiving second ledger data from the client device via the verification input interface; Determining whether the second ledger data satisfies a validation rule, wherein the validation rule includes one or more validation input parameters associated with the validation input interface; In response to determining that the second ledger data satisfies the validation rule, determining whether the second ledger data corresponds to the original ledger data recorded on the blockchain; In response to determining that the second ledger data corresponds to the original ledger data recorded on the blockchain, generating a verification receipt associated with the second ledger data, wherein the verification receipt indicates that the original data associated with the second ledger data has not been tampered with; and The verification receipt is sent to the client device via the verification output interface.

11. The computer-implemented system of claim 10, wherein: Determining whether the second ledger data corresponds to the original ledger data includes: determining whether a first hash value included in the original ledger data matches a second hash value included in the second ledger data.

12. The computer-implemented system of claim 10, wherein: The first ledger data includes a bit stream. Before receiving the first ledger data, the client device converts the original ledger data into the bit stream based on a conversion rule. The data recording function is further configured to: The bit stream is converted based on the conversion rule to obtain the original ledger data.

13. The computer-implemented system of claim 12, wherein: The conversion rule includes at least one of the following: an encoding scheme corresponding to each of the one or more recorded input parameters; or The one or more recorded input parameters are arranged in an order in the bitstream.

14. The computer-implemented system of claim 10, wherein: The trusted service layer includes a trusted time module, a trusted identity module and a trusted computing module, and the data recording function is further configured as follows: Calling the trusted time module to generate a first record timestamp indicating the time when the first ledger data is received through the data recording function; invoking the trusted identity module to verify an identity of a user associated with the client device; Calling the trusted time module to generate a second record timestamp indicating the time when the original ledger data is recorded on the blockchain; as well as The trusted computing module is called to generate a blockchain transaction, wherein the blockchain transaction includes the original ledger data, the user identity, the first record timestamp, and the second record timestamp.

15. The computer-implemented system of claim 10, wherein: The data logging function is also configured to: Before receiving the first ledger data, a secure communication channel is established with the client device based on at least one of a two-way Transport Layer Security (TLS) protocol, a two-way Hypertext Transfer Protocol Security (HTTPS) protocol, or a one-way HTTPS protocol.

16. The computer-implemented system of claim 10, wherein: The first ledger data is associated with a first data file, and the one or more record input parameters include one or more of a hash value of the first data file, attribute information of the first data file, service information of the first data file, a timestamp of the first data file, and signature data of the first data file.

17. The computer-implemented system of claim 10, wherein: The second ledger data is associated with a second data file, and the one or more verification input parameters include one or more of a hash value of the second data file, service information of the second data file, a timestamp of the second data file, and signature data of the second data file.

18. The computer-implemented system of any one of claims 10 to 17, wherein: The client device is associated with an additional blockchain that is different than the blockchain.