Distributed storage of customs clearance data

By storing encrypted customs clearance data on the blockchain network and using smart contracts and consensus algorithms, the problems of data transparency and security in the existing system are solved, and an efficient and trustworthy customs clearance process is achieved.

CN111936995BActive Publication Date: 2024-12-20ANTCHAIN TECHNOLOGY PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080001979.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-08
Publication Date
2024-12-20
Estimated Expiration
2040-06-08

AI Technical Summary

Technical Problem

Existing customs clearance systems are difficult to provide transparent, tamper-free, consistent and verifiable data, resulting in high regulatory costs and fraud risks, especially during international customs clearance processes.

Method used

Blockchain technology is adopted to ensure the transparency and immutability of data by storing encrypted customs clearance data on the blockchain network, and using smart contracts and consensus algorithms, while providing encryption key management and data privacy protection.

Benefits of technology

It realizes transparent, tamper-proof and consistent customs clearance data processing, reduces fraud risks and regulatory costs, ensures data security and privacy, and improves the efficiency and credibility of customs clearance processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111936995B_ABST
    Figure CN111936995B_ABST
Patent Text Reader

Abstract

Disclosed herein are methods, systems, and devices for data storage, including computer programs encoded on computer storage media. One of the methods includes: receiving data from a service platform for storage, wherein the data includes variable data, immutable data, and index data identified by the service platform; storing the variable data in a cache storage, wherein the variable data will be executed by a smart contract; initiating a consensus algorithm to record the immutable data on a blockchain; in response to successfully executing the consensus algorithm, recording the immutable data on the blockchain based on calling the smart contract, wherein the blockchain is stored in a database with a lower storage cost than the cache storage; and linking the variable data and the immutable data based on calling the smart contract and based on the index data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article deals with data storage based on blockchain technology. 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] Digital networks have made it possible for people around the world to find information and interact with each other easily and efficiently. For example, social media platforms allow people to easily share messages, photos, and videos with friends and colleagues. Online shopping sites allow consumers to easily find information about a wide range of products and send payments electronically to purchase products from businesses around the world. A variety of payment and delivery services make it easier for e-commerce providers and consumers to perform online and international transactions and shipments. As more people connect to the internet and conduct more digital and international transactions, customs clearance declarations for international orders have increased dramatically, and with them, fraudulent declarations that are difficult for customs agencies to detect and address.

[0004] Due to the randomness of customs clearance data provided by different sources, current customs clearance solutions may lead to high regulatory costs. Vulnerabilities in the system may allow some dishonest merchants, consumers, and customs clearance service providers to tamper with data individually or jointly to evade taxes. In addition, logistics data related to international transportation can be manipulated by some dishonest transportation data providers, and it is difficult for consumers to detect. In some cases, some dishonest merchants can create false international transportation data to sell locally manufactured counterfeit goods as imported goods. Finally, the data provided from different sources may be inconsistent, so when the amount of data is large, it will be difficult for customs agencies to process or review the data.

[0005] It is desirable to have a unified platform that can provide transparent, immutable, consistent and verifiable customs clearance data to facilitate the customs clearance process while ensuring data privacy and integrity of the users involved. Summary of the invention

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

[0007] For example, in one embodiment, a computer-implemented method performed by a computing system associated with a customs clearance service includes: at a service platform, receiving first information related to an order, wherein the first information is provided or to be provided to a service agency to request customs clearance for goods included in the order; at the service platform, encrypting at least a portion of the first information to generate encrypted first data; and sending the encrypted first data to a blockchain network to store the encrypted first data on a blockchain managed by the blockchain network, wherein the encrypted first data is stored on the blockchain through the consensus of blockchain nodes of the blockchain network.

[0008] As another example, in one embodiment, a system for processing customs clearance data includes a service platform. The service platform includes: multiple service modules and an application programming interface (API) layer, the API layer including multiple APIs to enable users to call service modules to process data related to orders associated with the import of goods, wherein the data includes information provided or to be provided to a service agency to request customs clearance of goods in the order, and a rule database, the rule database including information related to rules for processing data in multiple countries; wherein, at the service platform, upon receiving first customs clearance data for a first order associated with importing goods into a first country, the service module processes the first customs clearance data based on information in the rule database that complies with the rules of the first country, and, at the service platform, upon receiving second customs clearance data for a second order associated with importing goods into a second country different from the first country, the service module processes the second customs clearance data based on information in the rule database that complies with the rules of the second country.

[0009] As another example, in one embodiment, a system for processing customs clearance data includes a customs clearance platform, which includes: multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to process customs clearance data related to orders associated with commodity purchases, and a rule database, the rule database including information about rules for processing customs clearance data, the information including rules specifying fees or donation amounts to be charged for specified commodity categories; wherein, at the customs clearance platform, the service module is configured to, upon receiving customs clearance data associated with an order, store at least a portion of the customs clearance data in a blockchain or smart contract data cache, and process the customs clearance data based on the information in the rule database to determine the fees or donation amounts to be charged for the order.

[0010] As another example, in one embodiment, a computer-implemented method performed by a computing system associated with a customs clearance service includes: receiving, at a service platform, a first request to authorize a first member to access information related to a first order, wherein the information is provided to a service agency to request clearance for the first order, and the first request is sent from an administrator; calling a smart contract executed on a blockchain to request that the first member be added to a list of authorized members authorized to access information related to the first order, wherein the smart contract is configured to maintain a data structure storing information about authorized members, and the blockchain stores information related to the first order or a processed version of the information related to the first order; receiving a confirmation from the smart contract that the first member has been added to the list of authorized members; and sending a confirmation to the administrator that the first member has been added to the list of authorized members.

[0011] As another example, in one embodiment, a computer-implemented method performed by a computing system associated with a customs clearance service includes: receiving, at a service platform, a first request from a first user to record or update information related to a first order, wherein the information is provided or is to be provided to a service agency to request customs clearance for goods included in the first order; determining whether the first user is one of the authorized members authorized to record or update information related to the first order; and after confirming that the first user is an authorized member, recording or updating the information related to the first order according to the first request.

[0012] As another example, in one embodiment, a computer-implemented method for processing data is performed by a computing system, the system comprising: a service platform including multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to process information related to orders associated with the import of goods, wherein the information is provided or is to be provided to a service agency to request customs clearance for the goods associated with the order, and a first API of the multiple APIs enables a user of the service platform to call a smart contract on a blockchain managed by the blockchain network, which performs processing of the information and / or processing of information related to another user of the service platform.

[0013] As another example, in one embodiment, a system for processing data includes: a service platform including multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to process information related to orders associated with the import of goods, wherein the information is provided or is to be provided to a service agency to request customs clearance for the goods associated with the order, wherein a first API among the multiple APIs enables a user of the service platform to call a smart contract on a blockchain managed by a blockchain network, wherein the smart contract performs processing of the information and / or processing of information related to another user of the service platform.

[0014] As another example, in one embodiment, a system for processing data includes: a service platform including multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to generate a smart contract, which is configured to process information related to an order associated with the import of goods, wherein the information is provided or is to be provided to a service agency to request customs clearance for the goods associated with the order, wherein a first API among the multiple APIs enables a user of the service platform to call a smart contract generator including a customizable smart contract template, wherein the smart contract generator enables the user to generate a smart contract configured to process information.

[0015] As another example, in one embodiment, a system for processing data includes: a service platform including multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to process information related to orders associated with the import of goods, wherein the information is provided or is to be provided to a service agency to request customs clearance for the goods associated with the order, wherein a first API among the multiple APIs enables a user of the service platform to deploy a smart contract on a blockchain managed by a blockchain network, and the smart contract is configured to process information associated with the blockchain.

[0016] As another example, in one embodiment, a computer-implemented method includes: at a service platform, providing a first API, the first API being configured to register a specified smart contract on a blockchain managed by a specified blockchain network; receiving a first call to the first API from a first user to request registration of the first smart contract on a first blockchain managed by the first blockchain network; sending a request to register the first smart contract from the service platform to the first blockchain network; at the service platform, receiving a confirmation message from the first blockchain network that the first smart contract has been successfully registered on the first blockchain; and sending a confirmation message from the service platform to the first user that the first smart contract has been successfully registered on the first blockchain.

[0017] As another example, in one embodiment, a computer-implemented blockchain-based data storage method includes: receiving data from a service platform for storage, wherein the data includes variable data, immutable data, and index data identified by the service platform; storing the variable data in a cache storage, wherein the variable data will be executed by a smart contract; initiating a consensus algorithm to record the immutable data on a blockchain; in response to successfully executing the consensus algorithm, recording the immutable data on the blockchain based on calling a smart contract, wherein the blockchain is stored in a database having a lower storage cost than the cache storage; and linking the variable data and the immutable data based on calling the smart contract and based on the index data.

[0018] As another example, in one embodiment, a computer-implemented method for processing import customs clearance data with different data privacy levels based on blockchain technology includes: at a service platform, receiving an encryption key and data for customs clearance from a computing device associated with a user to store on a blockchain, wherein the data includes public data and private data, and the encryption key encrypts the private data; storing the encryption key and an identification (ID) of the data in a cache storage dedicated to storing smart contract data for executing smart contracts; and calling an API to enable a blockchain node to initiate a consensus algorithm to record the data and the ID of the data on the blockchain.

[0019] As another example, in one embodiment, a computer-implemented method performed by a computing device for storing data on a blockchain includes: determining that data stored in a cache storage satisfies a predetermined condition; adding a blockchain address of a second smart contract to a configuration file, wherein the configuration file includes multiple addresses corresponding to multiple smart contracts stored on the blockchain; and calling a virtual machine to execute the configuration file, wherein the execution of the configuration file initiates a consensus algorithm to generate a second smart contract at the blockchain address and generates a corresponding smart contract pool on the blockchain for storing at least a portion of the data, and the smart contract pool is a data structure to be stored on the blockchain.

[0020] 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 described herein is not limited to the combination of the various aspects and features specifically described herein, but also includes any combination of the various aspects and features provided.

[0021] 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 apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 2 is a diagram illustrating an example of an architecture according to embodiments of the present invention.

[0024] Figure 3 A diagram showing an example of services provided by a customs clearance service platform according to an embodiment of this document.

[0025] Figure 4 The flowchart shows an example of the internal system of the customs clearance service platform according to the embodiment of this document.

[0026] Figure 5 is a swim lane diagram illustrating an example of a process for processing customs clearance data according to an embodiment of the present invention.

[0027] Figure 6 FIG. 5 is a relationship diagram illustrating an example of a relationship between sub-models of a computer-implemented model according to an embodiment of the present invention.

[0028] Figure 7 is a diagram showing an example of a state progression according to an embodiment of the present invention.

[0029] Figure 8 A diagram showing an example of storing customs clearance data in a smart contract pool according to an embodiment of the present invention.

[0030] Fig. 9 A system for implementing a blockchain-based customs clearance service platform according to an embodiment of the present invention to enable secure and efficient processing of customs clearance documents is shown.

[0031] Fig.10 is a flow chart of an example of a process according to an embodiment of the present invention.

[0032] Fig.11 is a diagram of an example of modules of an apparatus according to an embodiment of the present invention.

[0033] Fig.12 is a flowchart of another example of a process according to embodiments of the present invention.

[0034] Fig.13 is a diagram of another example of a module of a device according to an embodiment of this document.

[0035] Fig.14 is a flowchart of yet another example of a process according to embodiments of the present invention.

[0036] Fig.15 is a diagram of yet another example of a module of a device according to an embodiment of this document.

[0037] Fig.16 is a flowchart of yet another example of a process according to embodiments of the present invention.

[0038] Fig.17 is a diagram of yet another example of a module of a device according to an embodiment of this document.

[0039] Fig.18 is a flowchart of yet another example of a process according to embodiments of the present invention.

[0040] Fig.19 is a diagram of yet another example of a module of a device according to an embodiment of this document.

[0041] Fig. 20 is a flowchart illustrating yet another example of a process according to an embodiment of the present invention.

[0042] Fig.21 is a diagram of yet another example of a module of a device according to an embodiment of this document.

[0043] Fig. 22 A diagram showing an example of a customs clearance service platform according to an embodiment of this document.

[0044] Fig.23 A diagram showing an example of a customs clearance platform according to an embodiment of this document.

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

[0046] The present invention describes technologies related to a blockchain-based document registry for customs clearance services. These technologies generally involve, for example, receiving first information related to an order at a service platform, wherein the first information is provided or is to be provided to a service agency to request customs clearance of goods included in the order; encrypting at least a portion of the first information at the service platform to generate encrypted first data; and sending the encrypted first data to a blockchain network to store the encrypted first data on a blockchain managed by the blockchain network, wherein the encrypted first data is stored on the blockchain through consensus of blockchain nodes of the blockchain network.

[0047] The present invention also describes techniques for managing members authorized to access customs clearance data. These techniques generally involve, for example, receiving, at a service platform, a first request to authorize a first member to access information related to a first order, wherein the information is provided to a service agency to request customs clearance for the first order, and the first request is sent from an administrator; calling a smart contract executed on a blockchain to request that the first member be added to a list of authorized members authorized to access information related to the first order, wherein the smart contract is configured to maintain a data structure storing information about the authorized members, and the blockchain stores information related to the first order or a processed version of the information related to the first order; receiving a confirmation from the smart contract that the first member has been added to the list of authorized members; and sending a confirmation to the administrator that the first member has been added to the list of authorized members.

[0048] The present invention also describes techniques for processing data. These techniques generally relate to: a service platform, the service platform including multiple service modules and an API layer, the API layer including multiple APIs to enable users to call the service modules to process information related to an order associated with the import of goods, wherein the information is provided or is to be provided to a service agency to request customs clearance for the goods associated with the order, and a first API of the multiple APIs enables a user of the service platform to call a smart contract on a blockchain managed by a blockchain network, the smart contract performing processing of the information and / or processing of information related to another user of the service platform.

[0049] The present invention also describes technologies for blockchain-based data storage executed by blockchain nodes. These technologies generally involve: receiving data from a service platform for storage, wherein the data includes variable data, immutable data, and index data identified by the service platform; storing the variable data in a cache storage, wherein the variable data is to be executed by a smart contract; initiating a consensus algorithm to record the immutable data on the blockchain; in response to successfully executing the consensus algorithm, recording the immutable data on the blockchain based on calling the smart contract, wherein the blockchain is stored in a database with a lower storage cost than the cache storage; and linking the variable data and the immutable data based on calling the smart contract and based on the index data.

[0050] The present invention also describes techniques for processing import customs clearance data with different data privacy levels. These techniques generally involve: receiving, at a service platform, an encryption key and data for customs clearance from a computing device associated with a user to store on a blockchain, wherein the data includes public data and private data, and the encryption key encrypts the private data; storing the encryption key and an identification (ID) of the data in a cache storage dedicated to storing smart contract data for executing smart contracts; and calling an API to enable a blockchain node to initiate a consensus algorithm to record the data and the ID of the data on the blockchain.

[0051] The present invention also describes techniques performed by a computing device for storing data on a blockchain. The techniques generally involve: determining that data stored in a cache storage satisfies a predetermined condition; adding a blockchain address of a second smart contract to a configuration file, wherein the configuration file includes a plurality of addresses corresponding to a plurality of smart contracts stored on the blockchain; and invoking a virtual machine to execute the configuration file, wherein execution of the configuration file initiates a consensus algorithm to generate a second smart contract at the blockchain address and generates a corresponding smart contract pool on the blockchain for storing at least a portion of the data, and the smart contract pool is a data structure to be stored on the blockchain.

[0052] This article describes a system that can be used by customs agencies to process import customs clearance data related to individual imports. Hereinafter, the system will be referred to as the "Customs Clearance System", "Customs Clearance Service Platform" or simply the "Service Platform". Below is a brief description of the import customs clearance process. Different countries have different regulations to govern the import customs clearance process. The examples described in this article are based on general import customs clearance procedures that are common to many countries. It will be understood that the techniques described in this article can be modified based on the specific customs clearance requirements of each country and thus applied to the import customs clearance process of any country in the world.

[0053] Typically, the import customs clearance process may involve submitting import documents, such as a purchase order from the buyer, a sales invoice from the supplier, a bill of lading, a bill of lading or an air waybill, a packing list, a certificate of origin, and any other specific documents required by the buyer, financial institution, or regulations of the importing country. The import customs clearance process also involves customs inspection, assessment of the goods to be imported, payment of customs duties, and collection of the goods from customs after the customs agency (agency or authority) clears the goods. The examples described in this article mainly involve processing import customs clearance data related to personal imported goods. The technology described in this article can also be applied to process import customs clearance data related to commercial entities' imported goods with modifications based on relevant regulations.

[0054] When a buyer who lives in a certain country purchases a product from a seller outside that country, the buyer (or the buyer's agent) needs to submit identification documents for customs clearance. A customs clearance service platform can act as a hub to collect import documents required for customs clearance. After the documents are collected and submitted to customs, customs officials can first review the shipping documents. A commercial invoice is required for international shipments. The shipping document can list the contact information of the shipper and the buyer, as well as shipping details such as the export date and airway bill number. Moreover, the invoice can include a description of the items and their total value.

[0055] Customs officials can then check to see if any taxes and duties should be levied on the shipment. This will depend on the type of goods, their value, and the laws of the country of importation. If it is determined that the value of the goods is above the tax threshold, the officials will then check to see if those taxes and duties have been paid. If the buyer did not pay the taxes and duties when they placed their order, customs will require them to pay them. After confirming that the outstanding taxes and duties have been paid, the shipment can be released and continue to its final destination.

[0056] The technology described in this article produces several technical effects. In some embodiments, the entire life cycle of customs clearance data such as order data, logistics data, and payment data can be recorded on the blockchain. For example, the blockchain can store an unalterable and transparent record chain that links the order data, logistics data, and payment data associated with the same order. Since the records on the blockchain are recorded through the consensus of the blockchain nodes, they can be easily verified and trusted by all parties with access to the blockchain. Compared with point-to-point communication, the use of blockchain technology improves data processing efficiency when customs clearance data is generated by different parties.

[0057] In some embodiments, customs clearance data may be time-sensitive. For example, disputes may arise over the time of placing an order, shipping, or payment, especially when international transactions involve parties or service providers located in different time zones. The disclosed technology is particularly suitable for providing trusted time for order data, logistics data, and payment data that may be out of sync, thereby avoiding potential disputes caused by time differences.

[0058] In some countries, customs laws and regulations allow individuals to import products duty-free if certain criteria are met, such as if the quantity and value of the products in a given order is less than a certain threshold. Dishonest individuals may attempt to evade import taxes by splitting an order (whose quantity and / or value of products do not qualify for duty-free status) into multiple smaller orders for multiple fictitious individuals, such that the quantity and / or value of the products in each smaller order is reduced to below the threshold and eligible for duty-free status. The techniques described in this article provide a solution to prevent individuals from evading import taxes through this loophole.

[0059] In some embodiments, a unique ID associated with a taxpayer can be embedded in the customs clearance data recorded on the blockchain. In this way, the taxpayer's identity can be verified and trusted. The unique ID can also be used to track all customs clearance data associated with the taxpayer to ensure that they do not fraudulently split orders to multiple buyers for the purpose of tax evasion.

[0060] In some embodiments, the customs clearance data to be recorded on the blockchain can be encrypted. Encryption keys can be generated and shared among the participants involved in the customs clearance process. The service platform can also provide zero-knowledge proofs (ZKP) to the consensus nodes of the blockchain network. The consensus nodes can use zero-knowledge proofs to verify whether the data belongs to a valid order (for example, whether the order value is within a specific reasonable range) without knowing the actual data. The consensus node performs consensus only after successfully verifying the zero-knowledge proof. In this way, the privacy and security of the data recorded on the blockchain can be ensured.

[0061] In some embodiments, the data privacy of the data can be further protected based on the use of trusted execution environment (TEE) technology. The trusted execution environment is an isolated and trusted computing environment that can be integrated into the blockchain node of the blockchain network. The trusted execution environment processes the plaintext of the customs clearance data and outputs the ciphertext of the data. Using the trusted execution environment technology, data can be easily updated inside the trusted execution environment without revealing the actual update. In addition, the output of the trusted execution environment is encrypted and trusted by all blockchain nodes in the blockchain network, so it can be effectively stored in the blockchain after the blockchain nodes reach a consensus.

[0062] This document describes a scalable system for processing customs clearance data processed by one or more customs agencies, which can be responsible for processing data related to the import of goods through, for example, a port, a city, a state or province, an entire country, or a region including multiple countries. As customs clearance data accumulates, the amount of data may be large, thereby increasing storage costs. In some embodiments, customs clearance data on the blockchain can be stored in a smart contract data cache or a blockchain database. The smart contract data cache can be a storage medium with a faster read and write speed but a higher storage cost. The blockchain database can be a storage medium with a slower read and write speed but a lower storage cost. The smart contract data cache can be used to store variable data in the form of smart contract data, while the blockchain database can be used to store incremental, immutable, permanent blockchain data. In this way, a better balance can be achieved between the processing efficiency and storage cost of blockchain data.

[0063] As smart contract data accumulates, storing them all in a high-cost storage medium such as a cache may be cost-prohibitive. In some embodiments, smart contract data can be stored in a so-called smart contract pool on the blockchain. A smart contract pool is a data structure (e.g., a Merkle Patricia tree) stored as a transaction on the blockchain. Each smart contract can correspond to a dedicated smart contract pool. The smart contract data cache can store frequently used variable customs clearance data to be executed by the smart contract, and the smart contract pool can be created on the blockchain to store immutable data and programming instructions corresponding to the smart contract. The blockchain node can call a virtual machine to retrieve programming instructions and / or other immutable data from the blockchain to execute the smart contract and store the output, event log, and update back to the smart contract pool. Multiple smart contracts can be created to store data to multiple smart contract pools. The smart contract pool can be easily expanded by adding new smart contracts to provide more flexible customs clearance data storage and reduce storage costs by transferring data from the cache to database storage.

[0064] In some embodiments, the blockchain may store only hash values ​​of some infrequently used customs clearance data to further save storage space. When the data needs to be verified by the customs agency, the customs clearance system or service platform (e.g., 504) can use the hash value to retrieve the corresponding customs clearance data from the data source. For example, if the customs agency needs to retrieve order data associated with an order, the customs clearance service platform 504 can send the corresponding hash value to the e-commerce platform (EBP) that owns the order data. Based on the hash value, the EBP can send the order data back to the customs clearance service platform 504 for delivery to the customs.

[0065] To provide further context 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 is used herein to refer generally to a DLS without reference to any specific use case.

[0066] Blockchain is a data structure that stores transactions in an immutable way. 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 the 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 compiled 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 concatenated at the root of the branch. This process continues 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.

[0067] 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 herein are further described in detail with reference to a consortium blockchain network. However, it is contemplated that the embodiments herein may be implemented in any suitable type of blockchain network.

[0068] Typically, a consortium blockchain network is private among participating entities. In a consortium blockchain network, the consensus process is controlled by an authorized set of nodes, which may be referred to as consensus nodes, and one or more consensus nodes are operated by the corresponding 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.

[0069] 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 full consensus with respect to 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.

[0070] 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 110 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 via a wired and / or wireless communication link. In some examples, the network 110 enables communication with the consortium blockchain network 102 and communication within the consortium blockchain network 102. Typically, 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.

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

[0072] Figure 2An example of an architecture 200 according to an embodiment of the present invention is shown. 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 immutably 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.

[0073] 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 functions as a respective node 214 in the blockchain network. As used herein, a node generally refers to an individual system (e.g., computer, 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).

[0074] 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 (e.g., as mining nodes that add blocks to the blockchain 216), while other nodes 214 do not participate in this consensus process. As another example, some nodes 214 store a complete copy of the blockchain 216, while other nodes 214 store only a copy of a portion of the blockchain 216. For example, data access privileges may limit the blockchain data that a respective participant stores within their respective system. Figure 2 In the example of FIG. 2 , participant systems 202 , 204 , and 206 store complete copies 216 ′, 216 ″, and 216 ′″ of blockchain 216 , respectively.

[0075] 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, video, audio). Examples of transactions may include, but are not limited to, the exchange of valuables (e.g., assets, products, services, currency). Transaction data is immutably stored in the blockchain. That is, the transaction data cannot be changed.

[0076] 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 slight 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, which outputs a 256-bit hash value.

[0077] 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 known as the Merkle root hash and is stored in the block header. Changes in any transaction will cause its hash to change and ultimately the Merkle root hash to change.

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

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

[0080] 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. The primary consensus node is changed periodically, and transactions are added to the blockchain by all consensus nodes within the blockchain network reaching a consensus on the global state of the blockchain network. In this process, messages are transmitted between consensus nodes, and each consensus node proves that the message is received from a designated peer node and verifies that the message has not been tampered with during the transaction.

[0081] 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 order in which records will be added to the blockchain, and the record is either accepted or rejected.

[0082] In some blockchain networks, cryptography is used 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 to both encrypt (generate ciphertext from plaintext) and decrypt (generate plaintext from ciphertext). In symmetric encryption, the same key can be used for multiple nodes, so each node can encrypt / decrypt the transaction data.

[0083] 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 use participant B's public key to encrypt data and send the encrypted data to participant B. Participant B can use its private key to decrypt the encrypted data (ciphertext) and extract the original data (plaintext). Messages encrypted using a node's public key can only be decrypted using the node's private key.

[0084] Asymmetric encryption is used to provide digital signatures, which enables 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.

[0085] 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 hardware's operating environment (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 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 to the processor and memory. Through the TEE, the TA can be protected from attacks by other applications running in the main OS. In addition, the TEE cryptographically isolates the TA from each other within the TEE.

[0086] Examples of TEEs include 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 TEE may be used to implement embodiments herein.

[0087] SGX provides a hardware-based TEE. 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 basic input / output system level and cannot be accessed by any software. Each EPC is a storage set (e.g., 4KB) allocated by the OS to load application data and code in the PRM. 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 EPCs, and the EPC is dedicated to a single enclave.

[0088] During the execution of TA, the processor runs in the so-called enclave mode when accessing data stored in the enclave. Operation in enclave mode performs additional hardware checks on each memory access. In 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, TA 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 TA continues to execute.

[0089] An attestation process may be performed to verify that an expected node (e.g., a trusted portion of a trusted application) is securely executing within the trusted execution environment provided by SGX. Typically, an attestation process includes a 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 reference. Generating a remote attestation includes a local attestation being sent from the enclave to a so-called reference enclave, which verifies the local attestation, and converts the local attestation to a remote attestation by signing the local attestation with an asymmetric attestation key. The remote attestation (reference) is provided to the challenger (e.g., a key management system of the blockchain network).

[0090] The challenger uses the authentication verification service to verify the remote authentication. For SGX, Intel provides the Intel Attestation Service (IAS), which receives the remote authentication from the challenger and verifies the remote authentication. More specifically, IAS processes the remote authentication and provides a report (e.g., an authentication verification report (AVR)) indicating whether the remote authentication is verified. If not verified, an error may be indicated. If verified (the expected code is securely executed in a 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 an asymmetric encryption key (e.g., a public key and a private key pair) to a node executing a trusted execution environment (e.g., after key exchange processing, such as elliptic curve Diffie-Hellman (ECDH)) to enable the node to communicate securely with other nodes and / or clients. Additional details of the trusted execution environment technology are described in, for example, PCT application PCT / CN2019 / 081180 filed on April 3, 2019, the contents of which are incorporated herein by reference.

[0091] Figure 3 332 according to an embodiment of the present invention. The service platform is used to provide an application programming interface (API) for data services to various participants in the customs clearance process. The data service is based on blockchain technology implemented on a consortium blockchain network. The consortium blockchain network may include nodes owned by one or more of the following: a service platform 332, an enterprise user 314 (e.g., an e-commerce platform (EBP)), a data provider 316 (customs clearance agent platform), a customs 318, a payment service provider, a delivery service company, and / or an individual user. By using the customs clearance service platform to interact with the data in the blockchain of the consortium blockchain network, the efficiency and transparency of the customs clearance process can be ensured.

[0092] As used herein, the term “customs clearance agent platform” means a platform (which may include a combination of hardware and software) provided or managed by a customs clearance agent or broker that prepares and submits documents on behalf of a buyer for obtaining customs clearance from a customs agency. Figure 3 332) refers to a platform (which may include a combination of hardware and software) that uses the innovative techniques described in this article.

[0093] The function 302 of the customs clearance service platform 332 can be called by the system administrator through the administrator port 304. The function called by the system administrator may include one or more of the following: adding a new user 306 with permission to use the customs clearance service platform 332, removing a user 308, setting permission levels 310 based on different user types, or updating a user list 312.

[0094] The user may be the owner of a blockchain node of a consortium blockchain network associated with blockchain 362, or the parties involved in a transaction that generates or is associated with customs clearance data. User types may include one or more of a customs clearance service platform user, a business owner, a customs clearance agent platform, a delivery service company, a payment service company, customs, and a customs clearance service platform system administrator. The following table (Table 1) lists some exemplary attributes under the user sub-model constructed by the customs clearance service platform 332.

[0095] Table 1

[0096]

[0097] Functions 302 of the customs clearance service platform 332 may also be invoked by participants in the customs clearance process including enterprise users 314, data providers 316, and customs agencies 318. These participants may perform functions including one or more of adding new documents 320, querying documents 322, verifying documents 324, updating documents 326, or linking documents 328. In some examples, the documents involved in the customs clearance process may include one or more of order documents, logistics documents, shipping tracking documents, or payment documents.

[0098] Part or all of the document may be encrypted by an encryption key to protect the privacy of the document owner. The document owner may determine which users may be allowed to access the plain text version of the document and request the system administrator to set the access rights of the document 310. In some embodiments, the document owner may also provide a list of users who are allowed to access the plain text version of the document in addition to the document owner himself.

[0099] In some examples, the encryption key used to encrypt the document can be a symmetric key. To set access rights 310 for a user, the system administrator can encrypt the symmetric key using the user's public key. The encrypted version of the symmetric key can be stored in a smart contract. A user who has access to the document can retrieve the encrypted version of the symmetric key from the smart contract and use their corresponding private key to decrypt the encrypted version of the symmetric key. After decrypting the symmetric key, the user can use it to decrypt the encrypted document.

[0100] The customs clearance service platform 332 includes an API layer 334, which includes multiple APIs that can be called by users to provide services associated with customs clearance. These APIs can be accessed from a computing device through a software application (APP). The API can interact with one or more services including customs clearance services 336, user control services 338, privacy and encryption services 340, distributed information storage (DIS) services 342, document lifecycle management services 344, or smart contract services 346.

[0101] Customs clearance service 336, user control service 338, and privacy and encryption service 340 are user-oriented, which means that these services are mainly provided for users or system administrators of the customs clearance service platform. DIS service 342, document lifecycle management service 344, and smart contract service 346 are blockchain-oriented, which means that these services are mainly provided for blockchain nodes of the consortium blockchain network.

[0102] Customs clearance services 336 may be provided to users to process different types of documents. User control services 338 may be provided to system administrators to perform access control on users of the customs clearance services platform 332. Privacy and encryption services 340 may be provided to system administrators and users to provide encryption services to allow different levels of document privacy control.

[0103] A DIS service 342 may be provided to selectively store customs clearance data in a smart contract data cache 364 or a persistent blockchain database 366. A document lifecycle management service 344 may be used to manage or update events associated with different types of documents, such as order receipt events, refund events, etc. A smart contract service 346 may be provided to perform functions related to smart contracts, such as creating and executing smart contracts, creating smart contract pools, etc.

[0104] In some embodiments, a notification service 348 can be provided to one or more blockchain nodes of the consortium blockchain network so that the blockchain node can notify the customs clearance service platform 332 and / or users about updates to document events 350 (e.g., new documents added, document status changed) and updates to user events 352 (e.g., new users added, user authority levels changed).

[0105] The data storage on the blockchain 362 may include smart contract data cache 364 storage and blockchain database 366 storage. Generally, a document may include both data that can be modified or updated and data that cannot be modified or does not need to be modified. Modifiable data may be referred to as variable data or dynamic data, which may be stored in the smart contract data cache 364. Unmodifiable data may be referred to as immutable data, which may be permanently stored on the blockchain in the blockchain database 366. In some embodiments, the customs clearance service platform 332 may determine the variable data and immutable data in the document. Figure 8 More details on customs clearance data storage are discussed in the description of .

[0106] Figure 4 4 is a flow chart showing an example of an internal system 400 of a customs clearance service platform 332 according to an embodiment of the present invention. At a high level, the internal system 400 of the customs clearance service platform may include an application or APP 402, a database 404, a key management system (KMS) 406, and a computing and connection component 408. In some embodiments, the internal system 400 may include fewer or more components. The internal system 400 is connected to a blockchain network 409 including multiple blockchain nodes (for illustration purposes, in Figure 4 Only blockchain node 410 and blockchain node 412 are shown, and it should be understood that blockchain network 409 may include many additional blockchain nodes).

[0107] APP 402 may be a software program for carrying an API of a service platform for providing data services associated with customs clearance. APP 402 may be an interface between a user of service platform 332 and an internal system 400 of service platform 332. For example, APP 402 may be used to receive input including user profile information, login information, customs clearance data, etc. In some embodiments, data related to customs clearance may be stored in database 404. Database 404 may include any memory or database module, and may take the form of volatile or non-volatile memory, including but not limited to magnetic media, optical media, random access memory (RAM), read-only memory (ROM), removable media, or any other suitable local or remote memory component. Database 404 may store various objects or data, including classes, frameworks, applications, backup data, business objects, tasks, web pages, web page templates, database tables, repositories for storing business or variable data, and any other suitable information including any parameters, variables, algorithms, instructions, rules, constraints, or references thereof associated with the purpose of APP 402 or internal system 400.

[0108] Exemplary data may include order data, logistics data, tracking data, payment data, templates, encryption keys, etc. In addition, database 404 may include any other appropriate data, such as VPN applications, firmware logs and policies, firewall policies, security or access logs, print or other report files, and other files. In some examples, APP 402 can retrieve data from database 404 via a database API.

[0109] APP 402 can communicate information related to customs clearance with computing and connection components 408. In some embodiments, computing and connection components 408 may include a trusted computing module 420, a trusted time module 422, and a trusted identity module 424. Trusted computing module 420 may include one or more processors that execute instructions provided by a software development kit (SDK). Exemplary instructions may include performing encryption, generating digital signatures and / or zero-knowledge proofs or other applicable proofs. In some embodiments, one or more data processors may have a TEE that is isolated from the operating system of one or more processors and configured to provide enhanced privacy and integrity for the code executed and the data loaded within one or more data processors.

[0110] In some embodiments, the trusted computing module 420 can be configured to record data associated with customs clearance in accordance with privacy laws. For example, the trusted computing module 420 can generate a hash value of the record (i.e., a transaction hash value) and add a block including the record and the hash value to a blockchain associated with the blockchain network 409. As previously described, a document can include variable data and immutable blockchain data stored in a smart contract data cache and a blockchain database, respectively. In some embodiments, for the same document or smart contract transaction, the transaction hash value of the variable data can be stored together with the corresponding immutable data under the same data structure on the blockchain, so that the variable data and the immutable data can be linked. Alternatively or additionally, the transaction hash value of the immutable data can be stored in the smart contract data cache together with the corresponding variable data, so that the immutable data and the variable data can be linked.

[0111] In some embodiments, the service platform 332 can add index data to the document to link the mutable data and the immutable data. The index data can be stored in the smart contract data cache and the blockchain database to associate the mutable data with the immutable data.

[0112] In some examples, the index data may include a document ID. The document ID may be stored in the smart contract data cache along with the variable data of the document. The document ID may also be stored on the blockchain in the blockchain database along with the immutable data of the document. In some examples, a document may be associated with multiple transactions. The index data may include a transaction hash of the transaction. The transaction hash may be stored in the smart contract cache along with the variable data associated with the transaction. The transaction hash may also be stored on the blockchain along with the immutable data associated with the transaction. In this way, when a document or a transaction associated with a document is queried, the variable data and the immutable data may be identified from the two storage locations.

[0113] In some embodiments, the trusted computing module 420 can be configured to provide a verified record of the steps / operations performed by the APP 402 in response to a request for a verified record associated with a customs clearance document. The trusted computing module 420 can also provide a verified timestamp generated by the trusted time module 422, a verified identity generated by the trusted identity module 424, and / or calculation results associated with each of the steps / operations performed by the APP 402.

[0114] In some embodiments, cryptographic keys for performing encryption and generating digital signatures and certifications may be provided to trusted computing module 420 by key management system 406. In some embodiments, key management system 406 may generate, store, and manage cryptographic keys. In some embodiments, key management system 406 includes a secure application environment implemented using trusted execution environment technology (e.g., Intel SGX). The trusted execution environment may execute one or more software programs or libraries.

[0115] In some embodiments, the trusted time module 422 can be configured to generate a timestamp based on national standard time information (e.g., Greenwich Mean Time (GMT), UTC) or time information obtained from a global positioning system. In some embodiments, the trusted time module 422 can synchronize the time it maintains with the global time adopted by the blockchain nodes in the blockchain network 409 to ensure the accuracy of the timestamp stored on the blockchain.

[0116] In some embodiments, the trusted time module 422 can be configured to generate timestamps associated with different users using different standard times for different regions. For example, the trusted time module 422 can generate timestamps associated with an e-commerce platform (EBP) using a first standard time identified by an international delivery service provider, and generate timestamps associated with a customer using a second standard time identified by a domestic service provider associated with the customer, where the EBP and the customer reside in different regions with different logistics systems.

[0117] The trusted identity module 424 may be configured to verify the identity of the service platform user based on one or more unique IDs associated with the user. In some embodiments, the unique ID may include at least one of the following: (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 voiceprints, or (xviii) iris information.

[0118] In some embodiments, the unique ID may also include a decentralized identifier of the user. The decentralized identifier may include a uniform resource locator (URL) scheme identifier, an identifier for a decentralized identifier method, and an identifier dedicated to a decentralized identifier method. The decentralized identifier may point to a corresponding decentralized identifier document, which may include a descriptive text in a preset format (e.g., JSON-LD) that is related to the decentralized identifier and the owner of the decentralized identifier. The decentralized identifier may be used as a uniform resource identifier (URI) for locating a decentralized identifier document. The decentralized identifier document may include various attributes, such as context, decentralized identifier subject, public key, authentication, authorization and proxy, service endpoint, creation, update, certification, and scalability. The decentralized identifier document may define or point to a resource that defines multiple operations, which may be performed relative to the decentralized identifier. In the example described herein, the decentralized identifier complies with the standards specified by the World Wide Web Consortium (W3C). However, other decentralized identifiers may also be used.

[0119] In some embodiments, the unique ID can be used to uniquely identify the taxpayer associated with the order. Before the data is recorded on the blockchain, the customs clearance agent platform or the customs clearance service platform can embed the unique ID into the customs clearance data associated with the taxpayer or order. Customs or other law enforcement agencies can track the customs clearance data associated with the taxpayer or order based on the recovery of the embedded unique ID. In this way, it can be ensured that the order will not be split to multiple buyers in a fraudulent manner, resulting in the value of the order being lower than the tax threshold for the purpose of tax evasion. Additional information about the unique ID can be found in the application PCT / CN2019 / 095299 filed on July 9, 2019, the application PCT / CN2019 / 103780 filed on August 30, 2019, and the application CN201910963431.0 filed on October 11, 2019. The above applications are incorporated herein by reference.

[0120] In some embodiments, the trusted identity module 424 can be configured to verify different users located in different regions with different tax systems by using different identifiers. For example, the trusted identity module 424 can be configured to verify the identity of the first user using at least one of a first set of identifiers recognized by a first tax system associated with the first user, and to verify the identity of the second user using at least one of a second set of identifiers recognized by a second tax system associated with the second user, wherein the first user and the second user are located in different regions with different tax systems.

[0121] In some examples, the computing and connection components 408 may also include a router 426 that can route information processed by one or more processors to a blockchain node 410 in a blockchain network 409 that is communicatively coupled to the internal system 400. As previously described, the blockchain node 410 can be a cloud node that can sign and / or verify messages and communicate with other blockchain nodes. The blockchain node 410 can also be a consensus node that participates in consensus processing in the blockchain network 409. In some embodiments, internal communication between the internal system 400 and the blockchain network 409 and between them can be performed based on a secure communication protocol such as Hypertext Transfer Protocol Secure (HTTPS) or Transport Layer Security (TLS). For example, a function executed by the blockchain node 410 can be defined in a smart contract, wherein a mining node of the blockchain network executes the function in the smart contract, and a consensus node of the blockchain network verifies the transaction.

[0122] The blockchain nodes in the blockchain network 409 can verify and agree on the transactions added to the blockchain through consensus based on the consensus protocol. Examples of consensus protocols may include proof of work (PoW), proof of stake (PoS), PBFT, etc. The blockchain nodes may be associated with customers, online or retail platforms, customs clearance data providers, international and domestic delivery service providers, customs, service platforms, etc. Once the data is added, it becomes immutable and can be trusted by participants in the customs clearance process.

[0123] The time, identity and content carried by the customs clearance data recorded on the blockchain can be credible. The blockchain enables the APP 402 providing customs clearance services to save verified records of information related to events that occurred during each of the multiple steps or key time points of the service (e.g., who, what, and when). The records of information are saved in a manner that complies with (or is more consistent with than previous systems) predetermined rules. For example, when performing customs clearance at the Chinese Customs, the predetermined rules may be the Customs Law of the People's Republic of China.

[0124] Figure 5 5 is a swim lane diagram showing an example of a process 500 for processing customs clearance data according to an embodiment of the present invention. At a high level, the participants of the process 500 include a local system of a customs clearance agent platform 502, a customs clearance service platform 504, and one or more blockchain nodes of a consortium blockchain network 506. The process 500 can be performed to record and update data and status related to customs clearance to a blockchain corresponding to the consortium blockchain network 506. As shown in Figure 3 As discussed in the description of , the customs clearance agent platform 502 can act as an agent for collecting and providing data related to customs clearance. The customs clearance service platform 504 can be Figure 4 The customs clearance service platform 504 can provide an API to the customs clearance agent platform 502 for accessing various blockchain-based services.

[0125] At 508, the customs clearance agent platform 502 may make an API call to invoke a service supported by the customs clearance service platform 504, thereby recording order data associated with the order on the blockchain. The customs clearance agent platform 502 may receive order information from various resources (e.g., EBP, online retailers, or physical stores (B&M) stores). In some embodiments, in order to ensure data consistency to facilitate efficient computing processing, the order information may be converted by the customs clearance agent platform 502 into standard order parameters and encoded into computer code to be processed by the customs clearance service platform 504. In some examples, the order parameters may generally include order subject parameters and commodity parameters.

[0126] The following table (Table 2) lists some exemplary codes of order subject parameters and their corresponding attributes. According to embodiments of the present invention, more or fewer order subject parameters may be included in the order parameters compared to the parameters listed in the following table.

[0127] Table 2

[0128]

[0129] The following table (Table 3) lists some exemplary codes of merchant parameters and their corresponding attributes. According to embodiments of the present invention, the order parameters may include more or fewer commodity parameters than those listed in the following table.

[0130] Table 3

[0131] Product Parameters describe Data Types Data length barCode Product QR code String 32 cargoTotalTax Total taxes BigDecima 1 (12,5) country Country of product String 8 currency Currency Type String 8 gnum Product Number String 4 itemDescript Project Description String 128 itemName Project Name String 256 hscode hs code String 16 codeTs Tax Code String 16 price Product Prices BigDecima 1 (8,3) foreignPayPrice Price in foreign currency BigDecima 1 (8,3) weight weight double (5,3) qty Number of projects BigDecima 1 (5,0) totalPrice Total price of goods BigDecima 1 (8,3) spt01 Reserved Fields String 128

[0132] In some embodiments, when the data for customs clearance is provided to the customs clearance service platform 504 for processing, the data may also include standard header parameters. For example, when providing order parameters to the customs clearance service platform 504 to be recorded on the blockchain, the customs clearance agent platform 502 may also include header parameters. The following table (Table 4) lists some exemplary codes of header parameters and their attributes. According to embodiments of the present invention, more or fewer header parameters may be provided to the customs clearance service platform 504.

[0133] Table 4

[0134]

[0135] In some embodiments, the customs clearance agent platform 502 may further generate a document ID associated with the order to be stored in the blockchain. The document ID can be used to find the header parameters and order parameters associated with the order. Therefore, the order data is sent by the customs clearance agent platform 502 as a computer code including the document ID, the header parameters, and the order parameters.

[0136] The header parameters are generally considered not to be confidential information and can be stored in the blockchain along with the document ID without encryption. The order parameters contain information that can be considered private to the buyer and seller, and the order parameters can be encrypted before being sent to the consortium blockchain network 506 for storage. After receiving the parameters, at 510, the customs clearance service platform 504 can encrypt the order parameters. In some examples, the encryption of the order parameters can be performed by the computing and connection component 408, such as in Figure 4 as discussed in the description of .

[0137] In some embodiments, encryption keys can be derived through negotiation between participants in the customs clearance process based on a linear secret sharing scheme (LSSS). For example, participants such as the customs clearance agent platform 502, the customs clearance service platform 504, and the customs agency can be participants involved in the encryption key negotiation. Additional details of the encryption key negotiation are described in, for example, the Chinese application No. 201911187078.8 filed on November 27, 2019, the contents of which are incorporated herein by reference. This encryption key derivation technology enhances the security of the encryption key and reduces the possibility of decryption by a third party.

[0138] In some embodiments, the customs clearance service platform 504 may also generate a zero-knowledge proof associated with the parameters. The zero-knowledge proof may be provided to the blockchain nodes of the alliance blockchain network 506 together with the encrypted parameters, so that the blockchain nodes may verify the legitimacy of the order data without knowing the content of the order data. After verifying that the order data is legitimate, the blockchain nodes of the alliance blockchain network 506 may perform consensus to record the parameters on the blockchain.

[0139] In some embodiments, the zero-knowledge proof may include a proof, a range proof, and / or a zero test under a homomorphic encryption scheme. The homomorphic encryption scheme may be used to encrypt the actual total payment (e.g., "actualPaid" in Table 2), the total price of the goods (e.g., "allCargoTotalPrice"), the total tax (e.g., "allCargoTotalTax"), and the transportation cost (e.g., "freight"), respectively. After executing the homomorphic encryption scheme, the encrypted parameters cannot be displayed without decryption. However, based on the homomorphic nature of the encryption scheme, if the encrypted actual total payment is equal to the sum of the encrypted total price of the goods, the encrypted total tax, and the encrypted transportation cost, it can be verified that the actual total payment is equal to the sum of the total price of the goods, the total tax, and the transportation cost. Additional details of homomorphic encryption are described in, for example, PCT / CN2018 / 114344, PCT / CN2018 / 114421, and PCT / CN2018 / 114420 filed on April 22, 2019, the contents of which are incorporated herein by reference.

[0140] In some embodiments, a range proof can be used to prove that an amount is within a certain range without revealing the actual amount. In some examples, the customs clearance service platform 504 can provide a range proof to show that the actual payment price or other parameters are within a reasonable range. For example, the reasonable range of the actual payment price can be set to 0 to 2. 10As another example, a range proof can be set for the total price of goods to verify that the value of the order meets the tax liability. In some examples, a range proof can be provided to show that the total price of goods is less than or equal to the actual total payment. Zero testing can be used to prove that the amount is zero. For example, a zero test can be used to determine that the actual total payment is not zero, so that customs clearance is guaranteed.

[0141] At 512, the customs clearance service platform 504 can add its digital signature to the order data. The digital signature can be generated by the private key of the customs clearance service platform 504 for the blockchain node in the alliance blockchain network 506 to verify the identity of the sender.

[0142] At 514, the customs clearance service platform 504 may send the digitally signed order data to the alliance blockchain network 506, for example, by calling a smart contract on a blockchain associated with the alliance blockchain network 506. At 516, the blockchain nodes of the alliance blockchain network 506 may perform a consensus to record the order data on the blockchain. In some embodiments, the consensus is performed after the blockchain nodes pre-verify the legitimacy of the order data based on zero-knowledge proof.

[0143] As in Figure 3 As discussed in the description of , as customs clearance data accumulates, the amount of data may be large, which can significantly increase storage costs. In some embodiments, customs clearance data may be stored in a smart contract data cache or a blockchain database. The smart contract data cache may be a storage medium with faster read and write speeds but higher storage costs, such as a hardware cache, random access memory (RAM), or a solid-state drive. The blockchain database may be a storage medium with slower read and write speeds and lower storage costs, such as a hard drive. The smart contract data cache may be used to store variable data used to execute smart contracts, while the blockchain database may be used to store incremental permanent blockchain data. In this way, a better balance may be achieved between processing efficiency and storage costs of blockchain data.

[0144] In some embodiments, the data types to be stored in the smart contract data cache may include updateable data, such as document type, document ID, document status, mapping data, encryption key, or other modifiable data. For example, parameters such as order number (e.g., "orderNo" in Table 2), owner ID (e.g., "ownerID"), port code (e.g., "port" in Table 4), customs code (e.g., "custCode"), customs clearance type (e.g., "patternType") can be stored in the smart contract data cache.

[0145] The type of data to be stored in the blockchain database may include, for example, order IDs, encrypted data and their corresponding storage locations in smart contracts, or other immutable data. For example, order subject parameters and commodity parameters may be stored in the blockchain database. Smart contract code, inputs, outputs, and execution logs may also be stored on the blockchain in the blockchain database.

[0146] In addition, data stored in a blockchain database can be encrypted to protect the privacy of the data owner. Figure 3 As discussed in the description of , the encryption key used to encrypt the document can be a symmetric key. The data owner can provide the user with access to the plaintext data by publishing an encrypted version of the symmetric key using the user's public key. Assuming that the encrypted data is stored in the blockchain database, a hash value of the encrypted data can be generated and stored in the smart contract data cache together with the encrypted version of the symmetric key.

[0147] To query data, an authorized user can search the smart contract data cache to obtain the hash value and the encrypted version of the symmetric key. The user can use their private key to decrypt the encrypted version of the symmetric key. If the symmetric key is successfully decrypted, the user can determine that they have access to the plaintext data. The user can then use the hash value to find the encrypted data from the blockchain storage and use the symmetric key to decrypt the encrypted data.

[0148] In some embodiments, one or more blockchain nodes of the consortium blockchain network 506 may notify the customs clearance service platform 504 that the order data has been recorded on the blockchain. Then, at 518, the customs clearance service platform 504 may forward the notification to the customs clearance agent platform 502. In some examples, the customs clearance service platform 504 may also forward the notification to the customs agency to notify that the order data is ready to be retrieved from the blockchain when needed.

[0149] At 520, the customs clearance agent platform 502 may make an API call to update the order data. The API call may be in the form of a request that includes the document ID of the data to be updated. The customs clearance service platform 504 may call a smart contract on the blockchain to perform an update operation. Typically, the document to be updated may be found based on its document ID. Update operations may include updating the status of a document, adding additional parameters to a document, associating multiple documents with the same document ID, and associating multiple transactions with the same document, among other things. In some embodiments, document statuses, such as order status and logistics status, may be accumulated and updated in batches to improve efficiency. Figure 7 Examples of order status and logistics status are described in the description.

[0150] After performing the update operation, at 522, the customs clearance service platform 504 can add its digital signature to prove the authenticity of the updated order data, and provide the updated order data to the alliance blockchain network 506 for storage at 524. At 526, the blockchain nodes of the alliance blockchain network 506 perform consensus to record the update on the blockchain. Since the update is performed on modifiable data, it can be stored in a smart contract on the blockchain.

[0151] In some embodiments, one or more blockchain nodes of the consortium blockchain network 506 may notify the customs clearance service platform 504 that the update has been recorded on the blockchain. The customs clearance service platform 504 may then forward the notification to the customs clearance agent platform 502 at 528. In some examples, the customs clearance service platform 504 may also forward the notification to the customs agency to notify that the new update associated with the order has been recorded and is ready to be retrieved from the blockchain for review when needed.

[0152] At 530, the customs clearance agent platform 502 may make an API call to call a service from the customs clearance service platform 504 to record the logistics data associated with the transportation of the order to the blockchain. The customs clearance agent platform 502 may receive logistics information from a delivery service provider or a freight service provider. Similar to the order information, the logistics information may be converted into standard logistics parameters to ensure data consistency and facilitate computational processing.

[0153] The following table (Table 5) lists some exemplary codes of logistics parameters and their corresponding attributes. According to the embodiments of this document, more or fewer logistics parameters may be provided to the customs clearance service platform 504.

[0154] Table 5

[0155]

[0156] Similar to order data, when logistics data for customs clearance is provided to the customs clearance service platform 504 for processing, the logistics data may also include standard header parameters and document ID. For example, when providing logistics parameters to the customs clearance service platform 504 for recording on the blockchain, the customs clearance agent platform 502 may also include header parameters. Therefore, the logistics data is sent by the customs clearance agent platform 502 as a computer code including the document ID, header parameters, and logistics parameters.

[0157] The logistics parameters contain information that can be considered private to the buyer and seller. The parameters can be encrypted before being sent to the consortium blockchain network 506 for storage. After receiving the parameters, at 532, the customs clearance service platform 504 can encrypt the logistics parameters. In some examples, the encryption of the logistics parameters can be performed by the computing and connection component 408, such as in Figure 4 as discussed in the description of .

[0158] At 534, the customs clearance service platform 504 can add its digital signature to the logistics data. The digital signature can be generated by the private key of the customs clearance service platform 504, where the blockchain nodes in the alliance blockchain network 506 can use the digital signature to verify the identity of the sender.

[0159] At 536, the customs clearance service platform 504 may send the digitally signed logistics data to the alliance blockchain network 506, for example, by calling a smart contract on a blockchain associated with the alliance blockchain network 506. At 538, the blockchain nodes of the alliance blockchain network 506 may perform consensus to record the logistics data on the blockchain.

[0160] Similar to order data, in some examples, header parameters such as port code (e.g., "port"), customs code (e.g., "custCode"), customs clearance type (e.g., "patternType") can be stored in the smart contract data cache portion of the blockchain. In some examples, encrypted logistics parameters can be stored in the blockchain database.

[0161] In some embodiments, one or more blockchain nodes of the consortium blockchain network 506 may notify the customs clearance service platform 504 that the logistics data has been recorded on the blockchain. Then at 540, the customs clearance service platform 504 may forward the notification to the customs clearance agent platform 502. In some examples, the customs clearance service platform 504 may also forward the notification to the customs agency to notify that the logistics data is ready to be retrieved from the blockchain for review when needed.

[0162] At 542, the customs clearance agent platform 502 may make an API call to update the logistics data. The API call may be in the form of a request including the document ID of the data to be updated. The customs clearance service platform 504 may call the smart contract on the blockchain to perform the update operation. After performing the update operation, at 544, the customs clearance service platform 504 may add its digital signature to prove the authenticity of the updated logistics data, and provide the updated logistics data to the alliance blockchain network 506 for storage at 546. At 548, the blockchain nodes of the alliance blockchain network 506 perform consensus to record the updated logistics data into the smart contract on the blockchain.

[0163] In some embodiments, one or more blockchain nodes of the consortium blockchain network 506 may notify the customs clearance service platform 504 that the updated logistics data has been recorded on the blockchain. Then at 550, the customs clearance service platform 504 may forward the notification to the customs clearance agent platform 502. In some examples, the customs clearance service platform 504 may also forward the notification to the customs agency to notify that the new update associated with the logistics data has been recorded and is ready to be retrieved from the blockchain for review when needed.

[0164] At 552, the customs clearance agent platform 502 may make an API call to link the logistics data and the order data. In some embodiments, the request to link the logistics data and the order data may be initiated by a user of the customs clearance service platform 504, such as an EBP, a logistics company, the customs clearance agent platform 502, or a customer. For example, an order may include multiple items corresponding to multiple logistics transactions (e.g., transportation) and payment transactions (e.g., separate payments for different transportations). A user may send a request to link an order document to all relevant logistics transactions associated with the order.

[0165] In some examples, the request may include an order ID (e.g., an order number) of an order document and one or more logistics transaction IDs of one or more logistics documents associated with the order. In response to receiving the request, the customs clearance service platform 504 may call a smart contract to store the order ID and one or more logistics transaction IDs in a data structure corresponding to the order in the smart contract data cache. In some embodiments, a list of logistics transaction IDs associated with an order may be stored in a data structure for storing order data. In some embodiments, for each logistics transaction, a smart contract may also be called to store the order ID in the logistics data corresponding to the logistics transaction stored in the smart contract data cache. Figure 6An example of the data structure of order data and logistics data stored in the smart contract data cache is provided in the description of . In this way, when an order document or logistics transaction is searched for later by the document ID corresponding to the order document or logistics transaction, the order ID and its corresponding logistics transaction ID can be found under the same data structure. Then, the document ID can be used to find the corresponding document from the blockchain stored in the blockchain database.

[0166] In some examples, an order ID and its corresponding logistics transaction ID may be referred to as "link information", which links the corresponding order document and logistics document. Link information may be information used to link other document types according to this document.

[0167] In some examples, the request may include a document ID of the order and one or more logistics documents associated with the order. In response to receiving a request to link logistics data and order data, the customs clearance service platform 504 may call a smart contract to store a hash value of the logistics document under a data structure corresponding to the order in the smart contract data cache. In this way, when an order document is later searched by the document ID of the order document, the hash value of the logistics document associated with the order can be found under the same data structure. Then, the hash value of the logistics document can be used to find the corresponding logistics document from the blockchain stored in the blockchain database.

[0168] After the documents are linked, at 554, the customs clearance service platform 504 can add its digital signature to the updated order data and / or logistics data, and provide it to the alliance blockchain network 506 for storage at 556. At 558, the blockchain nodes of the alliance blockchain network 506 perform consensus to record the update into the smart contract on the blockchain.

[0169] In some embodiments, one or more blockchain nodes of the alliance blockchain network 506 may notify the customs clearance service platform 504 that the logistics data and order data recorded on the blockchain have been linked. Then, at 560, the customs clearance service platform 504 may forward the notification to the customs clearance agent platform 502.

[0170] At 562, the customs clearance agent platform 502 may make an API call to call a service from the customs clearance service platform 504 to record payment data associated with the payment of the order on the blockchain. The customs clearance agent platform 502 may receive payment information from the EBP, the customer, or the bank making the payment. Similar to the order information and logistics information, the payment information may be converted into standard payment parameters to ensure data consistency and facilitate processing by the computing system.

[0171] The following table (Table 6) lists some exemplary codes of payment parameters and their corresponding attributes. According to the embodiments of this document, more or fewer logistics parameters may be provided to the customs clearance service platform 504.

[0172] Table 6

[0173] Payment Parameters describe Data Types Data length payTransactionID Payment transaction ID String 64 merchantOrderNo Order Number String 64 businessId Corporate ID String 64 totalPayment Actual total payment BigDecima 1 (8,3) payMethod Payment Methods String 16 payMerchantName Payee Name String 128 payMerchantCode Payer company code String 64 payTime Payment Time String 32 Currency Payment Currency String 8 payBuyerName Payer Name String 64 payBuyerIdNu Payer ID String 32 payBuyerTel Payer phone number String 32

[0174] Similar to order data and logistics data, when payment data for customs clearance is provided to the customs clearance service platform 504 for processing, the payment data may also include standard header parameters and document ID. For example, when providing payment parameters to the customs clearance service platform 504 for recording on the blockchain, the customs clearance agent platform 502 may also include header parameters. Therefore, the payment data is sent by the customs clearance agent platform 502 as a computer code including the document ID, header parameters, and payment parameters.

[0175] The payment parameters contain information that can be considered private to the buyer and seller, and the payment parameters can be encrypted before being sent to the consortium blockchain network 506 for storage. After receiving the payment parameters, at 564, the customs clearance service platform 504 can encrypt the payment parameters. In some examples, such as Figure 4 As discussed in the description of , encryption of payment parameters can be performed by computing and connectivity component 408 .

[0176] In some embodiments, the customs clearance service platform 504 may also generate a zero-knowledge proof associated with the payment parameters. The zero-knowledge proof is provided to the blockchain nodes of the alliance blockchain network 506 together with the encrypted payment parameters, so that the blockchain nodes can verify the legitimacy of the payment parameters without knowing the content of the payment parameters. After verifying that the payment parameters are legitimate, the blockchain nodes of the alliance blockchain network 506 can perform consensus to record the payment parameters on the blockchain.

[0177] At 566, the customs clearance service platform 504 may add its digital signature to the payment data. The digital signature may be generated by the private key of the customs clearance service platform 504 to enable the blockchain nodes in the consortium blockchain network 506 to verify the identity of the sender.

[0178] At 568, the customs clearance service platform 504 may send the digitally signed payment data to the consortium blockchain network 506, for example, by invoking a smart contract on a blockchain associated with the consortium blockchain network 506. At 570, the blockchain nodes of the consortium blockchain network 506 may perform consensus to record the payment data on the blockchain.

[0179] Similar to order data and logistics data, in some examples, header parameters such as port code ("port"), customs code ("custCode"), customs clearance type ("patternType") can be stored in the smart contract data cache portion of the blockchain. In some examples, encrypted payment parameters can be stored in the blockchain database.

[0180] In some embodiments, one or more blockchain nodes of the consortium blockchain network 506 may notify the customs clearance service platform 504 that the payment data has been recorded on the blockchain. Then, at 572, the customs clearance service platform 504 may forward the notification to the customs clearance agent platform 502. In some examples, the customs clearance service platform 504 may also forward the notification to the customs agency to notify that the payment data is ready to be retrieved from the blockchain for review when needed.

[0181] At 574, the customs clearance agent platform 502 may make an API call to link the payment data with the order data and / or logistics data. In some embodiments, the request to link the payment data and the order data may be initiated by a user of the customs clearance service platform 504, such as an EBP, a logistics company, the customs clearance agent platform 502, or a customer. For example, an order may include multiple items corresponding to multiple payment transactions and multiple logistics transactions. A user may send a request to link an order document to the relevant payment transactions associated with the order.

[0182] In some examples, the request for linking payment data and order data may include an order ID (e.g., an order number) of the order document and one or more payment transaction IDs of one or more payment documents associated with the order. In response to receiving the request, the customs clearance service platform 504 may call a smart contract to store the order ID and the one or more payment transaction IDs in a data structure corresponding to the order in the smart contract data cache. In some embodiments, for each payment transaction, the smart contract may also be called to store the order ID in the payment data corresponding to the payment transaction stored in the smart contract data cache. Figure 6 An example of the data structure of order data and payment data stored in the smart contract data cache is provided in the description of . In this way, when an order document or payment transaction is later searched by the document ID corresponding to the order document or payment transaction, the order ID and its corresponding payment transaction ID can be found under the same data structure. The document ID can then be used to find the corresponding document from the blockchain stored in the blockchain database.

[0183] In some examples, the request for linking the payment data and the order data may include the document ID of the order and one or more payment documents associated with the order. In response to receiving the request, the customs clearance service platform 504 may call the smart contract to store the hash value of the payment document under the data structure corresponding to the order in the smart contract data cache. In this way, when the order document is searched later by the document ID of the order document, the hash value of the payment document associated with the order can be found under the same data structure. Then, the hash value of the payment document can be used to find the corresponding payment document from the blockchain stored in the blockchain database.

[0184] After the documents are linked, at 576, the customs clearance service platform 504 may add its digital signature to the updated order data and / or payment data, and provide it to the consortium blockchain network 506 for storage at 578. At 580, the blockchain nodes of the consortium blockchain network 506 perform consensus to record the updated order data and / or payment data into the smart contract on the blockchain.

[0185] In some embodiments, one or more blockchain nodes of the alliance blockchain network 506 may notify the customs clearance service platform 504 that the payment data and order data recorded on the blockchain have been linked. Then, at 582, the customs clearance service platform 504 may forward the notification to the customs clearance agent platform 502.

[0186] In some embodiments, Figure 5 In the process 500, before the customs clearance agent platform 502 can make an API call to request to record or update order data, logistics data, or payment data, or request to link two or more types of customs clearance related data, the customs clearance service platform 504 determines whether the customs clearance agent platform 502 is a member authorized to perform these actions. For example, the smart contract on the blockchain can maintain a data structure (e.g., a database) that stores information about authorized members and the actions that each member is authorized to perform. For example, the data structure may include a first list of members authorized to record import customs clearance data for new import orders. For each existing import order, the data structure includes a second list of members authorized to perform actions on documents associated with the import order, and information about what types of actions the members are authorized to perform.

[0187] The customs clearance service platform 504 provides the smart contract with the identification of the customs clearance agent platform 502 and requests the smart contract to determine whether the customs clearance agent platform 502 is authorized to perform the requested action. If the smart contract confirms that the customs clearance agent platform 502 is authorized to perform the requested action, the customs clearance service platform 504 performs the steps in the process 500. If the smart contract determines that the customs clearance agent platform 502 is not authorized to perform the requested action, the customs clearance service platform 504 rejects the request from the customs clearance agent platform 502.

[0188] In some embodiments, the customs clearance agent platform 502 collects information from various parties related to the customs clearance process, wherein the parties may include, for example, an importer who wishes to import the goods specified in the import order, a beneficiary bank, a payee bank, a delivery service company for the overseas segment, and a delivery service company for the domestic segment. The customs clearance agent platform 502 interacts with the customs clearance service platform 504 and sends a request for recording and / or updating order data, logistics data, and / or payment data and / or linking two or more types of data. In this example, the importer, the bank, and the delivery service company do not interact with the customs clearance service platform 504.

[0189] In some embodiments, the customs clearance agent platform 502 collects information from all parties related to the customs clearance process, interacts with the customs clearance service platform 504, and sends a request for recording and / or updating order data, logistics data and / or payment data and / or linking two or more types of data. Importers, banks and delivery service companies can also interact directly with the customs clearance service platform 504 and send a request for recording and / or updating order data, logistics data and / or payment data, and / or linking two or more types of data. In this example, all parties (except the customs clearance agent platform 502) can have the authority to perform limited actions, such as modifying specific parameters but not modifying other parameters.

[0190] For example, a delivery service company for a domestic segment is authorized to record or update information related to the domestic segment of delivery, but is not authorized to record or update information related to the overseas segment of delivery. A delivery service company is not authorized to record or update payment data. A bank is authorized to record or update parameters related to financial information, but is not authorized to record or update parameters related to the delivery of goods.

[0191] In some embodiments, a designated party, such as an administrator of the customs clearance service platform 504, is responsible for adding members to a list of members authorized to perform actions on data related to import orders. For example, the administrator may send a request to the customs clearance service platform 504 to add a new member to the list of authorized members. The administrator may provide the customs clearance service platform 504 with information about the new member, such as an identification of the member, a type of member, and a name of the member.

[0192] The customs clearance service platform 504 calls a smart contract on the blockchain (which stores data related to import orders) to request that a new member be added to the list of authorized members and indicate the type of action that the new member is authorized to perform. The customs clearance service platform 504 provides information about the new member to the smart contract, such as the member's identifier, the member's type, and the member's name. The smart contract updates the data structure to add the new member to the list of members authorized to perform actions on the data related to the import order. The smart contract sends a message to the customs clearance service platform 504 to indicate that the new member has been added to the list of authorized members. The customs clearance service platform 504 then sends a message to the administrator to confirm that the new member has been added to the list of authorized members. The customs clearance service platform 504 may provide an API (e.g., AddMember) to enable the administrator to add a new member.

[0193] The customs clearance service platform 504 may enable a designated party to update information about an existing member, including, for example, updating the member's contact information, updating the actions that the member is authorized to perform, or removing the member from the authorized member list. For example, the customs clearance service platform 504 may provide an API (e.g., UpdateMember <memberid>) to enable an administrator to update information about a member that can be identified by an identifier of the member (e.g., memberID). Upon receiving a request from the administrator to update the information about a member, the customs clearance service platform 504 calls a smart contract on the blockchain to request to update the information about the member. The smart contract updates the data structure to update the information about the member. The smart contract sends a message to the customs clearance service platform 504 to indicate that the information about the member has been updated. Then, the customs clearance service platform 504 sends a message to the administrator to confirm that the information about the member has been updated.

[0194] The customs clearance service platform 504 may provide an API (such as QueryMember <memberid>) to enable an administrator to query or find an import order for which a specified member is an authorized member who can access the data associated with the import order.

[0195] The customs clearance service platform 504 may provide an API (such as QueryMember <orderid>) to enable an administrator to query or find authorized members who are authorized to perform actions on documents associated with a specified import order.

[0196] Figure 6 6 is a relationship diagram showing an example of a relationship between sub-models of a computer-implemented model 600 according to an embodiment of the present invention. The computer-implemented model 600 can be used by one or more software applications of a service platform, such as by Figures 3 to 5 The customs clearance service platform 504 discussed in the description of is used to process customs clearance data. The processed customs clearance data will be recorded on the blockchain to facilitate the customs clearance process. At a high level, the model 600 can have sub-models, including a user sub-model 602, a document sub-model 604, an order sub-model 606, a payment sub-model 608, a logistics sub-model 610, and a tracking sub-model 612.

[0197] The user sub-model 602 can be used to allow access to the Figure 3 The attributes of users of the services provided by the service platform discussed in the description of the service platform are modeled. Each user may correspond to one or more order documents modeled under the order sub-model 606. Each order document may include a unique order number (e.g., "orderNo*"), one or more references linking the order document to one or more payment documents (e.g., "refPaymentTrxNo"), one or more references linking the order document to one or more logistics documents (e.g., "refLogisticsNo"), and an order status (e.g., "status"). For example, the refPaymentTrxNo reference may include a list of payment transaction IDs of payment transactions associated with the order document. The refLogisticsNo reference may include a list of logistics documents associated with the order document. In this way, all payment transactions and logistics transactions can be found when searching for orders.

[0198] Each payment document may be modeled under a payment sub-model 608. A payment document may include a payment document number (e.g., "paymentTrxNo*"), a reference linking the payment document back to an order document (e.g., "refOrderNo"), and a payment status (e.g., "status").

[0199] Each logistics document can be modeled under the logistics sub-model 610. The logistics document can include a logistics document number (e.g., "logisticsNo*"), a reference linking the logistics document back to the order document (e.g., "refOrderNo"), and a logistics status (e.g., "status"). In some examples, the logistics document can also be linked to one or more tracking records modeled under the tracking sub-model 612. Each tracking record can include the tracking number of one or more items in the order (e.g., "trackNo*"), a reference linking the tracking record back to the logistics document, tracking content (e.g., "content"), and tracking status (e.g., "status"). In some examples, references such as refPaymentTrxNo, refLogisticsNo, and refOrderNo can be referred to as link information linking corresponding documents.

[0200] In some embodiments, the order document, logistics document, and payment document may be sub-documents generated based on the parent document modeled under the document sub-model 604. In some embodiments, the document sub-model 604 may be called to generate data linking the order document, logistics document, and payment document together. The attributes of the document sub-model 604 may include a document ID (e.g., "documentId*"), a document type (e.g., "documentType"), and a document status (e.g., "status").

[0201] exist Figure 6 In the example, the user sub-model 602 is used to identify the authorized access Figure 3 The smart contract may be configured to model the attributes of a user of the services provided by the service platform discussed in the description of the service platform. For example, the smart contract may be configured to determine whether a user is an authorized member based on a comparison of the user's characteristics with the attributes included in the model. For example, the user sub-model 602 may indicate that an authorized member has a member type of "financial institution". In this example, a user with a member type other than "financial institution" (e.g., "delivery service company") is not an authorized member.

[0202] There may be multiple customs clearance agent platforms. For example, a first customs clearance agent platform processes documents associated with a first import order, and a second customs clearance agent platform processes documents associated with a second import order. The first customs clearance agent platform may be an authorized member of the first import order, but not an authorized member of the second import order. The second customs clearance agent platform may be an authorized member of the second import order, but not an authorized member of the first import order.

[0203] The customs clearance service platform 504 confirms whether the user who sends the request to record or update the order data, logistics data and / or payment data or link multiple pieces of data is an authorized user. This reduces the possibility of tampering with the data associated with the import order, thereby enhancing the integrity of the data associated with the import order and stored on the blockchain.

[0204] Figure 7 700 according to an embodiment of the present invention. As previously described, the status of order data, logistics data, and payment data associated with the order life cycle will progress over time. The status information is recorded on the blockchain and can be retrieved by customs agencies for customs clearance review. In order to ensure the consistency of the status data recorded on the blockchain, the customs clearance service platform 504 can generate status data based on the state machine. The state machine can be as follows Figure 7 The diagram shown shows that a state machine is configured to progress from one state to the next state in response to an event.

[0205] At 702, the process of state 700 may be in a start state. At 704, in response to an order pickup event, the state of the order data and / or logistics data progresses to a pickup state. At 706, in response to an event that a delivery service provider receives a transport order, the state of the order data and / or logistics data progresses from a pickup state to a waiting state. At 708, in response to an order transport event, the state of the order data and / or logistics data progresses to an order transport state. At 710, in response to an event that an order document, a logistics document, or a payment document is received at the customs clearance agent platform 502, the customs clearance service platform 504, or a customs agency, the state of the data progresses to a document received state.

[0206] At 711, a determination may be made as to whether the received document meets the customs clearance requirements. If the received document meets the customs clearance requirements, a customs clearance status may be assigned at 712. In response to an event that an order is delivered to a customer, the status of the order data, logistics data, and / or payment data may be updated to a delivered status at 714. Afterwards, the process of state 700 may end at 716. Otherwise, an exception status may be assigned to the order data, logistics data, and / or payment data at 718. At 719, it may be determined whether the exception may be resolved. If the exception may be resolved, the data may be resubmitted, and the status may be updated again to a document received status to wait for a determination as to whether the resubmitted data meets the customs clearance requirements. Otherwise, the order may be returned 720, canceled 722, or refunded 724, and the process of state 700 may end at 716.

[0207] Figure 8 800 is a diagram illustrating an example of storing customs clearance data in a smart contract pool according to an embodiment of the present invention. At a high level, the storage of customs clearance data can be shared by a blockchain database 812 and a smart contract data cache 806 included in a blockchain node 802. The blockchain node 802 can be Figure 4 Any node of the blockchain network 409 discussed in the description, such as a blockchain node owned by the customs clearance service platform 504.

[0208] Blockchain node 802 can call virtual machine 808 to execute smart contracts. In some embodiments, virtual machine 808 can be deployed in a trusted computing environment such as TEE. In some embodiments, virtual machine 808 can be configured to perform smart contract operations by executing instructions of a smart contract programming language. In some examples, virtual machine 808 can access resources outside TEE during operation execution, such as external servers, blockchains, databases, or other resources indicated by the operation. In some embodiments, access to external resources can be restricted or denied so that the entire execution of the operation depends only on the data stored in TEE (e.g., smart contract status). This type of restriction can further reduce the possibility of tampering with the execution of the operation.

[0209] A smart contract operation may include the execution state of the smart contract associated with the requested contract operation (e.g., adding a document state, updating a document state, etc.). In the process of executing a smart contract, multiple blockchain nodes of a blockchain network may execute each instruction of the smart contract individually and produce a result indicating the execution state of the smart contract after executing the instruction. 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., to store a value to be used by subsequent instructions in the smart contract).

[0210] 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, so that a consensus is reached on the execution path of the smart contract. The execution path can be recorded as a corresponding smart contract execution event log recorded on the blockchain 814 in the blockchain database 812. Finally, the final result (i.e., output) of the execution is also recorded on the blockchain 814.

[0211] The smart contract data cache 806 can be used to store variable data managed by the smart contract. Typically, variable data may include document type, document ID, document status, modifiable data of document content, transaction hash values ​​that associate document data stored in the smart contract data cache 806 with the blockchain database 812, 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, the smart contract data cache may also store index data to associate variable data with immutable data associated with the same document or transaction. As previously described, the index data may include a document ID associated with a document and a transaction hash value associated with a transaction. The document ID may be stored in the smart contract data cache 806 and the blockchain database 812 to link variable data and immutable data associated with the same document. The transaction hash value may be stored in the smart contract data cache 806 and the blockchain database 812 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.

[0212] The document type and document ID may indicate the type and identification of the document, respectively. Figure 7 As discussed in the description of , the document status may indicate the status of the document. The modifiable data in the document content may be specific content, such as overhead inserted into the document by the customs clearance agent platform (eg, 502) for data processing.

[0213] The transaction hash value may be a hash value of the immutable blockchain data stored in the blockchain database 812. The encryption key may include a symmetric key used to encrypt the document data before storing it on the blockchain in the blockchain database 812. The encryption key may also include an encryption key associated with a user of the customs clearance service platform 504. As previously described, the data stored in the blockchain database may be encrypted to protect the privacy of the document owner. In some examples, the encryption key may be provided by the KMS 406 under the TEE, such as in Figure 4 as discussed in the description of .

[0214] The document owner can provide another user of the service platform with access to the document in plain text by publishing an encrypted version of the symmetric key using the public key of the other user. The encrypted data is immutable and stored in the blockchain database 812, and a hash value of the encrypted data (i.e., a transaction hash value) can be generated and stored in the same data structure in the smart contract data cache 806 together with the encrypted version of the symmetric key. In general, the transaction hash value can be used to link the variable data stored in the smart contract data cache 806 and the immutable blockchain data associated with the same order stored in the blockchain database 812. 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 806 and an encrypted document stored in the blockchain database 812. The transaction hash value of the encrypted document stored in the blockchain database 812 can be stored in the same data structure in the smart contract data cache 806 together with the variable data. In this way, data stored in different locations can be linked when queried.

[0215] To query the data, an authorized user can search the smart contract data cache 806 to obtain the hash value and the encrypted version of the symmetric key. The user can use his private key to decrypt the encrypted version of the symmetric 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 find the encrypted data from the blockchain storage and use the symmetric key to decrypt the encrypted data.

[0216] The blockchain database 812 may be used to store the blockchain 814. The blockchain 814 may include incremental immutable blockchain data, such as smart contract code, input, output, and execution logs of smart contracts, and parameters included in customs clearance data.

[0217] In some embodiments, the variable data in the smart contract data cache 806 is stored as key-value pairs (KVPs). 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 volume of the KVP exceeds a certain threshold (e.g., 5GB), a cache miss state may occur. A cache miss is a state in which the data requested by a component or application for processing is not found in the cache memory. Cache misses can cause execution delays by requiring the program or application to obtain data from other cache levels or main memory.

[0218] In some embodiments, multiple smart contract pools 816 may be created in the blockchain database 812 to store at least a portion of the mutable data managed by the smart contract in the smart contract data cache 806. At least a portion of the mutable data may then be moved from the high-cost cache storage to the blockchain database 812 to reduce overall storage costs and mitigate cache miss conditions.

[0219] In some embodiments, a new smart contract address can be added to the configuration file 804 by the blockchain node 802 to create a corresponding smart contract. When the configuration file 804 is executed, the virtual machine 808 can 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 can be automatically created in the blockchain database 812.

[0220] In some embodiments, the data stored in the smart contract pool is also recorded on the blockchain 814 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.

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

[0222] In some embodiments, order documents, logistics documents, and payment documents associated with the same order may be assigned to the same document ID or label. In this way, they can be easily found when querying from the smart contract data cache 806, the smart contract pool 816, and the blockchain 814. In order to link documents associated with the same order stored in different smart contract pools 816, the contract ID of the corresponding smart contract and the corresponding document ID may be added to each document. In this way, documents can be retrieved from different smart contract pools 816 based on the contract ID. In some embodiments, the document ID may be a transaction hash value of the corresponding document. The transaction hash value may be used to find the corresponding immutable data stored on the blockchain 814.

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

[0224] In some embodiments, documents may be stored in each smart contract pool 816 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 stores variable data for a predetermined number of documents, variable data for new documents may be stored in the next smart contract pool.

[0225] The following describes a technique for managing access to customs clearance information, which includes information related to an import order, such as order data, logistics data, and payment data. The customs clearance service platform 504 is configured to prevent tampering with customs clearance documents submitted to a customs agency to request customs clearance for an import order. This enables the customs agency to determine whether to approve an import order for customs clearance based on accurate data. The customs clearance service platform 504 is configured to protect private information by allowing only authorized users to access customs clearance documents, which may include private information of importers.

[0226] Fig. 9 A system for implementing a customs clearance service platform 900 based on blockchain to enable safe and efficient processing of customs clearance documents according to an embodiment of the present invention is shown. For example, a customs clearance document may be an import customs clearance document for customs clearance of imported goods. The platform 900 provides an integrated interface that allows users to manage information used in various stages of the customs clearance process. The customs clearance service platform 900 provides services related to various stages of processing customs clearance documents. In some embodiments, the customs clearance service platform 900 provides services to the customs clearance agent platform 906, so that the customs clearance information processed by the customs clearance agent platform 906 can be recorded in a secure manner, such as storing the customs clearance information in a blockchain database and a smart contract data cache. In some embodiments, the customs clearance service platform 900 can also provide services to other entities associated with import orders through a network 918 such as the Internet, such as one or more customs agencies 902, one or more customs brokers 904, one or more customs clearance agent platforms 906, one or more banks or payment companies 908, one or more delivery service companies 910, one or more merchants 912, one or more importers 914, and one or more administrators 916.

[0227] For example, customs agency 902 can be a government agency responsible for handling customs clearance, such as a government agency responsible for reviewing information about imported goods, and assessing and collecting duties, taxes, and fees associated with the importation of goods. Customs agency 902 is also responsible for detecting fraudulent activities intended to evade payment of duties, taxes, and fees.

[0228] One feature of the customs clearance service platform 900 is that the platform can link multiple types of documents associated with an import order or link multiple import orders, so that the customs agency 902 can more easily review the information recorded in multiple documents associated with the import order, and thus can more easily detect inconsistencies or anomalies indicating potential fraudulent activities in the documents. Another feature of the customs clearance service platform 900 is that the platform provides encryption services for encrypting private information to protect user privacy. Another feature of the customs clearance service platform 900 is that the customs clearance information is recorded in the blockchain database through the consensus of the blockchain nodes, and the customs clearance information can be easily verified and trusted by all parties who have access to the blockchain database. A further feature of the customs clearance service platform 900 is that the platform can be expanded by using a smart contract pool so that the platform 900 can handle a large amount of import clearance data.

[0229] The customs broker 904 may be, for example, a professional who prepares and submits documents to obtain customs clearance from the customs agency 902. The customs clearance agent platform 906 may be, for example, an online or web-based system maintained by one or more customs brokers for collecting and processing customs clearance information. In some examples, the customs clearance agent platform 906 collects customs clearance information from multiple parties such as banks or payment companies 908, delivery service companies 910, merchants 912, and importers 914, and provides the collected information to the customs broker 904, who then submits the customs clearance document to the customs agency 902. The customs clearance agent platform 906 sends a copy of the customs clearance document to the customs clearance service platform 900 for record keeping, for example, by storing the customs clearance document in a blockchain database and / or a smart contract data cache.

[0230] In some embodiments, the customs clearance agent platform 906 submits the customs clearance document to the customs clearance service platform 900, and the customs clearance service platform 900 notifies the customs agency 902 that the customs clearance information has been recorded. The customs agency 902 then accesses the customs clearance information recorded by the customs clearance service platform 900 to assess and collect duties, taxes and fees associated with imported goods, and detect fraudulent activities.

[0231] The bank or payment company 908 sends the payment to the merchant 912. The bank or payment company 908 provides the payment information associated with the import order to the customs clearance agent platform 906. The bank or payment company 908 generates a payment document including the payment information related to the import order and sends the payment document to the customs clearance agent platform 906. The bank or payment company 908 also interacts with the customs clearance service platform 900 to provide, for example, payment information related to the import order.

[0232] The delivery service company 910 receives a package including merchandise from the merchant 912 and generates a delivery document including shipping tracking information associated with the import order. The delivery service company 910 provides the delivery document related to the import order to the merchant 912 and the customs clearance agent platform 906. The delivery service company 910 transports and delivers the merchandise package to the importer 914. The delivery service company 910 provides updated delivery information (e.g., updated shipping tracking information) to the customs clearance agent platform 906. The delivery service company 910 also interacts with the customs clearance service platform 900 to provide, for example, shipping tracking information related to the import order.

[0233] Merchant 912 provides information about the import order to the customs clearance agent platform 906, such as order data, invoice information, and tracking number.

[0234] Importers 914 place orders for goods, pay for goods, and initiate delivery of goods. Importers 914 can provide relevant information to customs clearance agent platform 906. Importers 914 can also interact with customs clearance service platform 900, for example, to provide information about import orders, or obtain information about the progress of customs clearance for import orders.

[0235] The administrator 916 is responsible for controlling which members or parties have access to which information and controlling the authorization level of users of the customs clearance service platform 900 to ensure that the privacy of users is protected.

[0236] In some examples, the customs clearance service platform 900 collects information from the above-mentioned parties (e.g., merchants 912, banks or payment companies 908, delivery service companies 910, and importers 914) and compiles the information into a format that can be easily reviewed by customs agencies 902. The customs clearance service platform 900 can link multiple documents obtained from multiple parties to make it easier for customs agencies 902 to review these documents together.

[0237] In some examples, the customs clearance service platform 900 receives customs clearance information about all import orders for a region or country, and enables the customs agency 902 to analyze the customs clearance data in a completely new way. For example, the customs agency 902 can query the customs clearance service platform 900 for all imported goods shipped to a specific address within a specified time period. If the importer splits the order into multiple small orders, all of which are shipped to the same address, it may be difficult to detect fraudulent activities by checking a single small order. By checking all import orders that transport goods to a specific address in a short period of time, the customs agency 902 can determine that the transaction has a pattern indicating the possibility of fraudulent activities.

[0238] The customs clearance service platform 900 interacts with a blockchain network 932 including a plurality of blockchain nodes 934 to securely record customs clearance information in a blockchain database 366 and a smart contract data cache 364. As described above, the smart contract data cache 364 can store variable data in the form of smart contract data, while the blockchain database 366 can store incremental, immutable, and permanent blockchain data. This provides a good balance between the processing efficiency and storage cost of blockchain data.

[0239] The customs clearance service platform 900 is configured to provide tools (e.g., web-based ports and interfaces, APIs, and smart contracts) to enable customs agencies 902, customs brokers 904, customs clearance agent platforms 906, banks or payment companies 908, delivery service companies 910, merchants 912, importers 914, and administrators 916 to conveniently and securely access and process customs clearance information and documents associated with import orders. For example, the customs clearance service platform 900 may provide an interface that facilitates the recording, updating, and review of order data, logistics data, and payment data associated with import orders, as well as an interface that facilitates recording customs clearance information related to import orders in one or more blockchain databases and smart contract data caches.

[0240] For example, the customs clearance service platform 900 may provide tools to achieve Figure 5 In some examples, the customs clearance service platform 900 includes a customs clearance service module 920, a user control module 922, a privacy and encryption module 924, a DIS service module 926, a document lifecycle management module 928, and a smart contract service module 930. Figure 3 ) include APIs (e.g., 336, 338, 340, 342, 344, and 346), which users can call to invoke the services of modules 920, 922, 924, 926, 928, and 930, respectively.

[0241] Customs clearance service platform 900 includes notification service 348 (combined with the above Figure 3 The notification service 348 enables the blockchain nodes of the blockchain network to notify the customs clearance service platform 900 and / or users about updates on document events and user events.

[0242] Many functions provided by the customs clearance service platform 900 related to recording or accessing information stored in the blockchain database 366 and the smart contract data cache 364 involve the use of smart contracts. In some embodiments, the smart contract is developed by a software programmer and / or someone familiar with the customs clearance process, and the administrator 916 registers the smart contract with the blockchain network through the customs clearance service platform 900.

[0243] For example, the customs clearance service platform 900 may provide an API (e.g., CreateContract<contractId,body> ). The administrator 916 calls the API provided by the customs clearance service platform 900 to establish a new smart contract using the blockchain network. The customs clearance service platform 900 sends a request to the blockchain network to establish a new smart contract. After the blockchain network registers the smart contract on the blockchain, the blockchain network sends a message to the customs clearance service platform 900 indicating that the new smart contract has been registered on the blockchain. Then, the customs clearance service platform 900 sends a message to the administrator 916 indicating that the new smart contract has been registered on the blockchain.

[0244] Using the above process, administrators 916 can deploy smart contracts on the blockchain without having to interact with the blockchain network. Different blockchain networks may have different protocols for deploying smart contracts, and the protocols may not be intuitive for people who are not familiar with these blockchain networks. The customs clearance service platform 900 provides an easy-to-use and consistent application programming interface to enable administrators 916 to deploy smart contracts without having to learn the protocol of each blockchain network used to deploy smart contracts.

[0245] In some examples, the customs clearance service platform 900 includes a smart contract generator 936, which includes a customizable smart contract template that allows people who are familiar with the customs clearance process but are not computer programming experts to generate smart contracts suitable for processing customs clearance data. The person can call the function of the smart contract generator 936 by calling the API in the API layer 334 to generate a smart contract for processing a specific type of import customs clearance document for a specific stage of the import customs clearance process. The person can call the function of the smart contract deployment module 938 by calling the API in the API layer 334 to deploy a new smart contract on the blockchain. The smart contract deployment module 938 may include information about the protocol for deploying smart contracts on a reliable blockchain network.

[0246] Fig.10 1 is a flow chart of an example of a process 1000 according to an embodiment of the present invention. For convenience, the process 1000 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, such as Figure 4 Process 1000 may be performed by an appropriately programmed internal computer system of internal system 400 .

[0247] At 1002, a computer system receives first information related to an order, wherein the first information is provided or is to be provided to a service organization to request customs clearance for merchandise included in the order.

[0248] In some cases, the first data includes order data, the order data includes an order identifier of an order document associated with the import order, the second data includes logistics data, the logistics data includes a logistics transaction identifier of a logistics document associated with the import order, and linking the first data with the second data includes: calling a smart contract on the blockchain to store the order identifier and the logistics transaction identifier in a data structure corresponding to the import order, and linking the order identifier with the logistics transaction identifier.

[0249] In some cases, the first data includes order data, the order data includes an order identifier of an order document associated with the import order, and the second data includes logistics data, the logistics data includes at least one logistics document, wherein processing 1000 also includes: generating a hash value of at least one logistics document, and wherein linking the first data with the second data includes: calling a smart contract on the blockchain to store the order identifier and the hash value of at least one logistics document in a data structure corresponding to the import order, and linking the order identifier with the hash value of at least one logistics document.

[0250] At 1004, the computer system encrypts at least a portion of the first information to generate encrypted first data. In some cases, encrypting at least a portion of the first information includes encrypting at least a portion of the first information using an encryption key derived based on a linear secret sharing scheme.

[0251] In some cases, the encryption key is derived based on a linear secret sharing scheme through negotiation between at least two of the following: (i) a customs clearance agent platform managed by at least one customs clearance agent or broker that prepares information related to customs clearance on behalf of importers and submits it to the customs agency, (ii) a service platform, or (iii) a customs agency.

[0252] At 1006, the computer system sends the encrypted first data to the blockchain network to store the encrypted first data on a blockchain managed by the blockchain network, wherein the encrypted first data is stored on the blockchain through a consensus of blockchain nodes of the blockchain network.

[0253] In some cases, processing 1000 also includes: at the service platform, receiving second information related to the order, wherein the second information is provided or is to be provided to the service agency to request customs clearance for the goods included in the order; at the service platform, encrypting at least a portion of the second information to generate encrypted second data; sending the encrypted second data to the blockchain network to store the encrypted second data on the blockchain, wherein the encrypted second data is stored on the blockchain through the consensus of the blockchain nodes of the blockchain network; and linking the first data with the second data.

[0254] In some cases, linking the first data with the second data includes enabling a user to search for a logistics document by searching a data structure corresponding to the order for an order identifier and searching for a logistics transaction identifier linked to the order identifier.

[0255] In some cases, process 1000 also includes: at the service platform, providing an API to enable the service agency to search for an order identifier and a logistics transaction identifier linked to the order identifier.

[0256] In some cases, the first data includes order data, and processing 1000 also includes: receiving payment data related to the order at a service platform, wherein the payment data is provided to a service agency to request customs clearance for goods associated with the order; encrypting at least a portion of the payment data at the service platform to generate encrypted payment data; sending the encrypted payment data to a blockchain network to store the encrypted payment data on the blockchain, wherein the encrypted payment data is stored on the blockchain through a consensus of blockchain nodes of the blockchain network; wherein the payment data includes a payment transaction identifier of a payment document associated with the order, and linking the order data with the payment data includes calling a smart contract on the blockchain to store the order identifier and the payment transaction identifier in a data structure corresponding to the order, and linking the order identifier with the payment transaction identifier.

[0257] In some cases, the first data includes order data, and processing 1000 also includes: receiving payment data related to the order at the service platform, wherein the payment data is provided to the service agency to request customs clearance for the goods associated with the order; wherein the payment data includes a payment transaction identifier of a payment document associated with the order; encrypting at least a portion of the payment data at the service platform to generate encrypted payment data; sending the encrypted payment data to the blockchain network to store the encrypted payment data on the blockchain, wherein the encrypted payment data is stored on the blockchain through the consensus of the blockchain nodes of the blockchain network; wherein the method also includes: generating a hash value of at least one logistics document, and linking the order data with the payment data, including calling a smart contract on the blockchain to store the order identifier and the payment transaction identifier in a data structure corresponding to the order, and linking the order identifier with the payment transaction identifier.

[0258] In some cases, linking the order data with the payment data includes enabling a user to search for a payment document by searching a data structure corresponding to the order for an order identifier and for a payment transaction identifier linked to the order identifier.

[0259] In some cases, process 1000 also includes: at the service platform, providing an API to enable the service agency to search for the order identifier, and search for the logistics transaction identifier and the payment transaction identifier linked to the order identifier.

[0260] In some cases, the first data includes order data, the order data includes an order identifier of an order document associated with the order, the second data includes payment data, the payment data includes a payment transaction identifier of a payment document associated with the order, and linking the first data with the second data includes: calling a smart contract on the blockchain to store the order identifier and the payment transaction identifier in a data structure corresponding to the order, and linking the order identifier with the payment transaction identifier.

[0261] In some cases, linking the first data with the second data includes enabling a user to search for a payment document by searching a data structure corresponding to the order for an order identifier and searching for a payment transaction identifier linked to the order identifier.

[0262] In some cases, process 1000 also includes: at the service platform, providing an API to enable the service organization to search for the order identifier and search for the payment transaction identifier linked to the order identifier.

[0263] In some cases, process 1000 also includes: at the service platform, providing an API to enable the service organization to search the first data, and search for second data linked to the first data.

[0264] In some cases, the first information includes order data, and the order data includes information about at least one of: (i) an identification of an importer associated with the order, (ii) the name of the importer, (iii) contact information of the importer, (iv) the goods to be imported according to the order, (v) the quantity of the goods ordered, (vi) the price of the goods to be imported, (vii) the currency type, or (viii) the merchant selling the goods.

[0265] In some cases, the first information includes logistics data, which includes information about at least one of the following: (i) overseas delivery tracking number, (ii) overseas delivery service company name, (iii) domestic delivery tracking number, (iv) domestic delivery service company name, (v) customs brokerage company name, (vi) waybill number, (vii) package weight, (viii) delivery address, (ix) recipient identification, (x) sender company name or (xi) sender address.

[0266] In some cases, the first information includes payment data, which includes information about at least one of the following: (i) a payment transaction identifier, (ii) an order number, (iii) an identifier of the payee, (iv) a name of the payee, (v) an actual total payment, (vi) a payment method, (vii) a payment time, (viii) a payment currency, (ix) an identifier of the payee, (x) a name of the payee, or (xi) contact information of the payee.

[0267] In some cases, the information is provided by a customs clearance agent platform managed by at least one customs clearance agent or broker that prepares customs clearance-related information on behalf of the importer and submits it to the service organization.

[0268] In some cases, process 1000 also includes generating one or more zero-knowledge proofs (ZKPs) associated with one or more values ​​associated with the order. In some cases, the first data includes order data and / or payment data, and generating the one or more zero-knowledge proofs includes generating one or more zero-knowledge proofs associated with one or more values ​​associated with the order data and / or payment data.

[0269] In some cases, at least one of the one or more zero-knowledge proofs is generated based on homomorphic encryption. In some cases, the one or more zero-knowledge proofs include a range proof and / or a zero test. In some cases, process 1000 also includes: at a blockchain node of the blockchain network, verifying the one or more zero-knowledge proofs, and performing consensus based on the encrypted information after the one or more zero-knowledge proofs are verified, and storing the encrypted information in the blockchain after the consensus is successfully performed.

[0270] In some cases, process 1000 also includes: at the service platform, receiving updated first information related to the order, encrypting the updated first information to generate encrypted updated first information, and sending the encrypted updated first information to the blockchain network to store the encrypted updated first information on the blockchain.

[0271] In some cases, the updated first information includes updated order data. In some cases, process 1000 also includes: receiving updated second information related to the order at the service platform, encrypting the updated second information to generate encrypted updated second information, and sending the encrypted updated second information to the blockchain network to store the encrypted updated second information on the blockchain, wherein the updated second information includes (i) updated logistics data and / or (ii) updated payment data.

[0272] In some cases, encrypting at least a portion of the first information includes encrypting at least a portion of the first information using an encryption key, and processing 1000 also includes: sharing the encryption key with a service agency, and after the encrypted first data is stored on the blockchain, notifying the service agency that the encrypted first data has been stored on the blockchain.

[0273] In some cases, process 1000 also includes: at the service platform, providing an API to enable a user of the service platform to request that the first information be recorded on the blockchain.

[0274] In some cases, providing the API includes providing the API to enable a user of the service platform to request that at least one of (i) order data, (ii) logistics data, or (iii) payment data be recorded on the blockchain.

[0275] In some cases, providing the API includes providing the API to enable a user of the service platform to request that at least one of (i) updated order data, (ii) updated logistics data, or (iii) updated payment data be recorded on the blockchain.

[0276] In some cases, providing the API includes providing the API to enable the service organization to search data associated with the order and stored on the blockchain.

[0277] In some cases, process 1000 also includes: generating a digital signature of the service platform, and adding the digital signature of the service platform to the encrypted first data to generate digitally signed encrypted first data, wherein sending the encrypted first data to the blockchain network includes: sending the digitally signed encrypted first data to the blockchain network to store the digitally signed encrypted first data on the blockchain.

[0278] In some cases, the service platform includes: multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to process data related to orders associated with the import of goods, wherein the data includes information provided or to be provided to a customs agency to request customs clearance for the order, and a rules database, the rules database including information related to rules for processing customs clearance data of multiple countries; wherein, at the service platform, upon receiving first customs clearance data for a first order associated with the import of goods into a first country, the service module processes the first customs clearance data based on information in the rules database that complies with the rules of the first country, and, at the service platform, upon receiving second customs clearance data for a second order associated with the import of goods into a second country different from the first country, the service module processes the second customs clearance data based on information in the rules database that complies with the rules of the second country.

[0279] In some cases, a first API among the multiple APIs enables a first user located in a first country to call a first smart contract to store first customs clearance data in a first blockchain database and / or a first smart contract data cache in accordance with the rules of the first country, wherein the first API also enables a second user located in a second country to call a second smart contract to store second customs clearance data in a second blockchain database and / or a second smart contract data cache in accordance with the rules of the second country.

[0280] In some cases, the first smart contract is configured to store the immutable portion of the first customs clearance data in the first blockchain database in accordance with the rules of the first country and store the variable portion of the first customs clearance data in the first smart contract data cache, and the second smart contract is configured to store the immutable portion of the second customs clearance data in the second blockchain database in accordance with the rules of the second country and store the variable portion of the second customs clearance data in the second smart contract data cache.

[0281] In some cases, a second API among the plurality of APIs enables a third user located in the first country to invoke a third smart contract executed on the first blockchain to request that the first member be added to or removed from an authorized member list, members of the authorized member list being authorized to access the first data based on information in a rules database that complies with the rules of the first country, and the second API enables a fourth user located in the first country to invoke the third smart contract executed on the first blockchain to request that a second member be added to or removed from an authorized member list, members of the authorized member list being authorized to access the second data based on information in the rules database that complies with the rules of the second country.

[0282] In some cases, the customs clearance platform includes: multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to process customs clearance data related to purchase orders associated with commodity purchases, and a rule database, the rule database including information about rules for processing customs clearance data, the information including rules specifying fees or donation amounts to be charged for specified commodity categories; wherein, at the customs clearance platform, the service module is configured to, upon receiving customs clearance data associated with a purchase order, store at least a portion of the customs clearance data in a blockchain and / or smart contract data cache, and process the customs clearance data based on the information in the rule database to determine the fees or donation amounts to be charged for the purchase order.

[0283] In some cases, a first API of the plurality of APIs may enable an administrator to create a new rule for the rule database or modify an existing rule in the rule database. In some cases, the customs clearance platform is configured to call a smart contract to store an immutable portion of the customs clearance data in a blockchain database and to store a mutable portion of the customs clearance data in a smart contract data cache.

[0284] In some cases, the order is an import order, the first information is first import customs clearance information, the encrypted first data is encrypted first import customs clearance data, and the service agency is a customs agency that performs customs clearance for the goods included in the order.

[0285] Fig.11 1 is a diagram of an example of a module of an apparatus 1100 according to an embodiment of the present invention. The apparatus 1100 may be an example of an embodiment of a computer system configured to register documents for customs clearance based on blockchain technology. The apparatus 1100 may correspond to the above-mentioned embodiment, and the apparatus 1100 includes the following: a receiving module 1102 for receiving first information related to an order, wherein the first information is provided or to be provided to a service agency to request customs clearance of the goods included in the order; an encryption module 1104 for encrypting at least a portion of the first information to generate encrypted first data; a sending module 1106 for sending the encrypted first data to a blockchain network to store the encrypted first data on a blockchain managed by the blockchain network, wherein the encrypted first data is stored on the blockchain through the consensus of the blockchain nodes of the blockchain network.

[0286] In an optional embodiment, the device 1100 is also used to: receive second information related to the order at a service platform, wherein the second information is provided or is to be provided to a service agency to request customs clearance for the goods included in the order; encrypt at least a portion of the second information at the service platform to generate encrypted second data; send the encrypted second data to the blockchain network to store the encrypted second data on the blockchain, wherein the encrypted second data is stored on the blockchain through the consensus of the blockchain nodes of the blockchain network; and link the first data with the second data.

[0287] In an optional embodiment, the first data includes order data, the order data includes an order identifier of an order document associated with the import order, the second data includes logistics data, the logistics data includes a logistics transaction identifier of a logistics document associated with the import order, and linking the first data with the second data includes: calling a smart contract on the blockchain to store the order identifier and the logistics transaction identifier in a data structure corresponding to the import order, and linking the order identifier with the logistics transaction identifier.

[0288] In an optional embodiment, the first data includes order data, the order data includes an order identification of an order document associated with the import order, and the second data includes logistics data, the logistics data includes at least one logistics document, wherein the device 1100 is also used to: generate a hash value of at least one logistics document, and wherein linking the first data with the second data includes: calling a smart contract on the blockchain to store the order identification and the hash value of at least one logistics document in a data structure corresponding to the import order, and linking the order identification with the hash value of at least one logistics document.

[0289] In an optional embodiment, linking the first data with the second data includes: enabling a user to search for a logistics document by searching for an order identifier in a data structure corresponding to the order and searching for a logistics transaction identifier linked to the order identifier.

[0290] In an optional embodiment, the device 1100 is also used to: provide an API at the service platform to enable the service agency to search for the order identifier and search for the logistics transaction identifier linked to the order identifier.

[0291] In an optional embodiment, the first data includes order data, and the device 1100 is further used to: receive payment data related to the order at a service platform, wherein the payment data is provided to a service agency to request customs clearance for goods associated with the order; encrypt at least a portion of the payment data at the service platform to generate encrypted payment data; send the encrypted payment data to a blockchain network to store the encrypted payment data on the blockchain, wherein the encrypted payment data is stored on the blockchain through the consensus of blockchain nodes of the blockchain network; wherein the payment data includes a payment transaction identifier of a payment document associated with the order, and linking the order data with the payment data, including calling a smart contract on the blockchain to store the order identifier and the payment transaction identifier in a data structure corresponding to the order, and linking the order identifier with the payment transaction identifier.

[0292] In an optional embodiment, the first data includes order data, and the device 1100 is also used to: receive payment data related to the order at a service platform, wherein the payment data is provided to a service agency to request customs clearance for goods associated with the order; wherein the payment data includes a payment transaction identifier of a payment document associated with the order; at the service platform, encrypt at least a portion of the payment data to generate encrypted payment data; send the encrypted payment data to a blockchain network to store the encrypted payment data on the blockchain, wherein the encrypted payment data is stored on the blockchain through a consensus of blockchain nodes of the blockchain network; wherein the method further includes: generating a hash value of at least one logistics document, and linking the order data with the payment data, including calling a smart contract on the blockchain to store the order identifier and the payment transaction identifier in a data structure corresponding to the order, and linking the order identifier with the payment transaction identifier.

[0293] In an optional embodiment, linking the order data with the payment data includes enabling a user to search for a payment document by searching a data structure corresponding to the order for an order identifier and for a payment transaction identifier linked to the order identifier.

[0294] In an optional embodiment, the device 1100 is also used to: provide an API at the service platform to enable the service agency to search for the order identifier, and search for the logistics transaction identifier and payment transaction identifier linked to the order identifier.

[0295] In an optional embodiment, the first data includes order data, the order data includes an order identifier of an order document associated with the order, the second data includes payment data, the payment data includes a payment transaction identifier of a payment document associated with the order, and linking the first data with the second data includes: calling a smart contract on the blockchain to store the order identifier and the payment transaction identifier in a data structure corresponding to the order, and linking the order identifier with the payment transaction identifier.

[0296] In an optional embodiment, linking the first data with the second data includes enabling a user to search for a payment document by searching a data structure corresponding to the order for an order identifier and searching for a payment transaction identifier linked to the order identifier.

[0297] In an optional embodiment, the apparatus 1100 is further configured to: provide an API at the service platform to enable the service organization to search for an order identifier and a payment transaction identifier linked to the order identifier.

[0298] In an optional embodiment, the apparatus 1100 is further configured to: provide an API at a service platform to enable a service agency to search for first data and second data linked to the first data.

[0299] In an optional embodiment, the first information includes order data, and the order data includes information about at least one of the following: (i) an identification of an importer associated with the order, (ii) the name of the importer, (iii) contact information of the importer, (iv) the goods to be imported according to the order, (v) the quantity of the goods ordered, (vi) the price of the goods to be imported, (vii) the currency type, or (viii) the merchant selling the goods.

[0300] In an optional embodiment, the first information includes logistics data, which includes information about at least one of the following: (i) overseas delivery tracking number, (ii) overseas delivery service company name, (iii) domestic delivery tracking number, (iv) domestic delivery service company name, (v) customs brokerage company name, (vi) waybill number, (vii) package weight, (viii) delivery address, (ix) recipient identification, (x) sender company name or (xi) sender address.

[0301] In an optional embodiment, the first information includes payment data, which includes information about at least one of the following: (i) a payment transaction identifier, (ii) an order number, (iii) an identifier of the payee, (iv) a name of the payee, (v) an actual total payment, (vi) a payment method, (vii) a payment time, (viii) a payment currency, (ix) an identifier of the payee, (x) a name of the payee, or (xi) contact information of the payee.

[0302] In an alternative embodiment, the information is provided by a customs clearance agent platform managed by at least one customs clearance agent or broker that prepares and submits customs clearance related information to the customs agency on behalf of the importer.

[0303] In an optional embodiment, encrypting at least a portion of the first information includes: encrypting at least a portion of the first information using an encryption key derived based on a linear secret sharing scheme.

[0304] In an optional embodiment, the encryption key is derived based on a linear secret sharing scheme through negotiation between at least two of the following: (i) a customs clearance agent platform managed by at least one customs clearance agent or broker who prepares information related to customs clearance on behalf of importers and submits it to the customs agency, (ii) a service platform or (iii) a service agency.

[0305] In an optional embodiment, the apparatus 1100 is further configured to: generate one or more zero-knowledge proofs related to one or more values ​​associated with the order.

[0306] In an optional embodiment, the first data includes order data and / or payment data, and generating one or more zero-knowledge proofs includes generating one or more zero-knowledge proofs related to one or more values ​​associated with the order data and / or payment data.

[0307] In an optional embodiment, at least one of the one or more zero-knowledge proofs is generated based on homomorphic encryption. In an optional embodiment, the one or more zero-knowledge proofs include a range proof and / or a zero test. In an optional embodiment, the apparatus 1100 is further used to: at a blockchain node of a blockchain network, verify the one or more zero-knowledge proofs, and perform consensus based on the encrypted information after the one or more zero-knowledge proofs are verified, and store the encrypted information in the blockchain after the consensus is successfully performed.

[0308] In an optional embodiment, the device 1100 is also used to: receive updated first information related to the order at the service platform, encrypt the updated first information to generate encrypted updated first information, and send the encrypted updated first information to the blockchain network to store the encrypted updated first information on the blockchain.

[0309] In an optional embodiment, the updated first information includes updated order data. In an optional embodiment, the device 1100 is further used to: receive updated second information related to the order at the service platform, encrypt the updated second information to generate encrypted updated second information, and send the encrypted updated second information to the blockchain network to store the encrypted updated second information on the blockchain, wherein the updated second information includes (i) updated logistics data and / or (ii) updated payment data.

[0310] In an optional embodiment, encrypting at least a portion of the first information includes encrypting at least a portion of the first information using an encryption key, and the device 1100 is further used to: share the encryption key with a service agency, and after the encrypted first data is stored on the blockchain, notify the service agency that the encrypted first data has been stored on the blockchain.

[0311] In an optional embodiment, the device 1100 is further used to: at the service platform, provide an API to enable users of the service platform to request that the first information be recorded on the blockchain.

[0312] In an optional embodiment, providing the API includes providing the API to enable users of the service platform to request that at least one of (i) order data, (ii) logistics data, or (iii) payment data be recorded on the blockchain.

[0313] In an optional embodiment, providing the API includes providing the API to enable users of the service platform to request that at least one of (i) updated order data, (ii) updated logistics data, or (iii) updated payment data be recorded on the blockchain.

[0314] In an optional embodiment, providing the API includes providing the API to enable the service organization to search data associated with the order and stored on the blockchain.

[0315] In an optional embodiment, the device 1100 is also used to: generate a digital signature of the service platform, and add the digital signature of the service platform to the encrypted first data to generate digitally signed encrypted first data, wherein sending the encrypted first data to the blockchain network includes: sending the digitally signed encrypted first data to the blockchain network to store the digitally signed encrypted first data on the blockchain.

[0316] In an optional embodiment, the order is an import order, the first information is first import customs clearance information, the encrypted first data is encrypted first import customs clearance data, and the service agency is a customs agency that performs customs clearance for the goods included in the order.

[0317] Fig.12 1 is a flowchart of another example of a process 1200 according to an embodiment of the present invention. For convenience, the process 1200 will be described as being performed by a computer system, which may include a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, such as Figure 4 Process 1200 may be performed by a suitably programmed computer system within computer system 400 .

[0318] At 1202, a computer system receives a first request to authorize a first member to access information related to a first order, wherein the information is provided to a service organization to request customs clearance for the first order, and the first request is sent from an administrator. In some cases, the information includes at least one of order data, logistics data, or payment data associated with the first order.

[0319] At 1204, the computer system calls a smart contract executed on a blockchain to request that the first member be added to a list of authorized members authorized to access information related to the first order, wherein the smart contract is configured to maintain a data structure storing information about the authorized members and the blockchain stores the information related to the first order or a processed version of the information related to the first order.

[0320] At 1206, the computer system receives confirmation from the smart contract that the first member has been added to the authorized members list.

[0321] At 1208, the computer system sends a confirmation to the administrator that the first member has been added to the authorized members list.

[0322] In some cases, processing 1200 also includes: at the service platform, receiving a third request from the first member to record or update information related to the first order, determining whether the first member is one of the authorized members authorized to access information related to the first order; after confirming that the first member is an authorized member, recording or updating the information related to the first order according to the third request.

[0323] In some cases, determining whether the first member is one of the authorized members includes invoking a smart contract executed on a blockchain to determine whether the first member is one of the authorized members based on information stored in a data structure.

[0324] In some cases, processing 1200 also includes: at the service platform, receiving a third request from a second member to record or update information related to the first order, determining whether the second member is one of the authorized members authorized to access information related to the first order; after confirming that the second member is not an authorized member, rejecting the third request from the second member.

[0325] In some cases, process 1200 also includes providing a first API to enable an administrator to add a new member to a list of authorized members authorized to access information related to the order.

[0326] In some cases, process 1200 also includes providing an API to enable an administrator to remove a new member from a list of authorized members authorized to access information related to the order.

[0327] In some cases, process 1200 also includes providing an API to enable an administrator to set permission levels for members authorized to access order-related information, and storing information about permission levels in a data structure storing information about a list of authorized members authorized to access order-related information.

[0328] In some cases, process 1200 also includes providing an API to enable an administrator to update information for members authorized to access order-related information, and storing the updated information for the member in a data structure storing information about a list of authorized members authorized to access order-related information.

[0329] In some cases, processing 1200 also includes: receiving, at the service platform, a first request from the first user to record or update information related to the first order, wherein the information includes information provided or to be provided to the service agency to request customs clearance for the first order; determining whether the first user is one of the authorized members authorized to record or update information related to the first order; and after confirming that the first user is an authorized member, recording or updating the information related to the first order according to the first request.

[0330] In some cases, determining whether the first user is one of the authorized members includes invoking a smart contract executed on a blockchain to determine whether the first user is one of the authorized members based on information stored in a data structure maintained by the smart contract.

[0331] In some cases, processing 1200 also includes: receiving, at the service platform, a second request from the first user to record or update information related to the second order, wherein the information includes information provided or to be provided to the service agency to request customs clearance for the second order; determining whether the first user is one of the authorized members authorized to access information related to the second order; and after determining that the first user is not authorized to access information related to the second order, rejecting the second request from the first user.

[0332] In some cases, the order is an import order, the first information is first import customs clearance information, the encrypted first data is encrypted first import customs clearance data, and the service agency is a customs agency that performs customs clearance for the goods included in the order.

[0333] Fig.13 1300 is a diagram of another example of a module of the device 1300 according to an embodiment of the present invention. The device 1300 may be an example of an embodiment of a computer system. The device 1300 may correspond to the above-mentioned embodiment, and the device 1300 includes the following: a receiving module 1302, for receiving a first request to authorize a first member to access information related to a first order, wherein the information is provided to a service agency to request customs clearance for the first order, and the first request is sent from an administrator; a calling module 1304, for calling a smart contract executed on a blockchain to request that the first member be added to a list of authorized members authorized to access information related to the first order, wherein the smart contract is configured to maintain a data structure storing information about authorized members, and the blockchain stores information related to the first order or a processed version of the information related to the first order; a receiving module 1302, for receiving a confirmation from the smart contract that the first member has been added to the list of authorized members; and a sending module 1306, for sending a confirmation to the administrator that the first member has been added to the list of authorized members.

[0334] In an optional embodiment, device 1300 is also used to: at the service platform, receive a third request from the first member to record or update information related to the first order, determine whether the first member is one of the authorized members authorized to access the information related to the first order; after confirming that the first member is an authorized member, record or update the information related to the first order according to the third request.

[0335] In an optional embodiment, determining whether the first member is one of the authorized members includes: invoking a smart contract executed on the blockchain to determine whether the first member is one of the authorized members based on information stored in a data structure.

[0336] In an optional embodiment, device 1300 is also used to: receive, at the service platform, a third request from a second member to record or update information related to the first order, determine whether the second member is one of the authorized members authorized to access information related to the first order; and after confirming that the second member is not an authorized member, reject the third request from the second member.

[0337] In an optional embodiment, the apparatus 1300 is further configured to: provide a first API to enable an administrator to add a new member to a list of authorized members who are authorized to access information related to an order.

[0338] In an optional embodiment, the apparatus 1300 is further configured to provide an API to enable an administrator to remove a new member from a list of authorized members who are authorized to access order-related information.

[0339] In an optional embodiment, device 1300 is also used to: provide an API to enable an administrator to set permission levels for members authorized to access order-related information, and store information about permission levels in a data structure that stores information about a list of authorized members authorized to access order-related information.

[0340] In an optional embodiment, device 1300 is also used to: provide an API to enable an administrator to update information for members authorized to access order-related information, and store the updated information for the member in a data structure that stores information about a list of authorized members authorized to access order-related information.

[0341] In an optional embodiment, the information includes at least one of order data, logistics data, or payment data associated with the first order. In an optional embodiment, the device 1300 is also used to: receive, at the service platform, a first request from the first user to record or update information related to the first order, wherein the information includes information provided or to be provided to the service agency to request customs clearance for the first order; determine whether the first user is one of the authorized members authorized to record or update information related to the first order; and after confirming that the first user is an authorized member, record or update the information related to the first order according to the first request.

[0342] In an optional embodiment, determining whether the first user is one of the authorized members includes: invoking a smart contract executed on the blockchain to determine whether the first user is one of the authorized members based on information stored in a data structure maintained by the smart contract.

[0343] In an optional embodiment, device 1300 is also used to: receive, at the service platform, a second request from the first user to record or update information related to the second order, wherein the information includes information provided or to be provided to the service agency to request customs clearance for the second order; determine whether the first user is one of the authorized members authorized to access the information related to the second order; and after determining that the first user is not authorized to access the information related to the second order, reject the second request from the first user.

[0344] In an optional embodiment, the order is an import order, the first information is first import customs clearance information, the encrypted first data is encrypted first import customs clearance data, and the service agency is a customs agency that performs customs clearance for the goods included in the order.

[0345] Fig.14 1400 is a flowchart of another example of a process 1400 according to an embodiment of the present invention. For convenience, the process 1400 will be described as being performed by a computer system including a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, such as Figure 4 Process 1400 may be performed by an appropriately programmed computer system within computer system 400 .

[0346] At 1402, a computer system provides a first API configured to register a specified smart contract on a blockchain managed by a specified blockchain network.

[0347] At 1404, the computer system receives a first call to a first API from a first user to request registration of a first smart contract on a first blockchain managed by a first blockchain network. In some cases, the first smart contract is configured to record at least one of order data, logistics data, or payment data on the first blockchain, wherein the order data, logistics data, or payment data is associated with an order for imported goods.

[0348] In some cases, the first smart contract is configured to record at least one of updated order data, updated logistics data, or updated payment data on the first blockchain, wherein the updated order data, the updated logistics data, or the updated payment data is associated with an order for imported goods.

[0349] At 1406, the computer system sends a request to register a first smart contract to the first blockchain network.

[0350] At 1408, the computer system receives a confirmation message from the first blockchain network at the service platform that the first smart contract has been successfully registered on the first blockchain.

[0351] At 1410, the computer system sends a confirmation message from the service platform to the first user that the first smart contract has been successfully registered on the first blockchain.

[0352] In some cases, the order is an import order, the first information is first import customs clearance information, the encrypted first data is encrypted first import customs clearance data, and the service agency is a customs agency that performs customs clearance for the goods included in the order.

[0353] Fig.15 1 is a diagram of another example of a module of an apparatus 1500 according to an embodiment of the present invention. Apparatus 1500 may be an example of an embodiment of a blockchain. Apparatus 1500 may correspond to the above-mentioned embodiment, and apparatus 1500 includes the following: a service platform 1502, which includes a plurality of service modules 1504 and an API layer, the API layer including a plurality of APIs 1506, so that a user can call a service module to process information related to an order associated with the import of goods, wherein the information includes information provided or to be provided to a service agency to request customs clearance for the order, wherein a first API of the plurality of APIs can enable a user of the service platform to call a smart contract on a blockchain managed by a blockchain network, wherein the smart contract processes the information and / or processes information related to another user of the service platform.

[0354] In an optional embodiment, the first API enables a user to invoke a smart contract to store data on the first blockchain through consensus of blockchain nodes of the blockchain network, wherein the data is associated with an order.

[0355] In an optional embodiment, the first API enables a user to call a smart contract to store data in a smart contract data cache, wherein the data is associated with an order.

[0356] In an optional embodiment, the first API enables a user to call a smart contract to store an immutable portion of the customs clearance data in the first blockchain through a consensus of blockchain nodes of the blockchain network, and store a mutable portion of the customs clearance data in a smart contract data cache, wherein the customs clearance data is associated with an order.

[0357] In an optional embodiment, the customs clearance data includes at least one of order data, logistics data, payment data, updated order data, updated logistics data, or updated payment data.

[0358] In an optional embodiment, the customs clearance data includes at least one of encrypted order data, encrypted logistics data, encrypted payment data, encrypted updated order data, encrypted updated logistics data, or encrypted updated payment data.

[0359] In an optional embodiment, the first API enables an administrator to call a smart contract to record information about users of the service platform in the first blockchain through a consensus of blockchain nodes of the blockchain network.

[0360] In an optional embodiment, the first API enables an administrator to call a smart contract to record information about users of the service platform in a smart contract data cache.

[0361] In an optional embodiment, the first API enables the administrator to call the smart contract to record the immutable portion of the information about the user of the service platform in the first blockchain through the consensus of the blockchain nodes of the blockchain network, and record the mutable portion of the information about the user of the service platform in the smart contract data cache.

[0362] In an optional embodiment, the information about the user of the service platform includes at least one of the following: (i) information indicating that the user has been added to a list of members authorized to use the service platform, (ii) information indicating that the user has been removed from a list of members authorized to use the service platform, (iii) information indicating that the user has been added to a list of members authorized to use a specific function of the service platform, or (iv) information indicating that the user has been removed from a list of members authorized to use a specific function of the service platform.

[0363] In an optional embodiment, the information about the user of the service platform includes at least one of the following: (i) information indicating that the user has been added to a list of members authorized to access customs clearance data associated with a specific order or (ii) information indicating that the user has been removed from a list of members authorized to access customs clearance data associated with a specific order.

[0364] In an optional embodiment, the information about the user of the service platform includes at least one of the following: (i) information indicating that the user has been added to a list of members authorized to access order data associated with a specific order, (ii) information indicating that the user has been removed from a list of members authorized to access order data associated with a specific order, (iii) information indicating that the user has been added to a list of members authorized to access logistics data associated with a specific order, (iv) information indicating that the user has been removed from a list of members authorized to access logistics data associated with a specific order, (v) information indicating that the user has been added to a list of members authorized to access payment data associated with a specific order, or (vi) information indicating that the user has been removed from a list of members authorized to access payment data associated with a specific order.

[0365] In an optional embodiment, the service platform includes multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to generate smart contracts, which are configured to process information related to orders associated with the import of goods, wherein the information includes information provided or to be provided to a service agency to request customs clearance for the order, wherein a first API among the multiple APIs enables a user of the service platform to call a smart contract generator including a customizable smart contract template, wherein the smart contract generator enables the user to generate a smart contract configured to process information.

[0366] In an optional embodiment, the smart contract generator includes customizable smart contract templates that enable a user to generate a smart contract configured to store information in a blockchain managed by a blockchain network.

[0367] In an optional embodiment, the smart contract generator includes a customizable smart contract template that enables a user to generate a smart contract that is configured to store information in a smart contract data cache.

[0368] In an optional embodiment, the smart contract generator includes a customizable smart contract template that enables a user to generate a smart contract that is configured to store an immutable portion of information in a blockchain managed by the blockchain network and to store a mutable portion of the information in a smart contract data cache.

[0369] In an optional embodiment, the information includes at least one of order data, logistics data, payment data, updated order data, updated logistics data, updated payment data, encrypted order data, encrypted logistics data, encrypted payment data, encrypted updated order data, encrypted updated logistics data, or encrypted updated payment data.

[0370] In an alternative embodiment, the plurality of APIs include an API for processing different types of documents related to import customs clearance. In an alternative embodiment, the plurality of APIs include an API for managing authorization levels given to users of the service platform for accessing information.

[0371] In an optional embodiment, the plurality of APIs includes an API for managing encryption of at least a portion of the information. In an optional embodiment, the plurality of APIs includes an API for managing the DIS service to selectively store customs clearance data in a smart contract data cache or a blockchain database.

[0372] In an optional embodiment, the plurality of APIs includes an API for managing the lifecycle of documents associated with import customs clearance.

[0373] In an optional embodiment, the plurality of APIs includes an API for managing a smart contract service, the smart contract service comprising at least one of: (i) generating a smart contract configured to process information, (ii) executing a smart contract for processing information, or (iii) generating a smart contract pool.

[0374] In an optional embodiment, the service platform is configured to provide a notification service to enable one or more blockchain nodes of the consortium blockchain network to send notifications or messages to at least one of: (i) the service platform or (ii) a user of the service platform.

[0375] In an optional embodiment, the notification or message includes at least one of: (i) an update of a document event or (ii) an update of a user event. In an optional embodiment, a service platform includes multiple service modules and an API layer, the API layer including multiple APIs to enable users to call service modules to process information related to orders associated with the import of goods, wherein the information includes information provided or to be provided to a service agency to request customs clearance for the order, and a first API of the multiple APIs enables a user of the service platform to deploy a smart contract to a blockchain managed by a blockchain network, and the smart contract is configured to process information associated with the blockchain.

[0376] In an optional embodiment, the service platform includes a smart contract generator, which includes a customizable smart contract template that can be used to generate a smart contract configured to process information associated with a blockchain.

[0377] In an optional embodiment, the first API enables a user to deploy a smart contract to a blockchain, wherein the smart contract is configured to record at least one of order data, logistics data, or payment data on the blockchain, and the order data, logistics data, or payment data is associated with an order for imported goods.

[0378] In an optional embodiment, the first API enables a user to deploy a smart contract to a blockchain, wherein the smart contract is configured to record at least one of updated order data, updated logistics data, or updated payment data on the blockchain, and the updated order data, updated logistics data, or updated payment data is associated with an order for imported goods.

[0379] In an optional embodiment, the order is an import order, the first information is first import customs clearance information, the encrypted first data is encrypted first import customs clearance data, and the service agency is a customs agency that performs customs clearance for the goods included in the order.

[0380] Fig.16 1600 is a flowchart of another example of a process 1600 according to an embodiment of the present invention. For convenience, the process 1600 will be described as being performed by a blockchain node, which includes a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, such as Figure 1 Process 1600 may be performed by a suitably programmed computer system of computer system 100 .

[0381] At 1602, the blockchain node receives data for customs clearance for storage, wherein the data includes variable data, immutable data, and index data identified by a service platform.

[0382] In some cases, the variable data is associated with a document for customs clearance, and the variable data includes one or more of a document type of the document, a document status of the document, and association information of the document with one or more other documents for customs clearance.

[0383] In some cases, the immutable data is associated with a document and includes an encrypted version of at least a portion of the content of the document encrypted by an encryption key associated with an owner of the document.

[0384] In some cases, the encryption key is derived based on a linear secret sharing scheme through negotiation between at least two of the following: (i) a customs clearance agent platform managed by at least one customs clearance agent or broker that prepares information related to customs clearance on behalf of importers and submits it to the customs agency, (ii) a service platform, or (iii) a customs agency.

[0385] In some cases, the index data is associated with a document and includes one or more of an ID of the document and a hash value of a plurality of blockchain transactions associated with the document.

[0386] In some cases, the data is associated with a purchase order and includes one or more of order data, logistics data, and payment data. In some cases, the address of the smart contract is stored on a blockchain in a database storage. In some cases, the immutable data is stored in a state Merkle tree data structure.

[0387] At 1604, the blockchain node stores the mutable data in a cache storage, wherein the mutable data is to be executed by the smart contract.

[0388] At 1606, the blockchain node initiates a consensus algorithm to record the immutable data on the blockchain. In some cases, the consensus algorithm is one of Pow, PoS, or PBFT.

[0389] At 1608, the blockchain node records the immutable data on the blockchain based on calling the smart contract, wherein the blockchain is stored in a database having a lower storage cost than cache storage.

[0390] At 1610, based on invoking the smart contract, the blockchain node links the mutable data and the immutable data based on the index data. In some cases, linking the mutable data and the immutable data based on the index data includes: storing the index data and the mutable data under a first data structure in the cache storage, and recording the index data and the immutable data under a second data structure in the blockchain.

[0391] In some cases, linking the mutable data and the immutable data based on the index data includes enabling a user to obtain the mutable data and the immutable data by searching the index data in the first data structure and the second data structure.

[0392] In some cases, process 1600 also includes providing, at the service platform, an API to enable a customs agency to search the index data to retrieve variable data and immutable data linked based on the index data.

[0393] Fig.17 1700 is a diagram of another example of a module of the device 1700 according to an embodiment of the present invention. The device 1700 may be an example of an embodiment of a blockchain node. The device 1700 may correspond to the above-mentioned embodiment, and the device 1700 includes: a receiving module 1702 for receiving data for customs clearance for storage, wherein the data includes variable data, immutable data, and index data identified by a service platform; a storage module 1704 for storing variable data in a cache storage, wherein the variable data will be executed by a smart contract; an initiating module 1706 for initiating a consensus algorithm to record immutable data on a blockchain; a recording module 1708 for recording immutable data on a blockchain based on calling a smart contract, wherein the blockchain is stored in a database having a lower storage cost than the cache storage; and a linking module 1710 for linking variable data and immutable data based on calling a smart contract and based on index data.

[0394] In an optional embodiment, the data is associated with a purchase order and includes one or more of order data, logistics data, and payment data. In an optional embodiment, the variable data is associated with a document for customs clearance, and the variable data includes one or more of a document type of the document, a document status of the document, and association information between the document and one or more other documents for customs clearance.

[0395] In an optional embodiment, the immutable data is associated with a document and includes an encrypted version of at least a portion of the contents of the document encrypted by an encryption key associated with an owner of the document.

[0396] In an optional embodiment, the index data is associated with the document and includes one or more of an ID of the document and hash values ​​of a plurality of blockchain transactions associated with the document.

[0397] In an optional embodiment, the encryption key is derived based on a linear secret sharing scheme through negotiation between at least two of the following: (i) a customs clearance agent platform managed by at least one customs clearance agent or broker who prepares information related to customs clearance on behalf of importers and submits it to the customs agency, (ii) a service platform or (iii) a customs agency.

[0398] In an optional embodiment, the consensus algorithm is one of Pow, PoS or PBFT. In an optional embodiment, linking the mutable data and the immutable data based on the index data includes: storing the index data and the mutable data under a first data structure in the cache storage, and recording the index data and the immutable data under a second data structure in the blockchain.

[0399] In an optional embodiment, linking the variable data and the immutable data based on the index data includes: enabling a user to obtain the variable data and the immutable data by searching the index data in the first data structure and the second data structure. In an optional embodiment, the device 1700 is also used to: at the service platform, provide an API to enable the customs agency to search the index data, thereby retrieving the variable data and the immutable data linked based on the index data. In an optional embodiment, the address of the smart contract is stored on the blockchain in the database storage. In an optional embodiment, the immutable data is stored in the data structure of the state Merkle tree.

[0400] Fig.18 1800 is a flowchart of another example of a process 1800 according to an embodiment of the present invention. For convenience, the process 1800 will be described as being performed by a blockchain node, which includes a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, such as Figure 4 Process 1800 may be performed by an appropriately programmed computer system within computer system 400 .

[0401] At 1802, a blockchain node receives an encryption key and data for customs clearance from a computing device associated with a user to store on a blockchain, wherein the data includes public data and private data, and the encryption key encrypts the private data. In some cases, the encryption key is a symmetric key, and the private data is in a ciphertext form encrypted using the symmetric key.

[0402] In some cases, the private data is in plain text, and the encryption key is a symmetric key, and process 1800 further includes: before calling the API, encrypting the private data using the symmetric key. In some cases, the user is a first user, the encryption key is a symmetric key encrypted by a public key of a second user, and the private data is encrypted by the symmetric key. In some cases, the data is associated with a purchase order and includes one or more of order data, logistics data, and payment data.

[0403] At 1804, the blockchain node stores the encryption key and the ID of the data in a cache storage dedicated to storing smart contract data for executing the smart contract.

[0404] At 1806, the blockchain node calls an API to enable the blockchain node to initiate a consensus algorithm to record the data and the ID of the data on the blockchain.

[0405] In some cases, the ID of the data is a hash value of the data or an ID of a document associated with the data.

[0406] In some cases, processing 1800 also includes: receiving a list of one or more other users who are allowed to access the plain text of the private data from a computing device associated with the user; encrypting the encryption key using the respective public keys of the one or more other users to generate an encrypted encryption key; and storing the encrypted encryption key in a cache storage.

[0407] In some cases, process 1800 also includes: providing an API to enable the first user or the second user to perform the following operations: retrieving the encryption key from the cache storage and retrieving the private data from the blockchain; retrieving the symmetric key by decrypting the encryption key using the private key corresponding to the public key; and decrypting the private data using the symmetric key.

[0408] In some cases, process 1800 also includes providing an API to enable the first user or the second user to retrieve the public data from the blockchain and the private data from the cache storage based on the ID of the data to restore the data.

[0409] In some cases, the API also enables the first user to record an updated version of the data associated with the ID of the data on the blockchain, and disables the second user from recording an updated version of the data associated with the ID of the data on the blockchain.

[0410] In some cases, the encryption key is derived based on a linear secret sharing scheme through negotiation between at least two of the following: (i) a customs clearance agent platform managed by at least one customs clearance agent or broker that prepares information related to customs clearance on behalf of importers and submits it to the customs agency, (ii) a service platform, or (iii) a customs agency.

[0411] In some cases, the consensus algorithm is one of Pow, PoS, or PBFT. In some cases, the address of the smart contract is stored on the blockchain in the database storage.

[0412] In some cases, process 1800 also includes: generating one or more zero-knowledge proofs related to one or more values ​​associated with the private data. In some cases, the data includes at least one of order data or payment data, and the zero-knowledge proof is related to one or more values ​​associated with at least one of the order data or payment data. In some cases, at least one of the one or more zero-knowledge proofs is generated based on homomorphic encryption and is at least one of a range proof or a zero test, and wherein the consensus algorithm is performed after verifying the one or more zero-knowledge proofs.

[0413] Fig.19 1 is a diagram of another example of a module of the device 1900 according to an embodiment of the present invention. The device 1900 may be an example of an embodiment of a computer system. The device 1900 may correspond to the above-mentioned embodiment, and the device 1900 includes the following: a receiving module 1902, which is used to receive an encryption key and data for customs clearance from a computing device associated with a user to be stored on a blockchain, wherein the data includes public data and private data, and the encryption key encrypts the private data; a storage module 1904, which is used to store the encryption key and the ID of the data in a cache storage, which is dedicated to storing smart contract data for executing smart contracts; and a calling module 1906, which is used to call an API to enable a blockchain node to initiate a consensus algorithm to record the data and the ID of the data on the blockchain.

[0414] In an alternative embodiment, the encryption key is a symmetric key, and the private data is in ciphertext form encrypted using the symmetric key.

[0415] In an optional embodiment, the private data is in plain text, and the encryption key is a symmetric key, and the device 1900 is further used to: encrypt the private data using the symmetric key before calling the API.

[0416] In an optional embodiment, device 1900 is also used to: receive a list of one or more other users who are allowed to access the plain text of private data from a computing device associated with the user; encrypt the encryption key using the respective public keys of the one or more other users to generate an encrypted encryption key; and store the encrypted encryption key in a cache storage.

[0417] In an optional embodiment, the user is a first user, the encryption key is a symmetric key encrypted by a public key of a second user, and the private data is encrypted by the symmetric key.

[0418] In an optional embodiment, device 1900 is also used to: provide an API to enable the first user or the second user to perform the following operations: retrieve an encryption key from the cache storage and retrieve private data from the blockchain; retrieve a symmetric key by decrypting the encryption key using a private key corresponding to the public key; and decrypt the private data using the symmetric key.

[0419] In an optional embodiment, the device 1900 is further used to: provide an API to enable the first user or the second user to retrieve public data from the blockchain and retrieve private data from the cache storage based on the ID of the data to restore the data.

[0420] In an alternative embodiment, the ID of the data is a hash value of the data or an ID of a document associated with the data.

[0421] In an optional embodiment, the API also enables the first user to record an updated version of the data associated with the ID of the data on the blockchain, and prevents the second user from recording an updated version of the data associated with the ID of the data on the blockchain.

[0422] In an optional embodiment, the data is associated with a purchase order and includes one or more of order data, logistics data, and payment data.

[0423] In an optional embodiment, the encryption key is derived based on a linear secret sharing scheme through negotiation between at least two of the following: (i) a customs clearance agent platform managed by at least one customs clearance agent or broker who prepares information related to customs clearance on behalf of importers and submits it to the customs agency, (ii) a service platform or (iii) a customs agency.

[0424] In an optional embodiment, the consensus algorithm is one of Pow, PoS or PBFT.

[0425] In an optional embodiment, the address of the smart contract is stored on the blockchain in the database storage.

[0426] In an optional embodiment, the apparatus 1900 is further configured to: generate one or more zero-knowledge proofs related to one or more values ​​associated with the private data.

[0427] In an optional embodiment, the data includes at least one of order data or payment data, and the zero-knowledge proof is related to one or more values ​​associated with at least one of the order data or the payment data.

[0428] In an optional embodiment, at least one of the one or more zero-knowledge proofs is generated based on homomorphic encryption and is at least one of a range proof or a zero test, and wherein the consensus algorithm is performed after verifying the one or more zero-knowledge proofs.

[0429] Fig. 20 2000 is a flowchart of another example of a process 2000 according to an embodiment of the present invention. For convenience, the process 2000 will be described as being performed by a blockchain node, which includes a system of one or more computers located in one or more locations and appropriately programmed according to the present invention. For example, Figure 4 Process 2000 may be performed by a suitably programmed computer system of computer system 400 .

[0430] At 2002, the blockchain node determines that data stored in the cache storage satisfies a predetermined condition. In some cases, the data is variable data included in a document for customs clearance, and the data includes one or more of a document type of the document, a document status of the document, and association information of the document with one or more other documents for customs clearance.

[0431] In some cases, the document is one of an order document, a logistics document, or a payment document, and wherein the document includes variable data, immutable data, and index data, wherein the immutable data includes an encrypted version of at least a portion of the content of the document encrypted by an encryption key associated with an owner of the document, and the index data includes an identifier of the document and one or more hash values ​​of multiple blockchain transactions associated with the document.

[0432] In some cases, the predetermined condition is satisfied if the volume of data stored in the cache storage exceeds a predetermined threshold. In some cases, the blockchain includes multiple smart contract pools, and process 2000 also includes: calling an API to enable the blockchain node to initiate a consensus algorithm to record at least a portion of the data exceeding the predetermined threshold in a polling manner to the multiple smart contract pools.

[0433] In some cases, the predetermined condition is satisfied if at least a portion of the data is received within a predetermined time period and the at least a portion of the data is different from the rest of the data.

[0434] In some cases, the blockchain includes multiple smart contract pools created within the predetermined time period, and process 2000 also includes: calling an API to enable the blockchain node to initiate a consensus algorithm to record at least a portion of the data into the multiple smart contract pools.

[0435] At 2004, the blockchain node adds the blockchain address of the second smart contract to a configuration file, wherein the configuration file includes a plurality of addresses corresponding to a plurality of smart contracts stored on the blockchain. In some cases, the configuration file is executed in response to restarting the computing device.

[0436] In 2006, the blockchain node calls the virtual machine to execute the configuration file, wherein the execution of the configuration file initiates a consensus algorithm to generate a second smart contract at the blockchain address, and generates a corresponding smart contract pool on the blockchain for storing at least a portion of the data, and the smart contract pool is a data structure to be stored on the blockchain.

[0437] In some cases, the blockchain includes multiple smart contract pools, and processing 2000 also includes: calling an API to enable the blockchain node to initiate a consensus algorithm, thereby recording at least a portion of the data exceeding a predetermined threshold into the multiple smart contract pools based on the ID of the data and the IDs of the multiple smart contract pools.

[0438] In some cases, the at least a portion of the data is associated with a plurality of documents for customs clearance, and process 2000 further includes associating a document ID of each of the plurality of documents with corresponding data in the at least a portion of the data.

[0439] In some cases, the at least a portion of the data is associated with a plurality of transactions associated with the document, and process 2000 further includes associating hash values ​​of each of the plurality of transactions with corresponding data in the at least a portion of the data.

[0440] In some cases, the data structure of the smart contract pool is a state Merkle tree including multiple key-value pairs. In some cases, the second smart contract and the corresponding smart contract pool are associated with the smart contract ID of the second smart contract, wherein the smart contract ID is stored in the second smart contract and the smart contract pool to link the second smart contract with the smart contract pool.

[0441] Fig.21 2100 is a diagram of another example of a module of the apparatus 2100 according to an embodiment of the present invention. The apparatus 2100 may be an example of an embodiment of a computer system. The apparatus 2100 may correspond to the above-mentioned embodiment, and the apparatus 2100 includes the following: a determination module 2102 for determining that the data stored in the cache storage satisfies a predetermined condition; an adding module 2104 for adding the blockchain address of the second smart contract to a configuration file, wherein the configuration file includes a plurality of addresses corresponding to a plurality of smart contracts stored on the blockchain; and a calling module 2106 for calling a virtual machine to execute the configuration file, wherein the execution of the configuration file initiates a consensus algorithm to generate a second smart contract at the blockchain address, and generates a corresponding smart contract pool on the blockchain for storing at least a portion of the data, and the smart contract pool is a data structure to be stored on the blockchain.

[0442] In an optional embodiment, the data is variable data included in a document for customs clearance, and the data includes one or more of a document type of the document, a document status of the document, and association information between the document and one or more other documents for customs clearance.

[0443] In an optional embodiment, the document is one of an order document, a logistics document, or a payment document, and wherein the document includes variable data, immutable data, and index data, wherein the immutable data includes an encrypted version of at least a portion of the content of the document encrypted by an encryption key associated with an owner of the document, and the index data includes an identifier of the document and one or more hash values ​​of multiple blockchain transactions associated with the document.

[0444] In an optional embodiment, if the volume of data stored in the cache storage exceeds a predetermined threshold, the predetermined condition is satisfied. In an optional embodiment, the blockchain includes multiple smart contract pools, and the device 2100 is further used to: call an API to enable the blockchain node to initiate a consensus algorithm to record at least a portion of the data exceeding the predetermined threshold in a polling manner to the multiple smart contract pools.

[0445] In an optional embodiment, the blockchain includes multiple smart contract pools, and processing 2100 is also used to: call an API to enable the blockchain node to initiate a consensus algorithm, thereby recording at least a portion of the data that exceeds a predetermined threshold into the multiple smart contract pools based on the ID of the data and the IDs of the multiple smart contract pools.

[0446] In an optional embodiment, the at least part of the data is associated with a plurality of documents for customs clearance, and the apparatus 2100 is further configured to: associate a document ID of each of the plurality of documents with corresponding data in the at least part of the data.

[0447] In an optional embodiment, the at least part of the data is associated with multiple transactions associated with the document, and the device 2100 is further used to: associate the hash values ​​of each of the multiple transactions with corresponding data in the at least part of the data.

[0448] In an optional embodiment, if at least a portion of the data is received within a predetermined time period and the at least a portion of the data is different from the rest of the data, the predetermined condition is satisfied.

[0449] In an optional embodiment, the blockchain includes multiple smart contract pools created within the predetermined time period, and the device 2100 is also used to: call an API to enable the blockchain node to initiate a consensus algorithm, thereby recording at least a portion of the data into the multiple smart contract pools.

[0450] In an optional embodiment, the configuration file is executed in response to restarting the computing device.In an optional embodiment, the data structure of the smart contract pool is a state Merkle tree including multiple key-value pairs.

[0451] In an optional embodiment, the second smart contract and the corresponding smart contract pool are associated with the smart contract ID of the second smart contract, wherein the smart contract ID is stored in the second smart contract and the smart contract pool to link the second smart contract with the smart contract pool.

[0452] Fig. 22 2200 is a diagram showing an example of a customs clearance service platform 2200 according to an embodiment of the present invention. In some embodiments, the customs clearance service platform 2200 can provide services to users in multiple countries by applying the local customs clearance rules of each country. In this example, the first buyer 2202 and the first merchant 2204 are located in the first country, the first customs clearance agent platform 2206 is managed by one or more customs brokers in the first country, and the first customs agency 2208 is responsible for approving requests for customs clearance of goods imported into the first country. The second buyer 2210 and the second merchant 2212 are located in the second country, the second customs clearance agent platform 2214 is managed by one or more customs brokers in the second country, and the second customs agency 2216 is responsible for approving requests for customs clearance of goods imported into the second country.

[0453] For example, a first buyer 2202 located in a first country wishes to purchase a first commodity from a second merchant 2212 located in a second country, and import the first commodity into the first country. A first customs clearance agent platform 2206 collects information related to a first import order to import the first commodity into the first country according to the laws and regulations of the first country. The first customs clearance agent platform 2206 calls the service of the customs clearance service platform 2200 to store the first customs clearance information related to the first import order in the blockchain. The laws and regulations of the first country may require that the customs clearance data be stored in a computer server located in the first country. When the customs clearance service platform 2200 detects that the first customs clearance information is related to an import order submitted by a first buyer located in the first country, the customs clearance service platform 2200 stores the first customs clearance information in a first blockchain database 2218 and a first smart contract data cache 2232 managed by a first blockchain network located in the first country.

[0454] In a similar manner, a second buyer 2210 located in a second country wishes to purchase a second commodity from a first merchant 2204 located in a first country, and import the second commodity into the second country. A second customs clearance agent platform 2214 collects information related to a second import order to import the second commodity into the second country according to the laws and regulations of the second country. For example, the documents and information required for customs clearance in the second country may be different from the documents and information required by the first country. The second customs clearance agent platform 2214 calls the service of the customs clearance service platform 2200 to store the second customs clearance information related to the second import order in the blockchain. The laws and regulations of the second country may require that the customs clearance data be stored in a computer server located in the second country. When the customs clearance service platform 2200 detects that the second customs clearance information is related to an import order submitted by a second buyer located in the second country, the customs clearance service platform 2200 stores the second customs clearance information in a second blockchain database 2220 managed by a second blockchain network located in the second country and in a second smart contract data cache 2224.

[0455] The customs clearance service platform 2200 may treat the first customs clearance information and the second customs clearance information differently. For example, the first country and the second country may each have regulations governing the customs clearance information processing procedures and privacy protections applied to the customs clearance information. The regulations of the first country may be different from the regulations of the second country. In some embodiments, the customs clearance service platform 2200 provides the same API to the first customs clearance agent platform 2206 and the second customs clearance agent platform 2214, but the back-end service module 2226 for managing the processing of the customs clearance data will process the customs clearance data differently depending on the country associated with the import order.

[0456] For example, the customs clearance service platform 2200 includes a rules database 2222 that includes information about the regulations of various countries in which the customs clearance service platform 2200 operates. Each service module 2226 of the customs clearance service platform 2200, such as the customs clearance service module 920, the user control module 922, the privacy and encryption module 924, the DIS service module 926, the document lifecycle management module 928, and the smart contract service module 930, can access the rules database 2222 and operate in accordance with the regulations of each country.

[0457] To make it clear, Fig. 22 Several entities involved in the customs clearance process are omitted, such as banks or payment companies, delivery companies, customs brokers and managers. The customs clearance service platform 2200 processes information collected from various entities in various countries in accordance with the data retention and privacy protection regulations of each corresponding country.

[0458] The techniques described in this article are not limited to processing import customs clearance data. Fig.23 , Fig.23 2300 according to an embodiment of the present invention. The customs clearance platform 2300 can be used to process any type of customs clearance data based on any set of rules agreed upon by a group of people. For example, when a first group of people in a country agree to follow a set of rules regarding the taxation of goods on imports, the customs clearance platform 2300 can be used to process import customs clearance data.

[0459] For example, the second group of members with environmental awareness may decide to purchase products mainly from sustainable sources, and donate a specific percentage of the purchase price of the goods purchased from non-sustainable sources for environmental reasons. For individuals, it may be difficult to track whether the product comes from a sustainable source or a non-sustainable source. The customs clearance platform 2300 allows the second group of members to easily establish rules to help achieve their goals. For example, the customs clearance platform 2300 may include a rule database 2310, which 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 can update the rule database 2310 from time to time. The second group of members (e.g., the first buyer 2302, ..., the Nth buyer 2304) can purchase products from merchants (e.g., the first merchant 2306, ..., the Mth merchant 2308) through the online business system 2314.

[0460] When a buyer purchases a product through the online business system 2314 and indicates that the buyer is a member of the second group, the online business system 2314 sends the purchase data to the customs clearance platform 2300, and indicates that the purchase data is associated with the second group, for example, using an identifier associated with the second group. The customs clearance platform 2300 records the purchase data on the blockchain database 2218 and / or the smart contract data cache 2232. The customs clearance platform 2300 includes a customs clearance approval module 2312 that analyzes the purchase data to determine whether the purchased product is from a sustainable source based on the rule database 2310. If the product is not from a sustainable source, the customs clearance approval module 2312 determines the donation amount that the buyer should donate (this is similar to the customs agency determining the import tax amount applicable to imported goods).

[0461] For example, the customs clearance approval module 2312 may send a message to the buyer indicating that the product is not from a sustainable source and that the buyer should donate a specific amount based on an agreement between the second group of members. The customs clearance platform 2300 may communicate with the buyer's bank, request payment from the bank, and send the payment as a donation to, for example, a non-profit environmental organization. Transactions performed by the customs clearance platform 2300 may be recorded in the blockchain database 2218, which may be verified by the relevant parties. The services provided by the customs clearance platform 2300 may be automated through the use of smart contracts.

[0462] In some embodiments, the customs clearance service platforms 900 and 2200 and the customs clearance platform 2300 can be used to process customs clearance data (e.g., import customs clearance data) in a virtual world such as a game platform. For example, a game platform can allow players to establish a virtual country or kingdom, recruit other players to become citizens or subjects of the virtual country or kingdom, and establish their own rules or laws for the virtual country or kingdom. Citizens / subjects of a country / kingdom can trade goods with citizens / subjects of another country / kingdom. The country / kingdom can raise funds (in the form of virtual currency) by taxing trade. The operations of the customs clearance service platforms 900 and 2200 and the customs clearance platform 2300 can be automated by using smart contracts, so the technology used to implement the customs clearance service platforms 900 and 2200 and the customs clearance platform 2300 can also be applied to implement virtual customs clearance and taxation in the virtual world. This allows players of the online game platform to establish their own trade taxation rules, thereby making the online game platform more realistic and interesting.

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

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

[0465] Since the device embodiment corresponds to the method embodiment basically, for the relevant parts, reference can be made to the relevant description in the method embodiment. The device implementation described above is only an example. 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 goal of the scheme herein. Those of ordinary skill in the art can understand and implement the embodiments of the present application without having to make creative efforts.

[0466] Reference again Fig.11 , 13 , 15, 17, 19 and 21, which can be interpreted as showing the internal functional modules and structures of a computer system or blockchain node. In essence, the execution subject can be an electronic device, which includes: 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 have programming instructions stored thereon, and the programming instructions can be executed by the one or more processors to execute the algorithms, methods, functions, processes, processes and programs described herein. Also provided herein are one or more non-transitory computer-readable storage media coupled to one or more processors and having instructions stored thereon, 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 methods provided herein.

[0467] 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 storing instructions thereon, which, when executed by the one or more processors, causes the one or more processors to perform the operations described in the method embodiment provided herein.

[0468] The embodiments of the subject matter, actions, and operations described herein may be implemented in digital electronic circuits, tangibly embodied computer software or firmware, computer hardware, or a combination of one or more thereof, including the structures disclosed herein and their structural equivalents. The embodiments of the subject matter described herein may be implemented as one or more computer programs, for example, one or more computer program instruction modules, encoded on a computer program carrier for execution by a data processing device, or to control 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. A computer storage medium may be or partly be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more thereof. A computer storage medium is not a propagation signal.

[0469] A computer program may also 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 may include one or more computers in one or more locations interconnected by a data communications network.

[0470] 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, e.g., one or more scripts stored in a markup language document; a single file dedicated to the program in question; or multiple coordinated files, e.g., multiple files storing one or more modules, subroutines, or code portions.

[0471] 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 data and instructions for the computer program to be executed from a non-transitory computer readable medium coupled to the processor.

[0472] 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 hardware, the apparatus may also include code that creates an execution environment for a computer program, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

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

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

[0475] Typically, a computer will also include or be operably coupled to receive data from or transfer data to one or more storage devices. A storage device may be, for example, a magnetic disk, a magneto-optical disk or optical disk, a solid-state drive, or any other type of non-temporary computer-readable medium. However, a computer need not 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, just to name a few.

[0476] 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 storage component integrated into a processor, such as an L2 cache component, is "coupled" to the processor.

[0477] To interact 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, an input device, such as a keyboard and a pointing device, through which a user can provide input to the computer, and a pointing 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 a 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.

[0478] The term "configured to" is used herein in connection with systems, devices, and computer program components. For a system of one or more computers configured to perform a specific 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 when in operation. For one or more computer programs configured to perform a specific operation or action, it means that 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 specific operation or action, it means that the circuit has electronic logic to perform the operation or action.

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

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

[0481] 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 processes depicted in the accompanying drawings do not require the specific order or sequence shown to achieve the desired results. In some cases, multi-tasking parallel processing may be advantageous.< / orderid> < / memberid> < / memberid>

Claims

1. A computer-implemented method for blockchain-based data storage executed by a blockchain node, the method include: Receiving data from a service platform for storage, wherein the data includes variable data, immutable data, and index data identified by the service platform; Storing the mutable data in a cache storage, wherein the mutable data is to be executed by a smart contract; Initiating a consensus algorithm to record the immutable data on the blockchain; In response to successfully executing the consensus algorithm, recording the immutable data on the blockchain based on invoking the smart contract, wherein the blockchain is stored in a database having a lower storage cost than the cache storage; and Based on invoking the smart contract, storing the index data and the variable data under a first data structure in the cache storage, and The index data and the immutable data are recorded under a second data structure on the blockchain; the mutable data is associated with a document for customs clearance, and the mutable data includes one or more of a document type of the document, a document status of the document, and association information of the document with one or more other documents for customs clearance.

2. The computer-implemented method according to claim 1, in, The data is customs clearance data associated with the purchase order and includes one or more of order data, logistics data and payment data.

3. The computer-implemented method according to claim 1, in, The immutable data is associated with the document and includes an encrypted version of at least a portion of the content of the document encrypted by an encryption key associated with an owner of the document.

4. The computer-implemented method according to claim 3, in, The index data is associated with the document and includes one or more of an identification of the document and hash values ​​of a plurality of blockchain transactions associated with the document.

5. The computer-implemented method of claim 3, in, The encryption key is derived based on a linear secret sharing scheme through negotiation between at least two of the following: (i) a customs clearance agent platform managed by at least one customs clearance agent or broker who prepares customs clearance-related information on behalf of importers and submits it to customs agencies; (ii) the service platform; or (iii) the customs authorities mentioned above.

6. The computer-implemented method of claim 1, in, The consensus algorithm is one of Proof of Work (Pow), Proof of Stake (PoS) or Practical Byzantine Fault Tolerance (PBFT).

7. The computer-implemented method of claim 1, in, Based on calling the smart contract, it also includes: A user is enabled to obtain the variable data and the immutable data by searching the index data in the first data structure and the second data structure.

8. The computer-implemented method of claim 5, include: At the service platform, an application programming interface is provided to enable the customs agency to search the index data to retrieve the variable data and the immutable data.

9. The computer-implemented method of claim 1, in, The address of the smart contract is stored on the blockchain in the database.

10. The computer-implemented method according to any one of claims 1 to 9, in, The immutable data is stored in a state Merkle tree data structure.

11. A system for storing customs clearance data, include: one or more processors; and One or more computer readable memories coupled to the one or more processors and having instructions stored thereon, the instructions being executable by the one or more processors to perform the method of any one of claims 1 to 10.

12. A device for storing customs clearance data, the device comprising a plurality of modules for executing the method according to any one of claims 1 to 10.