CN111475259A - Applet loading method and device and electronic equipment - Google Patents

Applet loading method and device and electronic equipment Download PDF

Info

Publication number
CN111475259A
CN111475259A CN202010256753.4A CN202010256753A CN111475259A CN 111475259 A CN111475259 A CN 111475259A CN 202010256753 A CN202010256753 A CN 202010256753A CN 111475259 A CN111475259 A CN 111475259A
Authority
CN
China
Prior art keywords
applet
code
target
loading
hosting service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010256753.4A
Other languages
Chinese (zh)
Other versions
CN111475259B (en
Inventor
陈都
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010256753.4A priority Critical patent/CN111475259B/en
Publication of CN111475259A publication Critical patent/CN111475259A/en
Application granted granted Critical
Publication of CN111475259B publication Critical patent/CN111475259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a method and a device for loading an applet and electronic equipment, and relates to the applet technology in the technical field of computers. The specific implementation scheme is as follows: acquiring an applet service code of a target applet under the condition that a first operation aiming at an entrance of the target applet is received; hosting the applet business code by a code hosting service in the electronic device; loading the applet business code hosted by the code hosting service. In this way, by hosting the applet business code by the code hosting service, the limitation of the use function of the loaded applet can be reduced, so that the use function of the loaded applet is more.

Description

Applet loading method and device and electronic equipment
Technical Field
The present application relates to an applet technology in the field of computer technologies, and in particular, to an applet loading method and apparatus, and an electronic device.
Background
The applet is a storage and offline Application which is developed based on H5 and can be used without downloading and installation, so that the Application use of the Application becomes more convenient for users, and therefore more and more Applications (APP) have turned into an applet form bearer.
Disclosure of Invention
The utility model provides an applet loading method, device and electronic equipment, which aims to solve the problem that the use functions of the currently loaded applet are few.
According to a first aspect, there is provided an applet loading method applied to an electronic device, including:
acquiring an applet service code of a target applet under the condition that a first operation aiming at an entrance of the target applet is received;
hosting the applet business code by a code hosting service in the electronic device;
loading the applet business code hosted by the code hosting service.
According to a second aspect, there is also provided an applet loading apparatus comprising:
the service code acquisition module is used for acquiring an applet service code of a target applet under the condition that a first operation aiming at an entrance of the target applet is received;
the business code hosting module is used for hosting the applet business codes through a code hosting service in the electronic equipment;
and the business code loading module is used for loading the applet business code hosted by the code hosting service.
According to a third aspect, there is also provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
According to a fourth aspect, there is also provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the first aspect described above.
In the method, an applet service code of a target applet is acquired under the condition that a first operation aiming at an entry of the target applet is received; hosting the applet business code by a code hosting service in the electronic device; loading the applet business code hosted by the code hosting service. In this way, by hosting the applet business code by the code hosting service, the limitation of the use function of the loaded applet can be reduced, so that the use function of the loaded applet is more.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is one of schematic diagrams according to a first embodiment of the present application;
FIG. 2 is a second schematic diagram according to the first embodiment of the present application;
FIG. 3 is one of the schematic diagrams according to a second embodiment of the present application;
FIG. 4 is a second schematic diagram according to a second embodiment of the present application;
FIG. 5 is a third schematic diagram according to a second embodiment of the present application;
FIG. 6 is a fourth schematic view in accordance with a second embodiment of the present application;
fig. 7 is a block diagram of an electronic device for implementing the applet loading method according to the embodiment of the application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1, an applet loading method provided in an embodiment of the present application may be applied to an electronic device, and as shown in fig. 1, the applet loading method includes the following steps:
step 101, in case of receiving a first operation for an entry of a target applet, acquiring an applet service code of the target applet.
In the present application, the electronic device may obtain an applet service code of the target applet, upon receiving a first operation directed to an entry of the target applet.
The target applet may be any applet that can be loaded in the electronic device, which is developed based on H5 and can be run on the host application program, or can be run on a web page, and so on.
In addition, the first operation may be any operation for instructing to run the target applet, and may be at least one of a touch operation, a voice operation, or a gesture operation over the air, for example, the first operation may be a click operation on an entry of the target applet displayed on an interface of the host application program or a page of the web page, and the like.
In step 101, the electronic device may obtain the applet service code of the target applet, where the electronic device sends an applet package obtaining request to a cloud server storing the applet package of the target applet in response to the first operation, the cloud server sends the applet package of the target applet to the electronic device in response to the applet package obtaining request, and the electronic device decompresses the applet package of the target applet to obtain the applet service code and stores the applet service code in a local storage space when receiving the applet package of the target applet.
For example, as shown in fig. 2, in the process of developing an applet, a developer may package an applet service code of a target applet into an applet package through a developer tool and upload the applet package to an applet B of a cloud server, the cloud server performs operations such as auditing, previewing, and issuing on the applet package uploaded to the applet B, and stores the applet package to an applet C of the cloud server, and in a case that an electronic device receives the first operation, the applet C of the cloud server may encrypt and transmit the applet package of the target applet to the electronic device, and the electronic device decrypts, verifies, and installs the applet service code of the target applet and stores the applet service code in a local storage space.
And step 102, hosting the applet business code through a code hosting service in the electronic equipment.
In the application, after the electronic device obtains the applet business code of the target applet, the electronic device can host the applet business code through the code hosting service of the electronic device.
The code hosting service can be any hosting service used for hosting the applet business code, the applet business code is loaded under the condition that the code hosting service hosts the applet business code, an Input/Output (IO) thread is created by the electronic device to load the applet business code, and the applet business code is not loaded by drawing a main thread through a User graphical Interface (UI), so that the calculation cost of occupying the UI main thread can be avoided, and the possibility of loading and blocking when the electronic device runs the applet is reduced.
In some embodiments, the code hosting service may be a hypertext transfer Protocol (HTTP) -based code hosting service.
Here, the applet service code is hosted by the code hosting service based on the HTTP, and in the running process of the applet service code, an HTTP function (such as HTTP Cache (i.e. Cache)) of the applet can be implemented, so that the function in the running of the applet is more complete.
It should be noted that the code hosting service is pre-established in the electronic device, and before the electronic device hosts the applet business code through the code hosting service, the electronic device may start and initialize the code hosting service, so as to ensure that a normal hosting service is provided for the applet business code.
And 103, loading the applet business code hosted by the code hosting service.
In this application, after the electronic device hosts the applet business code through the code hosting service thereof, when the applet business code hosted by the code hosting service needs to be loaded, the electronic device may load the applet business code.
The loading of the applet service code hosted by the code hosting service may be performed by drawing a main thread, that is, a UI main thread, through a User graphical Interface (UI) in a network view.
Alternatively, in some embodiments, the step 103 may include:
loading the applet business code hosted by the code hosting service through a first Input Output (IO) thread, wherein the first IO thread is associated with the code hosting service.
Here, the electronic device may load the applet business code through the first IO thread, where the first IO thread is an IO thread that is created under a condition that a code hosting service provides a hosting service and is used for loading the applet business code, so that computational overhead of occupying a UI main thread may be avoided, and a possibility that the electronic device is loaded and stuck when running the applet is reduced.
The loading of the applet business code hosted by the code hosting service through the first IO thread may be that the electronic device loads, through the first IO thread, an object code associated with a second operation hosted by the code hosting service under the condition that the second operation of browsing the target applet is received.
For example, when the electronic device receives a click operation on a certain function entry in a page of a displayed target applet, the electronic device may load a business code associated with the click operation and hosted by the code hosting service, such as a click operation on a "movie" entry in the page of a video playing applet, a loading of a business code hosted by the code hosting service and corresponding to a movie playing function through the first IO thread, and so on.
In addition, the operation of the applet is usually realized by loading the applet service code in a container, and for the normal loading of the applet service code by the container, an applet frame code for building a frame for the applet operation needs to be loaded in the container in advance. It should be noted that the applet framework code can set up a framework for any applet in the electronic device to run.
In this application, the loading of the applet frame code in the container in advance may be loading the applet frame code from a local cache through a file protocol (e.g., file protocol) of a web view (i.e., WebView).
Alternatively, in some embodiments, before the step 103, the method may further include:
hosting applet frame codes through the code hosting service under the condition that an applet frame code hosting request is received, wherein the applet frame codes are used for building a frame for the target applet to run;
and loading the applet framework code hosted by the code hosting service to a target container, wherein the target container is used for loading the applet business code.
Here, the electronic device may also host the applet frame code through the code hosting service thereof, so that limitation of the use function of the page frame when the applet is loaded may be reduced, and the number of the use functions of the loaded applet may be increased.
Of course, the loading of the applet frame code hosted by the code hosting service to the target container may be performed by drawing a main thread, that is, a User Interface (UI) main thread, through a User gui in a network view, and loading the applet frame code hosted by the code hosting service to the target container.
Alternatively, in some embodiments, the loading the applet framework code hosted by the code hosting service to the target container includes:
and loading the applet frame code hosted by the code hosting service to a target container through a second IO thread, wherein the target container is used for loading the applet business code, and the second IO thread is associated with the code hosting service.
Here, the applet frame code hosted by the code hosting service is loaded to the target container through the second IO thread, so that the applet frame code is prevented from occupying the UI main thread when being loaded, and the possibility of loading jamming of the electronic device during running the applet is further reduced.
The second IO thread is a thread created under the condition that the code hosting service hosts the applet frame code and used for loading the applet frame code, and the second IO thread and the first IO thread may be the same thread or different threads.
In addition, when the request for hosting the applet frame code is received, before hosting the applet frame code by the code hosting service, the method further includes:
receiving the managed applet frame code request if a third operation for indicating to run a target application program is received or a fourth operation for opening a target webpage is received, wherein the target application program is a host application program of the target applet, and the target webpage is a webpage for displaying an entrance of the target applet.
Here, the electronic device may receive the applet hosting frame code request when receiving a host application instructing to run the target applet or opening a web page displaying an entry of the target applet, so that the applet frame code is loaded more timely and the applet loading efficiency is improved.
It should be noted that, the loading of the applet frame code hosted by the code hosting service to the target container through the second IO thread may be loading the applet frame code hosted by the code hosting service to the target container through the second IO thread when the electronic device receives a request for acquiring a resource from the applet frame code.
In this application, after the step 103, that is, after the electronic device finishes loading the applet service code of the target applet, the electronic device may perform other processing related to the applet running, for example, the processing may be to destroy and restart the applet running environment, destroy the applet background at regular time and normally quit the user, or perform flow processing on the code hosting service in the case of restarting the applet running environment, or the like.
In addition, when the target applet is destroyed or quits, the electronic device may perform corresponding processing only according to the local path of the code hosting service, and reinitialize the code hosting service; after the target applet exits, the electronic device may control the code hosting service to immediately release the applet service code of the target applet, thereby saving memory overhead.
In some embodiments, after the loading the applet business code hosted by the code hosting service, further comprising: under the condition that the target applet quits is detected, the code hosting service is kept started, and the applet business codes of the target applet hosted in the code hosting service are released when a preset interval duration is reached, so that the initialization times of the code hosting service can be reduced, and the applet loading efficiency is improved; in addition, when the small program exits due to misoperation of a user, the small program can be quickly loaded.
In addition, after the target applet exits, the applet frame code may continue to provide a running frame for other applets without performing a reboot and deployment operation, and the reboot and deployment operation may be performed on the applet frame code only when the applet frame code is updated, that is, after the applet frame code hosted by the code hosting service is loaded into the target container, the method further includes: and under the condition that the applet frame code is detected to be updated, hosting the updated applet frame code through the code hosting service, and loading the applet frame code hosted by the code hosting service to a target container.
In the method, under the condition that a first operation aiming at an inlet of a target small program is received, a small program service code of the target small program is obtained; hosting the applet business code by a code hosting service in the electronic device; loading the applet business code hosted by the code hosting service. In this way, by hosting the applet business code by the code hosting service, the limitation of the use function of the loaded applet can be reduced, so that the use function of the loaded applet is more.
Referring to fig. 3, an applet loading apparatus according to an embodiment of the present application is provided, as shown in fig. 3, an applet loading apparatus 300 includes:
a service code acquisition module 301, configured to acquire an applet service code of a target applet, in a case where a first operation for an entry of the target applet is received;
a business code hosting module 302, configured to host the applet business code through a code hosting service in the electronic device;
a business code loading module 303, configured to load the applet business code hosted by the code hosting service.
Optionally, the service code loading module 303 is specifically configured to:
loading the applet business code hosted by the code hosting service through a first Input Output (IO) thread, wherein the first IO thread is associated with the code hosting service.
Optionally, as shown in fig. 4, the apparatus 300 further includes:
a framework code hosting module 304, configured to host, through the code hosting service, an applet framework code used for building a framework for the target applet to run, in a case where a request to host the applet framework code is received;
a frame code loading module 305, configured to load the applet frame code hosted by the code hosting service into a target container, where the target container is used to load the applet business code.
Optionally, the framework code loading module 305 is specifically configured to:
and loading the applet frame code hosted by the code hosting service to a target container through a second IO thread, wherein the target container is used for loading the applet business code, and the second IO thread is associated with the code hosting service.
Optionally, as shown in fig. 5, the apparatus 300 further includes:
a request receiving module 306, configured to receive the managed applet frame code request if a third operation for instructing to run a target application program is received or a fourth operation for opening a target webpage is received, where the target application program is a host application program of the target applet, and the target webpage is a webpage for displaying an entry of the target applet.
Optionally, the code hosting service is an HTTP-based code hosting service.
Optionally, as shown in fig. 6, the apparatus 300 further includes:
the code releasing module 307 is configured to, when it is detected that the target applet exits, keep the code hosting service open, and release the applet business code of the target applet hosted in the code hosting service when a preset interval duration is reached.
It should be noted that the applet loading apparatus 300 can implement each process implemented by the electronic device in the embodiment of the method in fig. 1 of the present application, and achieve the same beneficial effects, and for avoiding repetition, details are not described here again.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 7 is a block diagram of an electronic device according to an applet loading method in an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 7, the electronic apparatus includes: one or more processors 701, a memory 702, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 7, one processor 701 is taken as an example.
The memory 702 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the applet loading method provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the applet loading method provided herein.
The memory 702, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the applet loading method in the embodiments of the application (for example, the business code acquiring module 301, the business code hosting module 302, and the business code loading module 303 shown in fig. 3). The processor 701 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 702, that is, implements the applet loading method in the above-described method embodiments.
The memory 702 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the electronic device based on detection of echo delay, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 702 may optionally include memory located remotely from the processor 701, and such remote memory may be connected over a network to the electronic device for detection of echo time delays. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the applet loading method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected by a bus or other means, and fig. 7 illustrates an example of a connection by a bus.
The input device 703 may receive input numeric or character information, and generate key signal inputs related to user settings and function controls of the electronic device for detection of echo time delays, such as a touch screen, keypad, mouse, track pad, touch pad, pointing stick, one or more mouse buttons, track ball, joystick, etc. the output device 704 may include a display device, auxiliary lighting (e.g., L ED), and tactile feedback (e.g., vibration motor), etc.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable logic devices (P L D)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal.
The systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or L CD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer for providing interaction with the user.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., AN application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with AN implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
In the method, an applet service code of a target applet is acquired under the condition that a first operation aiming at an entry of the target applet is received; hosting the applet business code by a code hosting service in the electronic device; loading the applet business code hosted by the code hosting service. In this way, by hosting the applet business code by the code hosting service, the limitation of the use function of the loaded applet can be reduced, so that the use function of the loaded applet is more.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (16)

1. An applet loading method applied to an electronic device is characterized by comprising the following steps:
acquiring an applet service code of a target applet under the condition that a first operation aiming at an entrance of the target applet is received;
hosting the applet business code by a code hosting service in the electronic device;
loading the applet business code hosted by the code hosting service.
2. The method of claim 1, wherein loading the applet business code hosted by the code hosting service comprises:
loading the applet business code hosted by the code hosting service through a first Input Output (IO) thread, wherein the first IO thread is associated with the code hosting service.
3. The method of claim 1, wherein prior to loading the applet business code hosted by the code hosting service, further comprising:
hosting applet frame codes through the code hosting service under the condition that an applet frame code hosting request is received, wherein the applet frame codes are used for building a frame for the target applet to run;
and loading the applet framework code hosted by the code hosting service to a target container, wherein the target container is used for loading the applet business code.
4. The method of claim 3, wherein loading the applet framework code hosted by the code hosting service to a target container comprises:
and loading the applet frame code hosted by the code hosting service to a target container through a second IO thread, wherein the target container is used for loading the applet business code, and the second IO thread is associated with the code hosting service.
5. The method of claim 3, wherein prior to hosting the applet frame code by the code hosting service in the event that a request to host the applet frame code is received, further comprising:
receiving the managed applet frame code request if a third operation for indicating to run a target application program is received or a fourth operation for opening a target webpage is received, wherein the target application program is a host application program of the target applet, and the target webpage is a webpage for displaying an entrance of the target applet.
6. The method according to any one of claims 1 to 5, wherein the code hosting service is a code hosting service based on the hypertext transfer protocol (HTTP).
7. The method of any of claims 1 to 5, wherein after loading the applet business code hosted by the code hosting service, further comprising:
and under the condition that the target applet is detected to exit, keeping the code hosting service started, and releasing the applet business codes of the target applet hosted in the code hosting service when a preset interval duration is reached.
8. An applet loading apparatus, comprising:
the service code acquisition module is used for acquiring an applet service code of a target applet under the condition that a first operation aiming at an entrance of the target applet is received;
the service code hosting module is used for hosting the applet service codes through a code hosting service in the electronic equipment;
and the business code loading module is used for loading the applet business code hosted by the code hosting service.
9. The apparatus according to claim 8, wherein the service code loading module is specifically configured to:
loading the applet business code hosted by the code hosting service through a first Input Output (IO) thread, wherein the first IO thread is associated with the code hosting service.
10. The apparatus of claim 8, further comprising:
the framework code hosting module is used for hosting the applet framework code through the code hosting service under the condition that an applet framework code hosting request is received, and the applet framework code is used for building a framework for the target applet to run;
and the frame code loading module is used for loading the applet frame code hosted by the code hosting service to a target container, and the target container is used for loading the applet business code.
11. The apparatus of claim 10, wherein the framework code loading module is specifically configured to:
and loading the applet frame code hosted by the code hosting service to a target container through a second IO thread, wherein the target container is used for loading the applet business code, and the second IO thread is associated with the code hosting service.
12. The apparatus of claim 10, further comprising:
a request receiving module, configured to receive the applet hosting frame code request if a third operation for instructing to run a target application program is received or a fourth operation for opening a target webpage is received, where the target application program is a host application program of the target applet and the target webpage is a webpage for displaying an entry of the target applet.
13. The apparatus of any of claims 8 to 12, wherein the code hosting service is an HTTP-based code hosting service.
14. The apparatus of any one of claims 8 to 12, further comprising:
and the code release module is used for keeping the code hosting service started under the condition that the target applet is detected to exit, and releasing the applet business code of the target applet hosted in the code hosting service when a preset interval duration is reached.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202010256753.4A 2020-04-02 2020-04-02 Applet loading method and device and electronic equipment Active CN111475259B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010256753.4A CN111475259B (en) 2020-04-02 2020-04-02 Applet loading method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010256753.4A CN111475259B (en) 2020-04-02 2020-04-02 Applet loading method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111475259A true CN111475259A (en) 2020-07-31
CN111475259B CN111475259B (en) 2023-06-09

Family

ID=71749675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010256753.4A Active CN111475259B (en) 2020-04-02 2020-04-02 Applet loading method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111475259B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069490A (en) * 2020-08-27 2020-12-11 北京百度网讯科技有限公司 Method, device, electronic equipment and storage medium for providing applet capability
CN112286656A (en) * 2020-10-21 2021-01-29 百度在线网络技术(北京)有限公司 Applet simulation method, apparatus, electronic device and computer readable storage medium
CN112379945A (en) * 2020-11-20 2021-02-19 北京百度网讯科技有限公司 Method, device, equipment and storage medium for running application
CN112579096A (en) * 2020-12-18 2021-03-30 北京百度网讯科技有限公司 Method, device, equipment and medium for compiling and loading small program starting file
CN112631689A (en) * 2021-01-04 2021-04-09 北京字节跳动网络技术有限公司 Application program loading method and device and computer storage medium
CN113553074A (en) * 2021-07-23 2021-10-26 北京百度网讯科技有限公司 Applet distribution control method, device, electronic equipment and storage medium
CN114090118A (en) * 2021-11-11 2022-02-25 北京百度网讯科技有限公司 Method, device and equipment for starting small program and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010056462A1 (en) * 2000-01-06 2001-12-27 Katsuhisa Kataoka Method for starting application programs and software product for starting application programs
US20020138634A1 (en) * 2001-03-26 2002-09-26 Curl Corporation System and methods for securely permitting mobile code to access resources over a network
US20080295110A1 (en) * 2007-05-23 2008-11-27 Fabrizio Muscarella Framework for Startup of Local Instance of Remote Application
CN101788905A (en) * 2009-01-22 2010-07-28 上海科泰世纪科技有限公司 Object managing method of Applet
CN101826004A (en) * 2009-03-02 2010-09-08 上海科泰世纪科技有限公司 Method for mandating functions by Applet
CN104583953A (en) * 2012-08-30 2015-04-29 微软公司 Search extensibility application framework in a hosted search
CN108132809A (en) * 2017-11-29 2018-06-08 五八有限公司 Method, apparatus, terminal and the storage medium of loading
CN110489158A (en) * 2019-08-01 2019-11-22 北京字节跳动网络技术有限公司 Method, apparatus, medium and the electronic equipment that code hosted platform is optimized
CN110750255A (en) * 2019-09-25 2020-02-04 支付宝(杭州)信息技术有限公司 Applet rendering method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010056462A1 (en) * 2000-01-06 2001-12-27 Katsuhisa Kataoka Method for starting application programs and software product for starting application programs
US20020138634A1 (en) * 2001-03-26 2002-09-26 Curl Corporation System and methods for securely permitting mobile code to access resources over a network
US20080295110A1 (en) * 2007-05-23 2008-11-27 Fabrizio Muscarella Framework for Startup of Local Instance of Remote Application
CN101788905A (en) * 2009-01-22 2010-07-28 上海科泰世纪科技有限公司 Object managing method of Applet
CN101826004A (en) * 2009-03-02 2010-09-08 上海科泰世纪科技有限公司 Method for mandating functions by Applet
CN104583953A (en) * 2012-08-30 2015-04-29 微软公司 Search extensibility application framework in a hosted search
CN108132809A (en) * 2017-11-29 2018-06-08 五八有限公司 Method, apparatus, terminal and the storage medium of loading
CN110489158A (en) * 2019-08-01 2019-11-22 北京字节跳动网络技术有限公司 Method, apparatus, medium and the electronic equipment that code hosted platform is optimized
CN110750255A (en) * 2019-09-25 2020-02-04 支付宝(杭州)信息技术有限公司 Applet rendering method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李哲 等: "微信小程序的架构与开发浅析", 《福建电脑》, vol. 35, no. 12, pages 66 - 69 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069490B (en) * 2020-08-27 2023-08-15 北京百度网讯科技有限公司 Method and device for providing applet capability, electronic equipment and storage medium
CN112069490A (en) * 2020-08-27 2020-12-11 北京百度网讯科技有限公司 Method, device, electronic equipment and storage medium for providing applet capability
CN112286656A (en) * 2020-10-21 2021-01-29 百度在线网络技术(北京)有限公司 Applet simulation method, apparatus, electronic device and computer readable storage medium
CN112286656B (en) * 2020-10-21 2023-08-29 百度在线网络技术(北京)有限公司 Applet simulation method, apparatus, electronic device, and computer-readable storage medium
CN112379945A (en) * 2020-11-20 2021-02-19 北京百度网讯科技有限公司 Method, device, equipment and storage medium for running application
CN112379945B (en) * 2020-11-20 2024-04-19 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for running application
CN112579096A (en) * 2020-12-18 2021-03-30 北京百度网讯科技有限公司 Method, device, equipment and medium for compiling and loading small program starting file
CN112579096B (en) * 2020-12-18 2024-03-19 北京百度网讯科技有限公司 Method, device, equipment and medium for compiling and loading applet startup file
CN112631689A (en) * 2021-01-04 2021-04-09 北京字节跳动网络技术有限公司 Application program loading method and device and computer storage medium
CN113553074B (en) * 2021-07-23 2023-07-25 北京百度网讯科技有限公司 Applet distribution control method, device, electronic equipment and storage medium
CN113553074A (en) * 2021-07-23 2021-10-26 北京百度网讯科技有限公司 Applet distribution control method, device, electronic equipment and storage medium
CN114090118A (en) * 2021-11-11 2022-02-25 北京百度网讯科技有限公司 Method, device and equipment for starting small program and storage medium
CN114090118B (en) * 2021-11-11 2023-09-15 北京百度网讯科技有限公司 Method, device, equipment and storage medium for starting applet

Also Published As

Publication number Publication date
CN111475259B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
CN111475259A (en) Applet loading method and device and electronic equipment
JP7167222B2 (en) APPLET DATA ACQUISITION METHOD, APPARATUS, DEVICE, AND STORAGE MEDIUM
US9292108B2 (en) Systems and methods for remote mouse pointer management
CN109726076B (en) Applet life cycle management method and system
CN110659246B (en) Container-based file mounting method and device and electronic equipment
US20140359111A1 (en) Idle Worker-Process Page-Out
US10178170B2 (en) Browser-based virtual media administration
CN112235417B (en) Method and device for sending debugging instruction
US20150033134A1 (en) Visually Depicting Cloud Resource Utilization During Execution Of An Application
CN111913884A (en) Distributed test method, device, equipment, system and readable storage medium
CN112817656B (en) Applet running method and device
US11659042B1 (en) System and method for controlling remote sessions executing on other devices
US10067862B2 (en) Tracking asynchronous entry points for an application
CN108255547B (en) Application program control method and device
CN113971277A (en) Multi-user login method and device
CN111913707A (en) Running process multiplexing method and device
JP7147123B2 (en) Source channel determination method, device, equipment, program and computer storage medium
CN111522599B (en) Method and device for transmitting information
CN112752323A (en) Method and device for changing hotspot access state
CN112770415A (en) Information processing method and device about wireless hotspot
CN112346512A (en) Time synchronization method and device
CN112379945A (en) Method, device, equipment and storage medium for running application
CN112836153A (en) Page processing method and device for hosted application, electronic device and readable storage medium
CN111767170A (en) Operation restoration method and device for equipment, equipment and storage medium
CN111857488B (en) Method and device for popping up menu in applet, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant