IP Library Granted Patent US 10,762,228
Granted Patent B2
US 10,762,228 · App. 16/788,247 · Granted Sep 1, 2020

Transaction scheduling method and apparatus

Inventors: Qi Liu (Hangzhou, CN); Ying Yan (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F21/6218G06F16/24552H04L9/0637H04L2209/38
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,762,228
App. No.
16/788,247
Granted
Sep 1, 2020
Kind
B2
Abstract

Implementations of this specification provide a method and apparatus for transaction scheduling in a blockchain. An example method performed by a node in the blockchain includes receiving a first privacy transaction, and determining a data volume of the first privacy transaction; determining a first summation value by adding the data volume of the first privacy transaction to a data volume of all privacy transactions in a buffer queue, and adding the first privacy transaction to the buffer queue; receiving a second privacy transaction, and determining a data volume of the second privacy transaction; determining a second summation value by adding the data volume of the second privacy transaction to a data volume of all privacy transactions in the buffer queue, and packaging all privacy transactions in the buffer queue and transferring the packaged privacy transactions into a trusted environment; and adding the second privacy transaction to the buffer queue.

Claims (73)

1. A method comprising:

receiving, by a blockchain node, a first privacy transaction, and determining, by the blockchain node, a first data volume of the first privacy transaction;

determining, by the blockchain node, a first summation value by adding the first data volume of the first privacy transaction to a first data volume of all privacy transactions in a buffer queue;

in response to determining, by the blockchain node, that the first summation value is not greater than a predetermined threshold, adding the first privacy transaction to the buffer queue;

receiving, by the blockchain node, a second privacy transaction, and determining, by the blockchain node, a second data volume of the second privacy transaction;

determining, by the blockchain node, a second summation value by adding the second data volume of the second privacy transaction to a second data volume of all privacy transactions in the buffer queue;

in response to determining, by the blockchain node, that the second summation value is greater than the predetermined threshold, packaging, by the blockchain node, all privacy transactions in the buffer queue and transferring the packaged privacy transactions into a trusted environment; and

adding the second privacy transaction to the buffer queue.

2. The method according claim 1 , further comprising:

recording, by the blockchain node, a waiting duration of a given privacy transaction, the given privacy transaction having been added first to the buffer queue; and

in response to the waiting duration reaching a predetermined duration, packaging, by the blockchain node, all privacy transactions in the buffer queue for transfer into the trusted environment.

3. The method according to claim 1 , further comprising:

in response to receiving a plaintext transaction, packaging, by the blockchain node, all privacy transactions in the buffer queue for transfer into the trusted environment; and

executing, by the blockchain node, the plaintext transaction outside of the trusted environment.

4. The method according to claim 1 , further comprising:

identifying, by the blockchain node, that a received transaction is a privacy transaction or a plaintext transaction based on a type field included in the received transaction.

5. The method according to claim 1 , wherein the predetermined threshold is not greater than a size of pre-allocated space of an enclave page cache on the blockchain node.

6. The method according to claim 1 , wherein transaction content of a given privacy transaction is encrypted by a transaction initiator, the method further comprising:

decrypting, by the blockchain node, the given privacy transaction in the trusted environment to obtain plaintext transaction content; and

executing, by the blockchain node, the plaintext transaction content in the trusted environment.

7. The method according to claim 6 , further comprising:

encrypting, by the blockchain node, a transaction execution result in the trusted environment; and

sending, by the blockchain node, the encrypted transaction execution result to the transaction initiator, wherein the transaction initiator decrypts the encrypted transaction execution result.

8. The method according to claim 6 , wherein the plaintext transaction content is related to a smart contract, and

executing, by the blockchain node, the plaintext transaction content in the trusted environment comprises executing, by the blockchain node, the smart contract corresponding to the plaintext transaction content in the trusted environment, and the method further comprises:

encrypting, by the blockchain node, at least one contract status corresponding to the smart contract in the trusted environment; and

writing an obtained encrypted contract status into a database.

9. A computer-implemented system, comprising:

one or more computers; and

one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform operations comprising:

receiving, by a blockchain node, a first privacy transaction, and determining, by the blockchain node, a first data volume of the first privacy transaction;

determining, by the blockchain node, a first summation value by adding the first data volume of the first privacy transaction to a first data volume of all privacy transactions in a buffer queue;

in response to determining, by the blockchain node, that the first summation value is not greater than a predetermined threshold, adding the first privacy transaction to the buffer queue;

receiving, by the blockchain node, a second privacy transaction, and determining, by the blockchain node, a second data volume of the second privacy transaction;

determining, by the blockchain node, a second summation value by adding the second data volume of the second privacy transaction to a second data volume of all privacy transactions in the buffer queue;

in response to determining, by the blockchain node, that the second summation value is greater than the predetermined threshold, packaging, by the blockchain node, all privacy transactions in the buffer queue and transferring the packaged privacy transactions into a trusted environment; and

adding the second privacy transaction to the buffer queue.

10. The system according claim 9 , the operations further comprising:

recording, by the blockchain node, a waiting duration of a given privacy transaction, the given privacy transaction having been added first to the buffer queue; and

in response to the waiting duration reaching a predetermined duration, packaging, by the blockchain node, all privacy transactions in the buffer queue for transfer into the trusted environment.

11. The system according to claim 9 , the operations further comprising:

in response to receiving a plaintext transaction, packaging, by the blockchain node, all privacy transactions in the buffer queue for transfer into the trusted environment; and

executing, by the blockchain node, the plaintext transaction outside of the trusted environment.

12. The system according to claim 9 , the operations further comprising:

identifying, by the blockchain node, that a received transaction is a privacy transaction or a plaintext transaction based on a type field included in the received transaction.

13. The system according to claim 9 , wherein the predetermined threshold is not greater than a size of pre-allocated space of an enclave page cache on the blockchain node.

14. The system according to claim 9 , wherein transaction content of a given privacy transaction is encrypted by a transaction initiator, the operations further comprising:

decrypting, by the blockchain node, the given privacy transaction in the trusted environment to obtain plaintext transaction content; and

executing, by the blockchain node, the plaintext transaction content in the trusted environment.

15. The system according to claim 14 , the operations further comprising:

encrypting, by the blockchain node, a transaction execution result in the trusted environment; and

sending, by the blockchain node, the encrypted transaction execution result to the transaction initiator, wherein the transaction initiator decrypts the encrypted transaction execution result.

16. The system according to claim 14 , wherein the plaintext transaction content is related to a smart contract, and

executing, by the blockchain node, the plaintext transaction content in the trusted environment comprises executing, by the blockchain node, the smart contract corresponding to the plaintext transaction content in the trusted environment, and the operations further comprise:

encrypting, by the blockchain node, at least one contract status corresponding to the smart contract in the trusted environment; and

writing an obtained encrypted contract status into a database.

17. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:

receiving, by a blockchain node, a first privacy transaction, and determining, by the blockchain node, a first data volume of the first privacy transaction;

determining, by the blockchain node, a first summation value by adding the first data volume of the first privacy transaction to a first data volume of all privacy transactions in a buffer queue;

in response to determining, by the blockchain node, that the first summation value is not greater than a predetermined threshold, adding the first privacy transaction to the buffer queue;

receiving, by the blockchain node, a second privacy transaction, and determining, by the blockchain node, a second data volume of the second privacy transaction;

determining, by the blockchain node, a second summation value by adding the second data volume of the second privacy transaction to a second data volume of all privacy transactions in the buffer queue;

in response to determining, by the blockchain node, that the second summation value is greater than the predetermined threshold, packaging, by the blockchain node, all privacy transactions in the buffer queue and transferring the packaged privacy transactions into a trusted environment; and

adding the second privacy transaction to the buffer queue.

18. The computer-readable medium according claim 17 , the operations further comprising:

recording, by the blockchain node, a waiting duration of a given privacy transaction, the given privacy transaction having been added first to the buffer queue; and

in response to the waiting duration reaching a predetermined duration, packaging, by the blockchain node, all privacy transactions in the buffer queue for transfer into the trusted environment.

19. The computer-readable medium according claim 17 , the operations further comprising:

in response to receiving a plaintext transaction, packaging, by the blockchain node, all privacy transactions in the buffer queue for transfer into the trusted environment; and

executing, by the blockchain node, the plaintext transaction outside of the trusted environment.

20. The computer-readable medium according claim 17 , wherein transaction content of a given privacy transaction is encrypted by a transaction initiator, the operations further comprising:

decrypting, by the blockchain node, the given privacy transaction in the trusted environment to obtain plaintext transaction content; and

executing, by the blockchain node, the plaintext transaction content in the trusted environment.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 18, 2025
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ANTCHAIN TECHNOLOGY PTE. LTD.
Reel/Frame 070253/0064 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053754/0625 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053743/0464 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 30, 2020
From: LIU, QI; YAN, YING
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 052540/0490 →