IP Library Granted Patent US 10,877,899
Granted Patent B2
US 10,877,899 · App. 16/893,201 · Granted Dec 29, 2020

System and method for data processing

Inventor: Dongwei Li (Hangzhou, CN)
Assignee: ADVANCED NEW TECHNOLOGIES CO., LTD.
G06F12/10G06F9/45533G06F2212/152
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,877,899
App. No.
16/893,201
Granted
Dec 29, 2020
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for data processing are provided. One of the methods includes: obtaining a bytecode compiled from source code comprising one or more input parameters, the source code including an encoding function to encode the one or more input parameters, save the encoded one or more input parameters in a memory segment, and provide a memory location of the memory segment; executing, according to the bytecode, the encoding function to encode the one or more input parameters to obtain the memory location of the memory segment storing the encoded one or more input parameters; and providing the memory location to a function for retrieving and decoding the encoded one or more input parameters to obtain the one or more input parameters.

Claims (38)

1. A computer-implemented method for data processing, comprising:

obtaining, by a virtual machine, bytecode compiled from source code, wherein the source code includes one or more input parameters and an encoding function configured to encode the one or more input parameters, save the encoded one or more input parameters in a memory segment, and provide a memory location of the memory segment, and wherein the memory location comprises an address corresponding to the memory segment;

at the virtual machine, encoding the one or more input parameters, saving the encoded one or more input parameters in the memory segment, and obtaining the memory location of the memory segment storing the encoded one or more input parameters by executing the encoding function according to the bytecode; and

providing, by the virtual machine, the memory location to a function configured to retrieve and decode the encoded one or more input parameters to obtain the one or more input parameters.

2. The method of claim 1 , wherein the address in the bytecode is shifted by the compilation from the source code.

3. The method of claim 2 , further comprising:

restoring, by the virtual machine, the shifted address according to a storage starting location of the virtual machine and an address shift obtained by the virtual machine;

retrieving, by the virtual machine, the encoded one or more input parameters according to the restored address; and

decoding, by the virtual machine, the encoded one or more input parameters to retrieve the one or more input parameters.

4. The method of claim 1 , wherein at least one of the one or more input parameters comprises a pointer type variable.

5. The method of claim 4 , wherein the pointer type variable comprises a multiple indirection type variable.

6. The method of claim 1 , wherein the memory location of the memory segment comprises a pointer corresponding to a starting or ending address of the memory segment and a data length corresponding to the memory segment.

7. The method of claim 1 , wherein the memory location of the memory segment comprises a first pointer corresponding to a starting address of the memory segment and a second pointer corresponding to an ending address of the memory segment.

8. The method of claim 1 , wherein obtaining the bytecode compiled from the source code comprises:

obtaining, from a computing device, the bytecode compiled by a compiler associated with the computing device from the source code.

9. The method of claim 8 , wherein the virtual machine and the compiler have different word sizes.

10. The method of claim 1 , wherein the virtual machine is based on a WebAssembly (WASM) format.

11. The method of claim 1 , further comprising:

invoking a different function based on the one or more input parameters to return one or more output parameters of the different function, wherein the one or more output parameters correspond to a state of a blockchain; and

encoding the one or more output parameters.

12. A non-transitory computer-readable storage medium storing instructions executable by one or more processors, wherein execution of the instructions causes the one or more processors to perform operations comprising:

obtaining, by a virtual machine, bytecode compiled from source code, wherein the source code includes one or more input parameters and an encoding function configured to encode the one or more input parameters, save the encoded one or more input parameters in a memory segment, and provide a memory location of the memory segment, and wherein the memory location comprises an address corresponding to the memory segment;

at the virtual machine, encoding the one or more input parameters, saving the encoded one or more input parameters in the memory segment, and obtaining the memory location of the memory segment storing the encoded one or more input parameters by executing the encoding function according to the bytecode; and

providing, by the virtual machine, the memory location to a function configured to retrieve and decode the encoded one or more input parameters to obtain the one or more input parameters.

13. The non-transitory computer-readable storage medium of claim 12 , wherein the address in the bytecode is shifted by the compilation from the source code.

14. The non-transitory computer-readable storage medium of claim 13 , wherein the operations further comprise:

restoring, by the virtual machine, the shifted address according to a storage starting location of the virtual machine and an address shift obtained by the virtual machine;

retrieving, by the virtual machine, the encoded one or more input parameters according to the restored address; and

decoding, by the virtual machine, the encoded one or more input parameters to retrieve the one or more input parameters.

15. The non-transitory computer-readable storage medium of claim 12 , wherein at least one of the one or more input parameters comprises a pointer type variable.

16. The non-transitory computer-readable storage medium of claim 15 , wherein the pointer type variable comprises a multiple indirection type variable.

17. The non-transitory computer-readable storage medium of claim 12 , wherein the memory location of the memory segment comprises a pointer corresponding to a starting or ending address of the memory segment and a data length corresponding to the memory segment.

18. The non-transitory computer-readable storage medium of claim 12 , wherein the memory location of the memory segment comprises a first pointer corresponding to a starting address of the memory segment and a second pointer corresponding to an ending address of the memory segment.

19. The non-transitory computer-readable storage medium of claim 12 , wherein the virtual machine is based on a WebAssembly (WASM) format.

20. A system, comprising one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors and configured with instructions executable by the one or more processors to cause the system to perform operations comprising:

obtaining, by a virtual machine, bytecode compiled from source code, wherein the source code includes one or more input parameters and an encoding function configured to encode the one or more input parameters, save the encoded one or more input parameters in a memory segment, and provide a memory location of the memory segment, and wherein the memory location comprises an address corresponding to the memory segment;

at the virtual machine, encoding the one or more input parameters, saving the encoded one or more input parameters in the memory segment, and obtaining the memory location of the memory segment storing the encoded one or more input parameters by executing the encoding function according to the bytecode; and

providing, by the virtual machine, the memory location to a function configured to retrieve and decode the encoded one or more input parameters to obtain the one or more input parameters.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053796/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053702/0392 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 4, 2020
From: LI, DONGWEI
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 052847/0799 →