Invention Grant
- Patent Title: Method and apparatus for obtaining number for transaction-accessed variable in blockchain in parallel
-
Application No.: US17364013Application Date: 2021-06-30
-
Publication No.: US11354335B2Publication Date: 2022-06-07
- Inventor: Xiaojian Liu
- Applicant: Alipay (Hangzhou) Information Technology Co., Ltd.
- Applicant Address: CN Zhejiang
- Assignee: Alipay (Hangzhou) Information Technology Co., Ltd.
- Current Assignee: Alipay (Hangzhou) Information Technology Co., Ltd.
- Current Assignee Address: CN Zhejiang
- Agency: Seed IP Law Group LLP
- Priority: CN202010889818.9 20200828
- Main IPC: G06F16/20
- IPC: G06F16/20 ; G06F16/27 ; G06F16/23 ; G06F16/21 ; G06F9/46 ; H04L9/32 ; G06Q20/38

Abstract:
Implementations of the present specification provide a method and an apparatus for obtaining a number for a transaction-accessed variable in parallel in a blockchain. The method includes: for a first variable in a first transaction, calculating a hash value m corresponding to a variable name of the first variable, the hash value m being a value in pre-determined M values; performing the following atomic operation on an mth bit in a bitmap in a shared memory: reading a current first value of the mth bit, setting the mth bit to 1, and returning the first value, the bitmap having M bits, and initial values of the M bits being 0; in response to the first value being 0, obtaining a first number uniquely corresponding to the first variable, the first number being a value in pre-determined N values, and N being less than M; and setting a value of an mth element in a mapping array in the shared memory based on the first number, the mapping array including a total of M elements.
Public/Granted literature
- US20220067062A1 METHOD AND APPARATUS FOR OBTAINING NUMBER FOR TRANSACTION-ACCESSED VARIABLE IN BLOCKCHAIN IN PARALLEL Public/Granted day:2022-03-03
Information query