Method and apparatus for obtaining number for transaction-accessed variable in blockchain in parallel
AssigneeAlipay (Hangzhou) Information Technology Co., Ltd.
InventorXiaojian LIU
Life of this patent
Estimating the term…
Loading patent…
AssigneeAlipay (Hangzhou) Information Technology Co., Ltd.
InventorXiaojian LIU
Estimating the term…
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.
A method, comprising:
(canceled)
(canceled)
A non-transitory computer readable storage medium, storing executable instructions, which when executed by a processor enable the processor to implement acts including:
A computing device, comprising a memory and a processor, the memory storing executable instructions, the executable instructions, when executed by the processor, configure the processor to implement acts including:
(canceled)
A method, comprising:
Dependencies are inferred from the claim text.