Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Blockchains are generally divided into three types: public chain (Public Blockchain), private chain (PrivateBlockchain) and alliance chain (Consortium Blockchain). In addition, there are various types of combinations, such as private chain + federation chain, federation chain + public chain, and other different combinations. The most decentralized of these is the public chain. The public chain is represented by bitcoin and ether house, and the participators joining the public chain can read the data record on the chain, participate in transaction, compete for accounting right of new blocks, and the like. Furthermore, each participant (i.e., node) is free to join and leave the network and perform related operations. Private chains are the opposite, with the network's write rights controlled by an organization or organization and the data read rights specified by the organization. Briefly, a private chain can be a weakly centralized system with strictly limited and few participating nodes. This type of blockchain is more suitable for use within a particular establishment. A federation chain is a block chain between a public chain and a private chain, and "partial decentralization" can be achieved. Each node in a federation chain typically has a physical organization or organization corresponding to it; participants jointly maintain blockchain operation by authorizing to join the network and forming a benefit-related alliance.
Whether a public chain, a private chain or a alliance chain, related functions and data interaction are realized in a transaction (transaction) form, and each object participates in the transaction with a corresponding account. By way of example, the types of accounts may be divided into external accounts, contract accounts, and the like. An external account is typically controlled by an individual or institution and generates and initiates transactions. The contract account corresponds to an intelligent contract on the blockchain, the intelligent contract being a contract on the blockchain of a public, private or alliance type that can be executed triggered by a transaction, the intelligent contract being defined by the form of code.
After the intelligent contract is created, a contract account corresponding to the intelligent contract appears on the blockchain and has a specific address, and the contract code and the account storage are stored in the contract account. The behavior of the intelligent contract is controlled by the contract code, while the account storage of the intelligent contract preserves the state of the contract. In other words, an intelligent contract causes a virtual account to be generated on a blockchain that contains a contract code and an account store (Storage). When the external account generates a transaction, the address corresponding to the called intelligent contract is added to the to field of the transaction, so that the intelligent contract can be called, and the relevant functions are realized by executing the code of the intelligent contract. The intelligent contract can be independently executed at each node in the blockchain network in a specified mode, and all execution records and data are stored on the blockchain, so that after the transaction is completed, transaction certificates which cannot be tampered and cannot be lost are stored on the blockchain.
Of course, the external account does not necessarily require invocation of the smart contract when generating the transaction, e.g., the transaction may be used only to implement general transfer functions.
The following describes an implementation process of an embodiment of a method for implementing privacy protection in this specification with reference to fig. 1:
in step 102, the first tile link receives a transaction.
In an embodiment, the transaction may be submitted by the client to the first blockchain node. For example, after the user generates the transaction at the client through the corresponding account, the transaction is submitted to the first blockchain node through the client. Taking fig. 2 as an example, the first tile nexus contains a transaction/query interface that can interface with a client so that the client can submit a transaction to the first tile nexus. Accordingly, after the transaction is completed, the first block link point may return an execution result of the transaction to the client through the transaction/query interface, where the execution result may include an execution success or an execution failure, and may further include detail information such as a transaction log, which is not limited in this specification.
The transaction may also be forwarded by the second blockchain link point to the first blockchain node. For example, after the user generates the transaction at the client through the corresponding account, the transaction is submitted to the second blockchain node through the client; the second blockchain node then further forwards the transaction to the first blockchain node. Taking fig. 2 as an example, the interface may interface with other blockchain nodes, for example, the other blockchain nodes may include the second blockchain node, so that the second blockchain node may forward the transaction to the first blockchain node. Similarly, the second tile chain node may also interface with the client through its own transaction/query interface to receive transactions submitted by the client.
For example, in a blockchain network employing consensus algorithms such as Proof of Work (POW), Proof of equity (POS), Proof of commission (DPOS), etc., a second blockchain node immediately spreads (e.g., broadcasts) the transaction submitted by the client to other blockchain nodes in the ethernet network.
For example, in a block chain network using a Practical Byzantine Fault Tolerance (PBFT) mechanism or the like, the bookkeeping node has been agreed before the current round of bookkeeping, so that after the second block chain node receives the transaction submitted by the client, if the second block chain node is not the bookkeeping node, the transaction is sent to the determined bookkeeping node, and the bookkeeping node packages the transaction (including the transaction) and sends the transaction to each verification node in a further consensus phase. When the second block link point is the determined accounting node, after the other block link points receive the transaction submitted by the client, the transaction can be forwarded to the second block link node; the second blockchain link may then package the transaction (or other transactions as well) to various verification nodes, including the first blockchain node, during the consensus phase.
Step 104A, identifying the transaction as a plaintext transaction or a privacy transaction by the first block link point; wherein the clear text transaction corresponds to a clear text contract and the private transaction corresponds to a clear text contract and/or a private contract.
In an embodiment, the present specification divides transactions into plaintext transactions of plaintext type and privacy transactions of privacy type based on different privacy protection requirements, and different execution modes can be implemented for different types of transactions, which will be described in detail below. For example, by adding a type field in the transaction, the first blockchain can accordingly identify the transaction type as a clear text transaction or a private transaction. In the related art, such as in an ethernet network, transactions typically include fields to, value, data, and the like. On the basis of the related technology, the embodiment adds a type field, for example, characterized as a type field, in the transaction, and indicates the type of the related transaction based on the value of the type field; for example, when the type field is the first value, it indicates that the related transaction is a plaintext transaction, and when the type field is the second value, it indicates that the related transaction is a privacy transaction.
In one embodiment, all contents of a plaintext transaction are in a plaintext form, that is, each field of the transaction is in a plaintext form, so that each field of the plaintext transaction can be directly read by a first block link point to implement related processing; meanwhile, the plaintext transaction is packed into blocks in plaintext form, and then recorded in a blockchain in plaintext form. Except that the type field of the privacy transaction is in a plaintext form, other fields are in a ciphertext form, so that on one hand, the transaction type of the first block chain link point can be quickly identified under the condition that decryption is not needed, differential processing is implemented on the plaintext transaction and the privacy transaction, on the other hand, the first block chain link point can be decrypted and read only by an object with a secret key through the ciphertext form, leakage of transaction information is avoided, the privacy transaction is packaged into blocks in the ciphertext form, and then the privacy transaction is recorded in the block chain in the ciphertext form.
And 104B, identifying the account of the generator of the transaction as a plaintext account or a privacy account by the first block link point.
In an embodiment, the external account is divided into a plaintext account and a privacy account, wherein the behavior of the privacy account is particularly protected to avoid disclosure of privacy information, which will be described in detail below.
In a public chain such as an etherhouse, a user can freely create an external account, and then the user can mark the external account created by the user as a plaintext type or a privacy type, and each node in the blockchain network can pre-record the type information of all the external accounts, so that when the first blockchain node receives the transaction, the first blockchain node can read the information of the account of the generating party from the from field of the transaction and determine that the account of the generating party is the plaintext account or the privacy account according to the pre-recorded type information.
In a federation chain or a private chain, the creation operation of the external account has certain limitation, and other external accounts need to be created by the created external account and cannot be created at will. The clear account may be restricted from being able to create either a clear account or a private account when created, while the private account may only be able to create a private account. Similarly, in a blockchain network of a federation chain or a private chain, each node should also record type information of all external accounts in advance, so that when the first blockchain node receives the transaction, the first blockchain node can read information of a generating party account from a from field of the transaction and determine that the generating party account is a plaintext account or a privacy account according to the pre-recorded type information.
And 106, the first block chain node refuses to execute the transaction when the transaction is a clear text transaction initiated by a private account, otherwise, the transaction is executed.
In one embodiment, when a transaction is initiated by a privacy account, the type of transaction needs to be limited for security protection of the privacy account: when the privacy account initiates the privacy transaction, the privacy transaction is performed in a trusted execution environment by adopting encrypted transmission because the privacy transaction is relatively prone to meet the requirement of high-level privacy protection, so that the privacy transaction has extremely high privacy, and the privacy transaction is allowed to be performed; when the privacy account initiates the plaintext transaction, the plaintext transaction is performed outside a trusted execution environment by adopting plaintext transmission, so that the privacy of the plaintext transaction is relatively insufficient, the plaintext transaction is not allowed to be executed, the security protection of the privacy account is realized, and the leakage of related privacy information caused by the fact that a user using the privacy account initiates the plaintext transaction unintentionally.
In one embodiment, when a transaction is initiated by a plaintext account, whether the plaintext account initiates a plaintext transaction or a privacy transaction, the first blockchain node is executed, so that the plaintext account can selectively initiate a plaintext type or a privacy type transaction according to actual requirements.
In one embodiment, the first blockchain node is compatible with the processing capability of the related art for the plaintext transaction, and can process the plaintext transaction outside the trusted execution environment and store the plaintext execution result in the external storage space. For example, as shown in fig. 2, the first block link point may be divided into a normal execution environment and a trusted execution environment, a transaction submitted by a client (taking a transaction submitted by the client as an example) first enters a "transaction/query interface" in the normal execution environment for type identification, an identified plaintext transaction is left in the normal execution environment for processing, and an identified private transaction is transferred to the trusted execution environment for processing. In other words, the first blockchain node can be compatible with processing of plaintext transactions in the related art, and can also process privacy transactions in a ciphertext form, so that mixed processing of plaintext transactions and privacy transactions is realized on the whole blockchain network.
The transactions in this specification may be used to implement relatively simple processing logic, such as transfer logic similar to that of the related art.
The transactions in this specification may also be used to implement relatively complex processing logic, which may be implemented here by means of the smart contracts described above. Taking the ethernet house as an example, the support user creates and/or invokes some complex logic in the ethernet house network, which is the biggest challenge of the ethernet house to distinguish from the bitcoin blockchain technology. The core of the ethernet plant as a programmable blockchain is the ethernet plant virtual machine (EVM), each ethernet plant node can run the EVM. The EVM is a well-behaved virtual machine, which means that a variety of complex logic can be implemented through it. The user issuing and invoking smart contracts in the etherhouse is running on the EVM. In fact, what the virtual machine directly runs is virtual machine code (virtual machine bytecode, hereinafter referred to as "bytecode"). The intelligent contracts deployed on the blockchain may be in the form of bytecodes.
In one embodiment, the intelligent contracts of the present description may be divided into plaintext contracts of a plaintext type, privacy contracts of a privacy type. The contract code and the contract state of the plaintext contract are both stored at the node in plaintext form, and the contract code and the contract state of the privacy contract are both stored at the node in ciphertext form, so that the privacy contract has relatively higher privacy. When a transaction is used to create and/or invoke a smart contract, the smart contract may be considered to correspond to the transaction.
Since the first blockchain node processes the plaintext transaction outside the trusted execution environment and directly stores the processed plaintext execution result in the external storage space, when the plaintext transaction is used for creating an intelligent contract, the intelligent contract is inevitably stored in the external storage space in a plaintext form, and thus the intelligent contract is inevitably a plaintext contract. Meanwhile, when the intelligent contract is called by the plaintext transaction, the intelligent contract called by the plaintext transaction can only be the plaintext contract because the privacy contract can be decrypted only in the trusted execution environment.
In one embodiment, when the transaction generated by the generating party account is a private transaction, the generating party account may be a clear text account or a private account. The first tile chain node may decrypt the privacy transaction in a Trusted Execution Environment (TEE). The TEE is a trusted execution environment that is based on a secure extension of the CPU hardware and is completely isolated from the outside. TEE was originally proposed by Global Platform to address the secure isolation of resources on mobile devices, providing a trusted and secure execution environment for applications parallel to the operating system. The Trust Zone technology of ARM realizes the real commercial TEE technology at the earliest.
Along with the rapid development of the internet, the security requirement is higher and higher, and more requirements are provided for the TEE by mobile equipment, cloud equipment and a data center. The concept of TEE has also been developed and expanded at a high rate. The concept now referred to as TEE has been a more generalized TEE than the concept originally proposed. For example, server chip manufacturers Intel, AMD, etc. have introduced hardware-assisted TEE in turn and enriched the concept and characteristics of TEE, which have gained wide acceptance in the industry. The mention of TEE now is more generally directed to such hardware assisted TEE techniques. Unlike the mobile terminal, the cloud access requires remote access, and the end user is not visible to the hardware platform, so the first step of using the TEE is to confirm the authenticity and credibility of the TEE. Therefore, the current TEE technology introduces a remote attestation mechanism which is endorsed by a hardware manufacturer (mainly a CPU manufacturer) and ensures that a user can verify the TEE state through a digital signature technology. Meanwhile, the security requirement which cannot be met by only safe resource isolation is also met, and further data privacy protection is also provided. Commercial TEE including Intel SGX, AMD SEV also provide memory encryption techniques, limiting trusted hardware within the CPU, with the data of the bus and memory being ciphertext to prevent snooping by malicious users. For example, TEE technology such as intel's software protection extensions (SGX) isolates code execution, remote attestation, secure configuration, secure storage of data, and trusted paths for executing code. Applications running in the TEE are secured and are almost impossible to access by third parties.
Taking the Intel SGX technology as an example, SGX provides an enclosure (also called enclave), that is, an encrypted trusted execution area in memory, and a CPU protects data from being stolen. Taking the example that the first block link point adopts a CPU supporting SGX, a part of an EPC (enclosure Page Cache, Enclave Page Cache, or Enclave Page Cache) may be allocated in the Memory by using a newly added processor instruction, and data therein is encrypted by an Encryption Engine MEE (Memory Encryption Engine) in the CPU. The encrypted content in the EPC is decrypted into plaintext only after entering the CPU. Therefore, in the SGX, a user may not trust an operating System, a VMM (Virtual Machine Monitor), or even a BIOS (basic input Output System), and only need to trust the CPU to ensure that private data is not leaked. In practical application, the private data can be encrypted and then transmitted to the enclosure in a ciphertext form, and the corresponding secret key is transmitted to the enclosure through remote certification. Then, the operation is performed by using the data under the encryption protection of the CPU, and the result is returned in a ciphertext form. In this mode, not only can the powerful calculation be utilized, but also data leakage is not worried about.
Of course, similar to a clear text transaction, a private transaction may create and/or invoke a smart contract to implement relatively complex processing logic, or a private transaction may implement relatively simple processing logic such as a transfer without invoking a smart contract. Because the privacy transaction is executed in the TEE, the intelligent contract corresponding to the privacy transaction can be the privacy contract, for example, the privacy transaction can create the intelligent contract in the TEE, and the contract code and the contract state of the intelligent contract can be encrypted in the TEE, so that the corresponding privacy contract is created; for another example, a privacy contract may be invoked for a privacy transaction, the privacy contract may be decrypted and executed in the TEE, and the contract state updated after execution may be updated and re-encrypted for storage; for another example, a private transaction may invoke a plaintext contract, which is executed in the TEE, with the updated contract state still stored in plaintext form.
Assuming that the above-described private transaction is generated at a certain client, the client may first generate clear text transaction content, and then encrypt the clear text transaction content with a key. The encryption can adopt symmetric encryption or asymmetric encryption. Accordingly, the first tile chain node may decrypt the private transaction with the corresponding key to obtain clear text transaction content. If the client encrypts the plaintext transaction content using a symmetric encryption scheme, i.e., using a symmetric key of a symmetric encryption algorithm, the first chunk node may decrypt the private transaction using the symmetric key of the symmetric encryption algorithm, accordingly. The encryption algorithm used for symmetric encryption is, for example, DES algorithm, 3DES algorithm, TDEA algorithm, Blowfish algorithm, RC5 algorithm, IDEA algorithm, etc. The symmetric key of the symmetric encryption algorithm may be generated by the generator of the privacy transaction, determined by the client and the first blockchain node negotiation, or sent by the key management server, for example.
If the plaintext transaction contents are encrypted in an asymmetric encryption manner, i.e. by using the public key of the asymmetric encryption algorithm, the first chunk node can decrypt the private transaction by using the private key of the asymmetric encryption algorithm correspondingly. Examples of asymmetric encryption algorithms are RSA, Elgamal, knapsack Algorithm, Rabin, D-H, ECC (elliptic curve encryption Algorithm), etc. The key of the asymmetric encryption algorithm may be, for example, a pair of a public key and a private key generated by the first chunk node, and the public key is sent to the client in advance, so that the client may encrypt the plaintext transaction content with the public key.
The key of the asymmetric encryption algorithm may also be generated by a key management server. Through a remote certification mode, the key management server sends the private key to the first blockchain node, and specifically, the private key can be transmitted into a surrounding ring of the first blockchain node. The first block link point may comprise a plurality of enclosures and the private key may be passed into a security enclosure of the enclosures; for example, the security circle may be a QE (listening enclosure) circle, rather than an AE (Application enclosure) circle. For asymmetrically encrypted public keys, the client may be sent by a key management server. The client can encrypt the plaintext transaction content with the public key, and accordingly, the first blockchain node can decrypt the privacy transaction with the private key to obtain the plaintext transaction content contained in the privacy transaction.
The client can also adopt a mode of combining symmetric encryption with asymmetric encryption. For example, the client encrypts the plaintext transaction content by using a symmetric encryption algorithm, that is, encrypts the plaintext transaction content by using a symmetric key of the symmetric encryption algorithm, and encrypts a symmetric key used in the symmetric encryption algorithm by using an asymmetric encryption algorithm. Generally, a public key of an asymmetric encryption algorithm is used to encrypt a symmetric key used in a symmetric encryption algorithm. Therefore, after the first block chain node receives the encrypted transaction, the first block chain node can firstly decrypt by using the private key of the asymmetric encryption algorithm to obtain the symmetric key of the symmetric encryption algorithm, and then decrypt by using the symmetric key of the symmetric encryption algorithm to obtain the plaintext transaction content.
For example, the key management server may send the private key of the asymmetric cryptographic algorithm to the enclosure of the first blockchain node and send the private key of the asymmetric cryptographic algorithm to the client through remote attestation. Therefore, the client can encrypt the plaintext transaction content by using the symmetric key of the symmetric encryption algorithm, that is, encrypt the plaintext transaction content by using the symmetric key of the symmetric encryption algorithm, and encrypt the symmetric key used in the symmetric encryption algorithm by using the public key of the asymmetric encryption algorithm. Furthermore, the client may send the private transaction and an encryption private key (obtained by encrypting a symmetric key adopted in the symmetric encryption algorithm with a public key of the asymmetric encryption algorithm) to the first blockchain node. After the first block link node receives the private transaction and the encrypted private key, the encrypted private key can be decrypted by using the private key of the asymmetric encryption algorithm to obtain a symmetric key of the symmetric encryption algorithm, and then the private transaction is decrypted by using the symmetric key of the symmetric encryption algorithm to obtain the plaintext transaction content. The encryption method is generally called digital envelope encryption.
And after the first block chain link point decrypts the private transaction, the plaintext transaction content is obtained. The clear text transaction content may contain code of the intelligent contract for creating the intelligent contract in the blockchain; the clear text transaction content may contain a contract address of a certain intelligent contract that has been created in the blockchain for invoking the intelligent contract.
Whether used to create or invoke an intelligent contract, a first block link point may pass code that executes the intelligent contract to complete a transaction. The first block link point may execute code of the intelligent contract in a trusted execution environment. When the code of the intelligent contract is positioned in the privacy transaction, the first block chain node decrypts the privacy transaction to obtain the plaintext transaction content, wherein the plaintext transaction content comprises the code of the intelligent contract in the plaintext; when the intelligent contract is created in advance and the privacy transaction is used for invoking the intelligent contract, if the intelligent contract is stored in advance in an encrypted manner by the first block link point, the first block link point can read the code of the intelligent contract in the encrypted text into the trusted execution environment and decrypt the code of the intelligent contract in the clear text. Multiple nested structures can be realized among the intelligent contracts; for example, the code in the intelligent contract 1 calls the intelligent contract 2, while the code in the intelligent contract 2 points to the contract address 3 generated by creating the intelligent contract code, so that when the privacy transaction calls the code in the intelligent contract 1, the intelligent contract code in said contract address 3 is indirectly called.
When the privacy transaction is used for creating the intelligent contract, the privacy transaction comprises the code of the intelligent contract, and the first block link point can decrypt the privacy transaction in the trusted execution environment to obtain the code of the intelligent contract contained in the privacy transaction and further execute the plain text code in the trusted execution environment. When the privacy transaction is used to invoke a privacy-type smart contract, the first blockchain node may decrypt the smart contract in the trusted execution environment to obtain corresponding plaintext code, and then execute the plaintext code in the trusted execution environment. When the privacy transaction is used to invoke a plaintext-type smart contract, the first blockchain node directly reads the plaintext code of the smart contract and executes the plaintext code in the trusted execution environment. Specifically, the first block link point may allocate a part of the area EPC in the memory by using a processor instruction newly added in the CPU, and encrypt the plaintext code by using an encryption engine MEE in the CPU and store the plaintext code in the EPC. The encrypted content in the EPC enters the CPU and is decrypted into plaintext. And in the CPU, the plaintext codes are operated to finish the execution process.
In SGX technology, the EVM may be loaded into the enclosure by executing the plaintext code of the intelligent contract. In the remote certification process, the key management server can calculate a hash value of a local EVM code, compare the hash value with the hash value of the EVM code loaded in the first block chain link point, and correctly use a comparison result as a necessary condition for passing the remote certification, thereby completing measurement of the code loaded on the SGX enclosure of the first block chain node. Measured, the correct EVM can execute the intelligent contract code in the SGX.
And after the CPU executes the plaintext codes, generating corresponding plaintext execution results. In general, the plaintext execution results may include a changed contract state. The contract status is stored in the block chain, and from the perspective of the block link point, is written to a database, such as a local database. The database is typically stored on a storage medium, more commonly a persistent storage medium. The persistent storage medium may be a magnetic disk, a floppy disk, or a memory or the like which can restore data after being powered on so as to be persistently stored.
When the intelligent contract corresponding to the privacy transaction is a privacy contract, the clear text execution result needs to be encrypted and then stored. For example, the operation written into the database is represented by a code, such as setstore (key, ENC (value, secret _ key)). In the setstore (key, ENC (value _ key)), the key (key) may be written in the same manner as a conventional key. As for the writing of value, Intel SGX technology may be used, ENC denotes enclave, and secret _ key denotes a key used when writing to the database in SGX technology. The key may be a symmetric encryption key, such as a seal (SimpleEncrypted arithmetric Library) key. The seal key may be sent to the first blockchain node by the key management server after remote certification, and may be obtained by negotiation between each node (e.g., the first blockchain node and other blockchain nodes) in the blockchain. The key may also be a key for asymmetric encryption. The key may be stored in a bounding box of the first blockchain node. The first block link point may comprise a plurality of enclosures and the private key may be passed into a security enclosure of the enclosures; for example, the security circle may be a QE circle, rather than an AE circle. When the intelligent contract corresponding to the privacy transaction is a plaintext contract, the plaintext execution result is stored in a plaintext form without encryption.
The key obtained by the remote certification and sent to the first blockchain node by the key management server, or the key obtained by negotiation between each node in the blockchain (e.g., the first blockchain node and other blockchain nodes) may be a root key (root key) instead of the above-mentioned seal key, and the above-mentioned seal key may be a derivative key of the root key. For example, root keys may irreversibly derive several versions of derived keys in turn, and any two adjacent keys irreversibly derive a low version of key from a high version of key, thereby forming a chained key derivation structure. For example, if 256 versions of keys with version numbers of 0-255 need to be derived, hash calculation can be performed on the root key and a version factor 0xFF (a decimal value is 255, that is, the version number of the key needs to be generated; of course, other values can also be adopted) to obtain a key-255 with the version number of 255; carrying out hash calculation on the key-255 and the version factor 0xFE to obtain the key-254 with the version number of 254; … … the key-0 with version number 0 is obtained by hashing the key-1 with a version factor of 0x 00. Due to the characteristics of the hash algorithm, the calculation between the high-version key and the low-version key is irreversible, for example, the key-0 can be calculated by the key-1 and the version factor 0x00, but the key-1 cannot be reversely deduced by the key-0 and the version factor 0x 00.
Then, a certain version of derivative key may be specified, and the result of plaintext execution is encrypted as the above-mentioned seal key to obtain a corresponding result of ciphertext execution. Further, the version of the seal key may be updated, and based on the above characteristics, the seal key should be updated from the low version key to the high version key, so that even if the low version key is leaked, the high version key cannot be deduced reversely, and sufficient data security is ensured.
The above-mentioned private transaction may have a plurality of corresponding intelligent contracts, and the above-mentioned plaintext execution result may include a plaintext contract execution result corresponding to each intelligent contract (i.e. a contract execution result in plaintext form, and the corresponding intelligent contract may be a plaintext contract or a privacy contract). Then: if the intelligent contracts corresponding to the privacy transaction are all plaintext contracts, the ciphertext execution result can comprise plaintext contract execution results corresponding to the plaintext contracts respectively, and the plaintext contract execution results are directly stored in a plaintext form without being encrypted by using a secret key; if the intelligent contracts corresponding to the privacy transactions are privacy contracts, the ciphertext execution result can comprise ciphertext contract execution results corresponding to the privacy contracts respectively, and the ciphertext contract execution result is obtained by encrypting the plaintext contract execution result through the key by the first block chain node; if the intelligent contract corresponding to the privacy transaction simultaneously comprises the plaintext contract and the privacy contract, the ciphertext execution result may comprise a plaintext contract execution result corresponding to the plaintext contract and a ciphertext contract execution result corresponding to the privacy contract. The plurality of intelligent contracts corresponding to the privacy transaction can be all used for creating the intelligent contracts, can be all used for calling the intelligent contracts, or one part is used for creating the intelligent contracts and the other part is used for calling the intelligent contracts.
It can be seen that in the embodiments of the present specification, the first tile link node may create a trusted execution environment and ensure that relevant sensitive information (such as transaction content, execution result, etc.) is only decrypted and read or executed in the trusted execution environment, and is in an encrypted state once leaving the trusted execution environment, so that privacy and security can be ensured in a full link for processing transactions.
The first block link point implements a function by running code for implementing the function. Thus, for functions that need to be implemented in a trusted execution environment, the relevant code needs to be executed as well. For code executed in the trusted execution environment, relevant specifications and requirements of the trusted execution environment need to be met; accordingly, for codes used for realizing a certain function in the related art, the codes need to be rewritten in combination with the specifications and requirements of the trusted execution environment, so that not only is a relatively large development amount present, but also a vulnerability (bug) is easily generated in the rewriting process, and the reliability and stability of function realization are affected.
Therefore, the first block link point encrypts the plaintext execution result into the ciphertext execution result through the key, and the ciphertext execution result is only decrypted through the trusted execution environment, so that the ciphertext execution result can be ensured to be sufficiently safe. On the basis, the first block chain node stores the ciphertext execution result (of course, if the privacy transaction calls a plaintext contract, the plaintext execution result can be stored here as well; the storage process of the ciphertext execution result is taken as an example for explanation here) to an external storage space outside the Trusted execution environment by executing the storage function code outside the Trusted execution environment, so that the storage function code can be used for realizing the storage function in the related art, and the safe and reliable storage can be realized for the ciphertext execution result without rewriting the code in combination with the specification and the requirement of the Trusted execution environment, thereby not only reducing the development amount of the related code on the basis of not influencing the safety and reliability degree, but also reducing TCB (Trusted Computing Base, trusted computing base) so that the additional security risk caused by combining the TEE technique with the blockchain technique is in a controllable range.
In one embodiment, the first block chain node may execute write cache function code within the trusted execution environment to store the plaintext execution results in a write cache within the trusted execution environment, such as the write cache may correspond to a "cache" as shown in fig. 2. Further, the first block link point encrypts the data in the write cache and outputs the encrypted data from the trusted execution environment to the external storage space. The write cache function code can be stored in the trusted execution environment in a plaintext form, and the cache function code in the plaintext form can be directly executed in the trusted execution environment; alternatively, the write cache function code may be stored outside the trusted execution environment in a ciphertext form, such as in the above-mentioned external storage space (for example, "pack + store" shown in fig. 2, where "pack" indicates that the first block chaining node packs the transaction into blocks outside the trusted execution environment), and the write cache function code in the ciphertext form may be read into the trusted execution environment, decrypted in the trusted execution environment into a plaintext code, and executed.
Write caching refers to a "buffering" mechanism provided to avoid causing a "shock" to an external storage space when data is written to the external storage space. For example, the above write cache may be implemented by using a buffer; of course, the write cache may also be implemented by using a cache, which is not limited in this specification. In fact, because the trusted execution environment is an isolated secure environment and the external storage space is located outside the trusted execution environment, the external storage space can be written into the data in the cache in batch by adopting a cache writing mechanism, so that the interaction times between the trusted execution environment and the external storage space are reduced, and the data storage efficiency is improved. Meanwhile, in the process of continuously executing each plaintext transaction content, the trusted execution environment may need to call generated data (such as a value of a contract state), and if the data to be called is just located in the write cache, the data can be directly read from the write cache, so that on one hand, interaction with an external storage space can be reduced, and on the other hand, a decryption process of the data read from the external storage space is omitted, so that the data processing efficiency in the trusted execution environment is improved.
Of course, the write cache may also be established outside the trusted execution environment, for example, the first block node may execute the write cache function code outside the trusted execution environment, so as to store the ciphertext execution result in the write cache outside the trusted execution environment, and further store the data in the write cache in the external storage space.
In an embodiment, the first chunk chain node may encrypt the plaintext execution result according to a query request initiated by a client, and output the encrypted plaintext execution result from the trusted execution environment to return to the client.
For example, the first block link point may read the ciphertext execution result from the external storage space, decrypt the ciphertext execution result into the plaintext execution result, read into the trusted execution environment, encrypt the plaintext execution result, and output the encrypted plaintext execution result from the trusted execution environment, for example, return the encrypted plaintext execution result to the client through the transaction/query interface shown in fig. 2.
For another example, the first block link point may read the plaintext execution result from a read cache in the trusted execution environment, encrypt the plaintext execution result, and output the encrypted plaintext execution result from the trusted execution environment; and the plaintext execution result is read into the trusted execution environment and stored in the read cache after the ciphertext execution result is decrypted into the plaintext execution result. In other words, after the first blockchain node reads the ciphertext execution result from the external storage space and decrypts the ciphertext execution result into the plaintext execution result, the plaintext execution result may be stored in a read cache in the trusted execution environment by executing a read cache function code in the trusted execution environment, for example, the read cache may correspond to "cache" shown in fig. 2; furthermore, for a query request initiated by the client or for data required by the trusted execution environment when executing the plaintext transaction content, data reading can be preferentially performed from the read cache, and if relevant data can be read, reading from the external storage space is not required, so that the number of interactions with the external storage space is reduced, and a data decryption process is omitted.
The read cache is to store the read data in the read cache space in the trusted execution environment in a plaintext form in order to reduce the number of interactions with the external storage space after reading the data from the external storage space into the trusted execution environment. For example, the above read cache may be implemented by using a cache; of course, the read cache may also be implemented by using a buffer, and this specification does not limit this.
The first chunk link node may support both the read cache mechanism and the write cache mechanism described above. With the continuous development of the cache technology, the same cache may not only be used for implementing data reading or data writing, but even simultaneously support the read-write operation of data, so that the boundary between the read cache and the write cache is sometimes not very clear, and thus fig. 2 only illustrates the cache without specifically distinguishing the specific type thereof, and may be configured and adjusted according to actual requirements.
Of course, the above-mentioned cache mechanism in the trusted execution environment may also be applied to the conventional execution environment, for example, implemented by "cache" in the conventional execution environment shown in fig. 2, but data reading and writing at this time only involves plaintext reading and writing, and it is not necessary to perform data encryption and decryption operations, and details are not described here.
When the first block link point is determined to be an accounting node through competition or negotiation, the first block link point may initiate consensus to a verification node in the block chain. Specifically, the first block link point may determine a group of transactions that need to be linked in the current round, where the transactions may be plaintext transactions, privacy transactions, or plaintext transactions and privacy transactions at the same time, and then the first block link point may execute each transaction in the group of transactions, generate a state tree, a transaction tree, and a receipt tree according to information such as each transaction and a transaction execution result corresponding thereto (if the plaintext transaction corresponds to the plaintext execution result, and if the privacy transaction corresponds to the ciphertext execution result), and record root hashes corresponding to root nodes of the three trees in a block header; then, after the first blockchain link packages the above-described set of transactions (e.g., as implemented by the "package + store" module shown in fig. 2) and generates a new blockchain, the block or blockchain header is broadcast to the verification nodes in the blockchain network (i.e., blockchain nodes in the blockchain network other than the accounting node), and a consensus proposal is initiated. And the verification node verifies the root hash in the block header by executing the group of transactions, and after the proposal is determined to pass the verification, the block containing the group of transactions is added to the tail end of the original block chain (namely the uplink chain), and the world state is updated according to the execution result of the group of transactions. After the first block link point passes the confirmation consensus, the plaintext execution result corresponding to the plaintext transaction and/or the ciphertext execution result corresponding to the privacy transaction can be stored by executing the storage function code; of course, the information may be stored when the unconfirmed consensus passes, and the rollback may be performed after the problem is found.
When the first blockchain node is an authentication node, rather than a billing node, the first blockchain node may receive a consensus proposal initiated by the billing node, the consensus proposal relating to a clear text transaction and/or a private transaction. For example, the accounting node may be a second blockchain node, and the first blockchain node receives a consensus proposal initiated by the second blockchain node, the consensus proposal comprising a set of transactions, the transactions being clear-text transactions, privacy transactions or clear-text transactions and privacy transactions at the same time, and the consensus proposal further comprising the root nodes of the three trees described above. The first block link point may perform a plaintext transaction to obtain a corresponding plaintext execution result, perform a privacy transaction to obtain a corresponding ciphertext execution result, generate root nodes of three trees, and compare the root nodes with the root node included in the block header in the consensus suggestion, thereby determining that the consensus suggestion passes the verification if the comparison result is consistent, otherwise determining that the consensus suggestion fails the verification. And after the verification is passed, the first block link point stores the plaintext execution result corresponding to the plaintext transaction and/or the ciphertext execution result corresponding to the privacy transaction by executing the storage function code.
It should be noted that: each block chain node in the block chain network should ensure that the adopted keys are the same when encrypting the plaintext execution results corresponding to the same privacy transaction, so that the obtained ciphertext execution results can be ensured to be the same under the condition that the plaintext execution results corresponding to the privacy transaction are the same, and the same root node is generated.
In the above description, with reference to the embodiments shown in fig. 1-2, after the node (e.g., the first blockchain node) in the blockchain network identifies the transaction type and the account type, the plaintext transaction initiated by the privacy account is prevented from being executed; in other embodiments, the privacy account can avoid generating clear text transactions based on the identification and control of the transaction type during the process of generating transactions by the client, so as to realize the security protection of the privacy account.
The following describes an implementation process of another embodiment of the method for implementing privacy protection in this specification with reference to fig. 3:
in step 302, a client receives a transaction generation request initiated by a local account.
In one embodiment, the client may be hosted on some computing device used by the user, and the user may log into an account controlled by the user on the client. When an account controlled by a user logs in on a client, the account is a local account on the client.
In an embodiment, the computing device may include a display component such as a display screen such that the client may present an interactive interface to the user through which the user may initiate the local account-based transaction generation request.
Step 304A, the transaction generated by the client side identification request is a plaintext transaction or a privacy transaction; wherein the clear text transaction corresponds to a clear text contract and the private transaction corresponds to a clear text contract and/or a private contract.
In an embodiment, the client may provide an option for the transaction type in an interactive interface provided for the user, and the user may trigger the option according to actual requirements to set the transaction type desired to be adopted as a plaintext type or a privacy type, so that the client may know that the transaction generated by the request is a plaintext transaction or a privacy transaction.
In one embodiment, the client may check the intelligent contract corresponding to the transaction, determine that the transaction is a private transaction if the intelligent contract corresponding to the transaction includes at least one privacy contract, and determine that the transaction is a plaintext transaction if the intelligent contracts corresponding to the transaction are plaintext contracts. Of course, the transaction does not necessarily have a corresponding smart contract, and the client may determine the transaction in other ways, such as based on the above-mentioned options.
Step 304B, the client identifies the local account as a clear account or a privacy account.
In an embodiment, the client may periodically synchronize account information to nodes in the blockchain network to obtain a set (e.g., a list or other form) of individual accounts and their type information, such that the client may identify the type of local account based on the set to determine whether the local account is a clear-text type or a private type of account.
In an embodiment, a client may send an inquiry request to a node in a blockchain network, where the inquiry request may include information of a local account, so that the node identifies the type of the local account, and returns an identification result to the client, and the client may know that the local account is a plaintext account or a privacy account according to the identification result.
Step 306, the client rejects the transaction generation request when the privacy account requests generation of the plaintext transaction, otherwise, generates a corresponding transaction in response to the transaction generation request.
In one embodiment, when a transaction generation request is initiated by a privacy account, the type of transaction needs to be limited for security protection of the privacy account: when a transaction generation request initiated by a privacy account is used for generating a privacy transaction, the privacy transaction is encrypted for transmission and executed in a trusted execution environment, so that the privacy transaction has extremely high privacy, and the privacy transaction is allowed to be generated; when a transaction generation request initiated by a privacy account is used for generating a plaintext transaction, the plaintext transaction is relatively prone to meeting the processing efficiency requirement, plaintext transmission is adopted and the plaintext transaction is executed outside a trusted execution environment, so that the privacy of the plaintext transaction is relatively insufficient, the plaintext transaction is not allowed to be generated, the security protection of the privacy account is realized, and the leakage of related privacy information caused by the fact that a user using the privacy account initiates the plaintext transaction unintentionally.
In one embodiment, when a transaction generation request is initiated by a plaintext account, the client generates a related transaction no matter whether the plaintext account wishes to generate a plaintext transaction or a privacy transaction, so that the plaintext account can selectively initiate a plaintext type or a privacy type transaction according to actual requirements.
In one embodiment, when a client generates a clear text transaction, the clear text transaction is generated by a clear text account, and the clear text transaction may be used to create and/or invoke a smart contract. Since the first blockchain node processes the plaintext transaction outside the trusted execution environment and directly stores the processed plaintext execution result in the external storage space, when the plaintext transaction is used for creating an intelligent contract, the intelligent contract is inevitably stored in the external storage space in a plaintext form, and thus the intelligent contract is inevitably a plaintext contract. Meanwhile, when the intelligent contract is called by the plaintext transaction, the intelligent contract called by the plaintext transaction can only be the plaintext contract because the privacy contract can be decrypted only in the trusted execution environment.
In an embodiment, when a client generates a privacy transaction, the privacy transaction is generated by a clear text account or a privacy account, and the privacy transaction is used for creating a privacy contract, invoking a clear text contract, and/or invoking a privacy contract. Because the privacy transaction is executed in the TEE, the intelligent contract corresponding to the privacy transaction can be the privacy contract, for example, the privacy transaction can create the intelligent contract in the TEE, and the contract code and the contract state of the intelligent contract can be encrypted in the TEE, so that the corresponding privacy contract is created; for another example, a privacy contract may be invoked for a privacy transaction, the privacy contract may be decrypted and executed in the TEE, and the contract state updated after execution may be updated and re-encrypted for storage; for another example, a private transaction may invoke a plaintext contract, which is executed in the TEE, with the updated contract state still stored in plaintext form.
While relatively more complex processing logic may be implemented by smart contracts, the clear text transactions and private transactions described above may also be used to implement relatively simple processing logic such as transfers, which may also be implemented without invoking smart contracts.
Assuming that the above-described private transaction is generated at a certain client, the client may first generate clear text transaction content, and then encrypt the clear text transaction content with a key. The encryption can adopt symmetric encryption or asymmetric encryption. Accordingly, the first tile chain node may decrypt the private transaction with the corresponding key to obtain clear text transaction content. If the client encrypts the plaintext transaction content using a symmetric encryption scheme, i.e., using a symmetric key of a symmetric encryption algorithm, the first chunk node may decrypt the private transaction using the symmetric key of the symmetric encryption algorithm, accordingly. The encryption algorithm used for symmetric encryption is, for example, DES algorithm, 3DES algorithm, TDEA algorithm, Blowfish algorithm, RC5 algorithm, IDEA algorithm, etc. The symmetric key of the symmetric encryption algorithm may be generated by the generator of the privacy transaction, determined by the client and the first blockchain node negotiation, or sent by the key management server, for example.
If the plaintext transaction contents are encrypted in an asymmetric encryption manner, i.e. by using the private key of the asymmetric encryption algorithm, the first chunk node can decrypt the private transaction by using the private key of the asymmetric encryption algorithm correspondingly. Examples of asymmetric encryption algorithms are RSA, Elgamal, knapsack Algorithm, Rabin, D-H, ECC (elliptic curve encryption Algorithm), etc. The key of the asymmetric encryption algorithm may be, for example, a pair of a public key and a private key generated by the first chunk node, and the public key is sent to the client in advance, so that the client may encrypt the plaintext transaction content with the key.
The key of the asymmetric encryption algorithm may also be generated by a key management server. Through a remote certification mode, the key management server sends the private key to the first blockchain node, and specifically, the private key can be transmitted into a surrounding ring of the first blockchain node. The first block link point may comprise a plurality of enclosures and the private key may be passed into a security enclosure of the enclosures; for example, the security circle may be a QE (listening enclosure) circle, rather than an AE (Application enclosure) circle. For asymmetrically encrypted public keys, the client may be sent by a key management server. The client can encrypt the plaintext transaction content with the public key, and accordingly, the first blockchain node can decrypt the privacy transaction with the private key to obtain the plaintext transaction content contained in the privacy transaction.
The client can also adopt a mode of combining symmetric encryption with asymmetric encryption. For example, the client encrypts the plaintext transaction content by using a symmetric encryption algorithm, that is, encrypts the plaintext transaction content by using a symmetric key of the symmetric encryption algorithm, and encrypts a symmetric key used in the symmetric encryption algorithm by using an asymmetric encryption algorithm. Generally, a public key of an asymmetric encryption algorithm is used to encrypt a symmetric key used in a symmetric encryption algorithm. Therefore, after the first block chain node receives the encrypted transaction, the first block chain node can firstly decrypt by using the private key of the asymmetric encryption algorithm to obtain the symmetric key of the symmetric encryption algorithm, and then decrypt by using the symmetric key of the symmetric encryption algorithm to obtain the plaintext transaction content.
For example, the key management server may send the private key of the asymmetric cryptographic algorithm to the enclosure of the first blockchain node and send the private key of the asymmetric cryptographic algorithm to the client through remote attestation. Therefore, the client can encrypt the plaintext transaction content by using the symmetric key of the symmetric encryption algorithm, that is, encrypt the plaintext transaction content by using the symmetric key of the symmetric encryption algorithm, and encrypt the symmetric key used in the symmetric encryption algorithm by using the public key of the asymmetric encryption algorithm. Furthermore, the client may send the private transaction and an encryption private key (obtained by encrypting a symmetric key adopted in the symmetric encryption algorithm with a public key of the asymmetric encryption algorithm) to the first blockchain node. After the first block link node receives the private transaction and the encrypted private key, the encrypted private key can be decrypted by using the private key of the asymmetric encryption algorithm to obtain a symmetric key of the symmetric encryption algorithm, and then the private transaction is decrypted by using the symmetric key of the symmetric encryption algorithm to obtain the plaintext transaction content. The encryption method is generally called digital envelope encryption.
An embodiment of a node for implementing hybrid transaction in a blockchain according to the present disclosure is described below with reference to fig. 4, where the node includes:
a receiving unit 401 for receiving a transaction;
a transaction identification unit 402, configured to identify the transaction as a plaintext transaction or a private transaction; wherein the clear text transaction corresponds to a clear text contract and the private transaction corresponds to a clear text contract and/or a private contract;
an account identification unit 403, configured to identify a generator account of the transaction as a plaintext account or a privacy account;
the execution unit 404 is configured to refuse to execute the transaction when the transaction is a plaintext transaction initiated by a private account, and otherwise, execute the transaction.
An embodiment of a system for implementing hybrid transaction in blockchain according to the present disclosure is described below with reference to fig. 5, where the system includes a client 501 and a first blockchain node 502, where:
after receiving a transaction generation request initiated by a local account, the client 501 identifies that the local account is a plaintext account or a privacy account, and requests to generate a transaction as a plaintext transaction or a privacy transaction, and rejects the transaction generation request when the privacy account requests to generate a plaintext transaction, otherwise, generates a corresponding transaction in response to the transaction generation request; wherein the clear text transaction corresponds to a clear text contract and the private transaction corresponds to a clear text contract and/or a private contract;
the first blockchain node 502 executes the plaintext transaction outside the trusted execution environment and stores the obtained plaintext execution result in an external storage space outside the trusted execution environment; or, the first blockchain node 502 decrypts the private transaction to obtain the corresponding plaintext transaction content; and executing the plaintext transaction content in a trusted execution environment, encrypting the obtained plaintext execution result into a ciphertext execution result, and storing the ciphertext execution result in the external storage space.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), Lava, Lola, HDL, PALASM, rhyd (Hardware Description Language), and the like, which are currently used in the field-Hardware Language. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.