IP Library Granted Patent US 11,210,109
Granted Patent B2
US 11,210,109 · App. 16/557,792 · Granted Dec 28, 2021

Method and system for loading resources

Inventors: Hongbo Min (Shanghai, CN); Yongsheng Zhu (Hangzhou, CN); Zhenhua Lu (Shanghai, CN); Zhiping Lin (Shanghai, CN); Yanming Cai (Hangzhou, CN); Xu Zeng (Shanghai, CN)
Assignee: BANMA ZHIXING NETWORK (HONGKONG) CO., LIMITED
G06F9/44521G06F9/542G06F16/986G06F9/451G06F2209/548
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 11,210,109
App. No.
16/557,792
Granted
Dec 28, 2021
Kind
B2
Abstract

Loading resources is disclosed including sending, using a first thread, a resource loading request to a second thread, the resource loading request including a request for a resource, the first thread and the second thread being located in one process; and the first thread running on a dynamic language runtime platform, receiving, using the first thread, an instruction sent back by the second thread in response to the resource loading request, and based on the instruction and the resource preloaded by the process, loading, using the first thread, the resource included in the resource loading request, the resource being preloaded by the process comprises a web engine.

Claims (78)

1. A method, comprising:

sending, using a first thread, a resource loading request to a second thread, wherein:

the resource loading request includes a request for a resource;

the first thread and the second thread are located in one process, wherein an event queue corresponding to the one process comprises a sub-queue corresponding to a web engine, wherein the sub-queue comprises web event requests;

the first thread runs on a dynamic language runtime platform; and

the sending of the resource loading request to the second thread comprises:

acquiring, using the first thread, a to-be-handled event request from the event queue;

in the event that the sub-queue is acquired, acquiring web event requests in the sub-queue; and

after acquiring the web event requests, sending the resource loading request to the second thread;

receiving, using the first thread, an instruction sent back by the second thread in response to the resource loading request, wherein the instruction includes at least one application programming interface (API) required by an operating system to call one or more modules, and wherein the at least one API is configured to: increase/decrease volume of a module configured to provide audio services, dynamically acquire device battery status of a module configured to implement power source management functions, acquire geographic location in real time of a module configured to provide a positioning function of the Global Positioning System (GPS) services, or any combination thereof;

preloading resources upon starting, wherein the preloaded resources include the web engine and the one or more modules provided by the operating system, wherein the one or more modules provided by the operating system comprise the module configured to provide audio services, the module configured to implement power source management functions, the module configured to provide the positioning function of the Global Positioning System (GPS) services, or any combination thereof, and wherein the one or more modules provided by the operating system are obtained by packaging code used to implement specific functions; and

based on the instruction and the preloaded resources, loading, using the first thread, the resource included in the resource loading request.

2. The method as described in claim 1 , wherein:

the event queue corresponding to the process further comprises a dynamic language runtime platform event request; and

the method further comprises:

handling all or a set quantity of the web event requests in the sub-queue; and

after handling all or the set quantity of the web event requests in the sub-queue is completed:

returning to the event queue; and

acquiring to-be-handled dynamic language runtime platform event requests from the event queue.

3. The method as described in claim 1 , wherein the loading of the resource included in the resource loading request comprises:

calling, using interfaces provided by the web engine, corresponding modules, wherein the called corresponding modules are used to load the resource included in the resource loading request;

analyzing the modules using a dynamic language engine preloaded by the process to obtain module interfaces in the operating system that are called by the modules; and

calling, using the module interfaces obtained through the analyzing of the modules, the corresponding modules in the operating system.

4. The method as described in claim 1 , wherein the sending of the resource loading request comprises:

sending the resource loading request to the second thread based on a web page access request, wherein the resource loading request requests loading of a resource of a requested web page.

5. The method as described in claim 1 , wherein:

the first thread is a main thread in the process; and

the second thread is a sub-thread in the process.

6. The method as described in claim 1 , wherein:

the dynamic language runtime platform corresponds to Node.js;

the first thread corresponds to a Node.js thread; and

the second thread corresponds to a browser thread.

7. A system, comprises:

a processor; and

a memory coupled with the processor, wherein the memory is configured to provide the processor with instructions which when executed cause the processor to:

send, using a first thread, a resource loading request to a second thread, wherein:

the resource loading request includes a request for a resource;

the first thread and the second thread are located in one process, wherein an event queue corresponding to the one process comprises a sub-queue corresponding to a web engine, wherein the sub-queue comprises web event requests;

the first thread runs on a dynamic language runtime platform; and

the sending of the resource loading request to the second thread comprises to:

acquire, using the first thread, a to-be-handled event request from the event queue;

in response to a determination that the sub-queue is acquired, acquire the web event requests in the sub-queue; and

after acquiring the web event requests, send the resource loading request to the second thread;

receive, using the first thread, an instruction sent back by the second thread in response to the resource loading request, wherein the instruction includes at least one application programming interface (API) required by an operating system to call one or more modules, and wherein the at least one API is configured to: increase/decrease volume of a module configured to provide audio services, dynamically acquire device battery status of a module configured to implement power source management functions, acquire geographic location in real time of a module configured to provide a positioning function of the Global Positioning System (GPS) services, or any combination thereof;

preload resources upon starting, wherein the preloaded resources include the web engine and the one or more modules provided by the operating system, wherein the one or more modules provided by the operating system comprise the module configured to provide audio services, the module configured to implement power source management functions, the module configured to provide the positioning function of the Global Positioning System (GPS) services, or any combination thereof, and wherein the one or more modules provided by the operating system are obtained by packaging code used to implement specific functions; and

based on the instruction and the preloaded resources, load, using the first thread, the resource included in the resource loading request, wherein the resource preloaded by the process comprises a web engine.

8. The system as described in claim 7 , wherein:

the event queue corresponding to the process further comprises a dynamic language runtime platform event request; and

the processor is further configured to:

handle all or a set quantity of the web event requests in the sub-queue; and

after handling all or the set quantity of the web event requests in the sub-queue is completed:

return to the event queue; and

acquire to-be-handled dynamic language runtime platform event requests from the event queue.

9. The system as described in claim 7 , wherein the loading of the resource included in the resource loading request comprises to:

call, using interfaces provided by the web engine, corresponding modules, wherein the called corresponding modules are used to load the resource included in the resource loading request;

analyze the modules using a dynamic language engine preloaded by the process to obtain module interfaces in the operating system that are called by the modules; and

call, using the module interfaces obtained through the analyzing of the modules, the corresponding modules in the operating system.

10. The system as described in claim 7 , wherein the sending of the resource loading request comprises to:

send the resource loading request to the second thread based on a web page access request, wherein the resource loading request requests loading of a resource of a requested web page.

11. The system as described in claim 7 , wherein:

the first thread is a main thread in the process; and

the second thread is a sub-thread in the process.

12. The system as described in claim 7 , wherein

the dynamic language runtime platform corresponds to Node.js;

the first thread corresponds to a Node.js thread; and

the second thread corresponds to a browser thread.

13. A computer program product being embodied in a tangible non-transitory computer readable storage medium and comprising computer instructions for:

sending, using a first thread, a resource loading request to a second thread, wherein:

the resource loading request includes a request for a resource;

the first thread and the second thread are located in one process, wherein an event queue corresponding to the one process comprises a sub-queue corresponding to a web engine, wherein the sub-queue comprises web event requests;

the first thread runs on a dynamic language runtime platform; and

the sending of the resource loading request to the second thread comprises:

acquiring, using the first thread, a to-be-handled event request from the event queue;

in the event that the sub-queue is acquired, acquiring web event requests in the sub-queue; and

after acquiring the web event requests, sending the resource loading request to the second thread;

receiving, using the first thread, an instruction sent back by the second thread in response to the resource loading request, wherein the instruction includes at least one application programming interface (API) required by an operating system to call one or more modules, and wherein the at least one API is configured to: increase/decrease volume of a module configured to provide audio services, dynamically acquire device battery status of a module configured to implement power source management functions, acquire geographic location in real time of a module configured to provide a positioning function of the Global Positioning System (GPS) services, or any combination thereof;

preloading resources upon starting, wherein the preloaded resources include the web engine and the one or more modules provided by the operating system, wherein the one or more modules provided by the operating system comprise the module configured to provide audio services, the module configured to implement power source management functions, the module configured to provide the positioning function of the Global Positioning System (GPS) services, or any combination thereof, and wherein the one or more modules provided by the operating system are obtained by packaging code used to implement specific functions; and

based on the instruction and the preloaded resources, loading, using the first thread, the resource included in the resource loading request.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 11, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: BANMA ZHIXING NETWORK (HONGKONG) CO., LIMITED
Reel/Frame 054384/0014 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 12, 2019
From: MIN, HONGBO; ZHU, YONGSHENG; LU, ZHENHUA; LIN, ZHIPING; CAI, YANMING; ZENG, XU
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 050986/0988 →
Priority Claims (1)
CN 201710137173.1 · Mar 8, 2017 · national
Continuity (2)
Continuation In Part PCTCN2018077220 · Feb 26, 2018
Related Publication 20200057658A1 · Feb 20, 2020