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

Applet loading method and device and electronic equipment Download PDF

Info

Publication number
CN111475259B
CN111475259B CN202010256753.4A CN202010256753A CN111475259B CN 111475259 B CN111475259 B CN 111475259B CN 202010256753 A CN202010256753 A CN 202010256753A CN 111475259 B CN111475259 B CN 111475259B
Authority
CN
China
Prior art keywords
code
applet
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.)
Active
Application number
CN202010256753.4A
Other languages
Chinese (zh)
Other versions
CN111475259A (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an applet loading method, an applet loading device and electronic equipment, and relates to applet technology in the field of computer technology. The specific implementation scheme is as follows: acquiring an applet service code of the target applet in case of receiving a first operation for an entry of the target applet; hosting the applet business code through a code hosting service in the electronic device; and loading the applet business code hosted by the code hosting service. In this way, through the code hosting service hosting the applet business code, the restrictions on the loaded applet usage functionality can be reduced, and thus more of the loaded applet usage functionality.

Description

Applet loading method and device and electronic equipment
Technical Field
The present disclosure relates to applet technology in the field of computer technology, and in particular, to an applet loading method, apparatus and electronic device.
Background
The applet is a kind of off-line Application developed based on H5 and used without downloading and installing, so that it is more and more convenient for users to use the Application, and more Application (APP) has been converted into applet form for carrying. Wherein the pure offline technology of the applet builds on the support of file protocols (e.g., file protocols) in the web view (i.e., webView) to the uniform resource locator (Uniform Resource Locator, URL). However, some functions on the file-based protocol WebView will not be available, resulting in less applet usage.
Disclosure of Invention
The utility model provides an applet loading method, device and electronic equipment, which are used for solving the problem that the currently loaded applet has fewer functions.
According to a first aspect, there is provided an applet loading method, applied to an electronic device, comprising:
acquiring an applet service code of the target applet in case of receiving a first operation for an entry of the target applet;
hosting the applet business code through a code hosting service in the electronic device;
and 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:
a service code acquisition module for acquiring an applet service code of the target applet in case of receiving a first operation for an entry of the target applet;
a business code hosting module for hosting the applet business code through a code hosting service in the electronic device;
and the business code loading module is used for loading the applet business codes 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 liquid crystal display device comprises a liquid crystal display device,
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 described above.
According to a fourth aspect there is also provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the first aspect described above.
In the application, the applet service code of the target applet is acquired under the condition that a first operation aiming at an entrance of the target applet is received; hosting the applet business code through a code hosting service in the electronic device; and loading the applet business code hosted by the code hosting service. In this way, through the code hosting service hosting the applet business code, the restrictions on the loaded applet usage functionality can be reduced, and thus more of the loaded applet usage functionality.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
FIG. 1 is one of the schematic diagrams according to a first embodiment of the present application;
FIG. 2 is a second schematic illustration of a 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 illustration according to a second embodiment of the present application;
FIG. 5 is a third schematic illustration of a second embodiment of the present application;
FIG. 6 is a fourth schematic illustration of a second embodiment of the present application;
fig. 7 is a block diagram of an electronic device for implementing the applet loading method of an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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, as shown in fig. 1, and the applet loading method includes the following steps:
step 101, acquiring an applet service code of the target applet when a first operation for an entry of the target applet is received.
In the present application, the electronic device may acquire the applet service code of the target applet upon receiving the first operation for the portal of the target applet.
The target applet may be any applet that may be loaded in the electronic device, and may be developed based on H5 and run on a host application, or may also be run on a web page, or the like.
In addition, the first operation may be any operation for instructing to run the target applet, which may be at least one of a touch operation, a voice operation, a space gesture operation, or the like, for example, the first operation may be a click operation on an entry of the target applet displayed in an interface of a host application or a page of a web page, or the like.
In the step 101, the electronic device may obtain the applet service code of the target applet, where the electronic device may respond to the first operation by sending an applet package obtaining request to a cloud server storing the applet package of the target applet, where the cloud server sends the applet package of the target applet to the electronic device in response to the applet package obtaining request, and where 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 the applet, a developer may package the applet service code of the target applet into an applet package by using a developer tool, upload the applet package to the applet B end of the cloud server, where the cloud server performs operations such as auditing, previewing and publishing the applet package uploaded to the applet B end, and stores the applet package to the applet C end of the applet, and in the case that the electronic device receives the first operation, the applet C end of the cloud server may encrypt and transmit the applet package of the target applet to the electronic device, where the electronic device performs operations such as decryption, verification and installation on the applet package of the target applet, decompresses the applet service code of the target applet, and stores the applet service code in the local storage space.
Step 102, hosting the applet business code through a code hosting service in the electronic device.
In the application, after the electronic device acquires the applet service code of the target applet, the electronic device can host the applet service code through the code hosting service.
The code hosting service may be any hosting service for hosting the applet service code, and loads the applet service code when the code hosting service hosts the applet service code, and the electronic device creates an Input/Output (IO) thread to load the applet service code instead of loading the applet service code by drawing a main thread through a User Interface (UI), so that the computing overhead of occupying the main thread of the UI can be avoided, and the possibility of loading a click when the electronic device runs the applet is reduced.
In some implementations, the code-hosting service described above can be a hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) -based code-hosting service.
Here, the HTTP-based code hosting service hosts the applet service code, and in the running process of the applet service code, the HTTP function (such as HTTP Cache) of the applet can be implemented, so that the function in the running process of the applet is more complete.
It should be noted that, the code hosting service is built in the electronic device in advance, and before the electronic device hosts the applet service code through the code hosting service, the electronic device may first start and initialize the code hosting service, so as to ensure that a normal hosting service is provided for the applet service code.
Step 103, loading the applet business code hosted by the code hosting service.
In the application, after the electronic device hosts the applet service code through the code hosting service, when the applet service code hosted by the code hosting service needs to be loaded, the electronic device may load the applet service code.
The loading of the applet service code hosted by the code hosting service may be loading the applet service code by a main thread, i.e., a UI main thread, drawn through a User Interface (UI) in a network view.
Alternatively, in some embodiments, the step 103 may include:
and loading the applet business codes 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 service code through the first IO thread, where the first IO thread is an IO thread created under the condition that the code hosting service provides the hosting service and used for loading the applet service code, so that computing overhead that occupies a main UI thread may be avoided, and the possibility that loading katon occurs when the electronic device runs the applet is reduced.
The loading of the applet business code managed by the code hosting service through the first IO thread may be that the electronic device loads, when receiving a second operation of browsing the target applet, the target code managed by the code hosting service and associated with the second operation through the first IO thread.
For example, in the case where the electronic device receives a click operation on a functional 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 a page of a video playback applet, load a business code corresponding to a movie playback function hosted by the code hosting service through the first IO thread described above, and so on.
In addition, the execution of the applet is typically performed by loading the applet service code in a container, and for normal loading of the applet service code by the container, it is also necessary to load in advance in the container applet framework code for building a framework for the applet to execute. It should be noted that the applet framework code may build a framework for any applet running in the electronic device.
In this application, the applet frame code is loaded in the container in advance, and may be loaded from the local cache through a file protocol (such as file protocol) of a web view (i.e. WebView).
Alternatively, in some embodiments, before the step 103, the method may further include:
under the condition that a request for hosting the applet frame code is received, hosting the applet frame code through the code hosting service, wherein the applet frame code is 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 can also host the applet frame codes through the code hosting service thereof, so that the limitation of the use functions of the page frame when the applet is loaded can be reduced, and the number of the use functions of the loaded applet can be further improved.
Of course, the above-mentioned loading of the applet frame code hosted by the code hosting service into the target container may be loading of the applet frame code hosted by the code hosting service into the target container by drawing a main thread, i.e., a UI main thread, through a User Interface (UI) in a network view.
Alternatively, in some embodiments, loading the applet framework code hosted by the code hosting service into a target container includes:
and loading the applet framework 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 second IO thread loads the applet frame code managed by the code managed service to the target container, so that the load applet frame code can be prevented from occupying the UI main thread, and the possibility of loading and blocking of the electronic device when the applet is operated 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 may be the same thread or different threads from the first IO thread.
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:
and if a third operation for indicating to run a target application program or a fourth operation for opening a target webpage is received, receiving the request for hosting the applet framework code, wherein 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.
Here, the electronic device may receive the request for hosting applet frame code when receiving a web page indicating a host application running a target applet or opening an entry displaying the target applet, so that the applet frame code is loaded more timely, and efficiency of applet loading is improved.
The loading of the applet frame code managed by the code managed service into the target container through the second IO thread may be that the applet frame code managed by the code managed service is loaded into the target container through the second IO thread when the electronic device receives the applet frame code acquisition resource request.
In this application, after step 103, that is, after the electronic device finishes loading the applet service code of the target applet, the electronic device may perform other processes related to the applet operation, for example, may perform destruction and restart processes on the applet operation environment, perform regular destruction and normal exit of the user on the applet background, or perform process on the code hosting service in the case of restarting the applet operation environment, and so on.
In addition, in the case that the target applet is destroyed or exits, 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 can 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 of the applet business code hosted by the code hosting service, further comprises: under the condition that the exit of the target applet is detected, the code hosting service is kept open, and the applet business codes of the target applet hosted in the code hosting service are released when the preset interval duration is reached, so that the initialization times of the code hosting service can be reduced, and the efficiency of loading the applet is improved; in addition, the method can realize quick loading of the applet when the applet exits due to misoperation of the user.
In addition, after the target applet exits, the applet frame code may continue to provide a running frame for other applets without performing a restart and deployment operation, and the applet frame code is restarted and deployed only when an update occurs in the applet frame code, i.e. after the applet frame code hosted by the code hosting service is loaded into the target container, the method further includes: and when the update of the applet frame code is detected, the updated applet frame code is managed by the code hosting service, and the applet frame code managed by the code hosting service is loaded to a target container.
In the application, under the condition that a first operation aiming at an entrance of a target applet is received, acquiring an applet service code of the target applet; hosting the applet business code through a code hosting service in the electronic device; and loading the applet business code hosted by the code hosting service. In this way, through the code hosting service hosting the applet business code, the restrictions on the loaded applet usage functionality can be reduced, and thus more of the loaded applet usage functionality.
Referring to fig. 3, an embodiment of the present application provides an applet loading device, as shown in fig. 3, the applet loading device 300 includes:
a service code acquiring module 301, configured to acquire an applet service code of a target applet when receiving a first operation for an entry of the target applet;
a business code hosting module 302, configured to host the applet business code through a code hosting service in the electronic device;
business code loading module 303 loads the applet business code hosted by the code hosting service.
Optionally, the service code loading module 303 is specifically configured to:
and loading the applet business codes 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, when receiving a request for hosting applet framework code, applet framework code through the code hosting service, where the applet framework code is configured to build a framework for the target applet to run;
the framework code loading module 305 is configured to load the applet framework 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 framework 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:
the request receiving module 306 is configured to receive the request for hosting applet frame code if a third operation for indicating to run a target application program is received or a fourth operation for opening a target web page is received, where the target application program is a host application program of the target applet, and the target web page is a web page 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:
and the code releasing module 307 is configured to keep the code hosting service open when the exit of the target applet is detected, and release the applet service 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 device 300 can implement each process implemented by the electronic device in the embodiment of the method of fig. 1 of the present application, and achieve the same beneficial effects, and for avoiding repetition, a detailed description is omitted here.
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 7, a block diagram of an electronic device according to an applet loading method according to an embodiment of the present 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 7, the electronic device includes: one or more processors 701, memory 702, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. 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 executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 701 is illustrated in fig. 7.
Memory 702 is a non-transitory computer-readable storage medium provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the applet loading methods provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to execute the applet loading method provided herein.
The memory 702 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the service code acquisition module 301, the service code hosting module 302, and the service code loading module 303 shown in fig. 3) corresponding to the applet loading method in the embodiments of the present application. 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, i.e., implements the applet loading method in the method embodiments described above.
Memory 702 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created from the use of the electronic device based on the detection of echo delay, etc. In addition, 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, memory 702 may optionally include memory remotely located with respect to processor 701, which may be connected to the electronics for echo delay detection via a network. 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 otherwise, in fig. 7 by way of example.
The input device 703 may receive input numeric or character information as well as key signal inputs related to user settings and function control of the electronic device that generate detection of echo time delay, such as input devices for a touch screen, a keypad, a mouse, a track pad, a touch pad, a joystick, one or more mouse buttons, a track ball, a joystick, and the like. The output device 704 may include a display apparatus, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. 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 (PLDs)) 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 term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically 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 application, the applet service code of the target applet is acquired under the condition that a first operation aiming at an entrance of the target applet is received; hosting the applet business code through a code hosting service in the electronic device; and loading the applet business code hosted by the code hosting service. In this way, through the code hosting service hosting the applet business code, the restrictions on the loaded applet usage functionality can be reduced, and thus more of the loaded applet usage functionality.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (12)

1. An applet loading method applied to an electronic device, comprising:
acquiring an applet service code of the target applet in case of receiving a first operation for an entry of the target applet;
hosting the applet business code through a code hosting service in the electronic device;
loading the applet business code hosted by the code hosting service;
the loading the applet business code hosted by the code hosting service includes:
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;
before loading the applet business code hosted by the code hosting service, the method further comprises:
under the condition that a request for hosting the applet frame code is received, hosting the applet frame code through the code hosting service, wherein the applet frame code is 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.
2. The method of claim 1, wherein loading the applet framework code hosted by the code hosting service into a target container comprises:
and loading the applet framework 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.
3. The method of claim 1, wherein, in the event that a request to host applet framework code is received, prior to hosting applet framework code by the code hosting service, further comprising:
and if a third operation for indicating to run a target application program or a fourth operation for opening a target webpage is received, receiving the request for hosting the applet framework code, wherein 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.
4. A method according to any of claims 1 to 3, wherein the code-hosting service is a hypertext transfer protocol HTTP-based code-hosting service.
5. A method according to any one of claims 1 to 3, wherein after the loading of the applet business code hosted by the code hosting service, further comprises:
and under the condition that the exit of the target applet is detected, keeping the code hosting service open, and releasing applet business codes of the target applet hosted in the code hosting service when a preset interval duration is reached.
6. An applet loading apparatus, comprising:
a service code acquisition module for acquiring an applet service code of the target applet in case of receiving a first operation for an entry of the target applet;
the business code hosting module is used for hosting the applet business codes through a code hosting service in the electronic equipment;
the business code loading module is used for loading the applet business codes hosted by the code hosting service;
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;
the device further comprises:
the framework code hosting module is used for hosting the applet framework code through the code hosting service under the condition that a request for hosting the applet framework code is received, and the applet framework code is used for building a framework for the target applet to run;
and the framework code loading module is used for loading the applet framework code hosted by the code hosting service to a target container, and the target container is used for loading the applet business code.
7. The apparatus of claim 6, wherein the framework code loading module is specifically configured to:
and loading the applet framework 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.
8. The apparatus of claim 6, wherein the apparatus further comprises:
and the request receiving module is used for receiving the request of the managed applet framework code if receiving a third operation for indicating to run a target application program or receiving a fourth operation for opening a target webpage, wherein 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.
9. The apparatus according to any of claims 6 to 8, wherein the code hosting service is an HTTP-based code hosting service.
10. The apparatus according to any one of claims 6 to 8, further comprising:
and the code release module is used for keeping the code hosting service open under the condition that the exit of the target applet is detected, and releasing the applet business codes of the target applet hosted in the code hosting service when the preset interval duration is reached.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
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-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
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 CN111475259A (en) 2020-07-31
CN111475259B true 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)

Families Citing this family (7)

* 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
CN112286656B (en) * 2020-10-21 2023-08-29 百度在线网络技术(北京)有限公司 Applet simulation method, apparatus, electronic device, and computer-readable storage medium
CN112379945B (en) * 2020-11-20 2024-04-19 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for running application
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
CN114090118B (en) * 2021-11-11 2023-09-15 北京百度网讯科技有限公司 Method, device, equipment and storage medium for starting applet

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101788905A (en) * 2009-01-22 2010-07-28 上海科泰世纪科技有限公司 Object managing method of Applet
CN110489158A (en) * 2019-08-01 2019-11-22 北京字节跳动网络技术有限公司 Method, apparatus, medium and the electronic equipment that code hosted platform is optimized

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3578266B2 (en) * 2000-01-06 2004-10-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Application launch method, software product for application launch
US6993588B2 (en) * 2001-03-26 2006-01-31 Sumisho Computer Systems 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
CN101826004A (en) * 2009-03-02 2010-09-08 上海科泰世纪科技有限公司 Method for mandating functions by Applet
US20140067835A1 (en) * 2012-08-30 2014-03-06 Microsoft Corporation 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
CN110750255B (en) * 2019-09-25 2022-08-02 支付宝(杭州)信息技术有限公司 Applet rendering method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101788905A (en) * 2009-01-22 2010-07-28 上海科泰世纪科技有限公司 Object managing method of Applet
CN110489158A (en) * 2019-08-01 2019-11-22 北京字节跳动网络技术有限公司 Method, apparatus, medium and the electronic equipment that code hosted platform is optimized

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
微信小程序的架构与开发浅析;李哲 等;《福建电脑》;第35卷(第12期);66-69 *

Also Published As

Publication number Publication date
CN111475259A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN111475259B (en) Applet loading method and device and electronic equipment
JP7167222B2 (en) APPLET DATA ACQUISITION METHOD, APPARATUS, DEVICE, AND STORAGE MEDIUM
CN111158799A (en) Page rendering method and device, electronic equipment and storage medium
CN111625738B (en) APP target page calling method, device, equipment and storage medium
CN110659246B (en) Container-based file mounting method and device and electronic equipment
CN111767069A (en) Applet processing method, server, device and storage medium
CN112235417B (en) Method and device for sending debugging instruction
CN111913884A (en) Distributed test method, device, equipment, system and readable storage medium
CN111881650A (en) PDF document generation method and device and electronic equipment
CN111885114B (en) Method, device and storage medium for upgrading application program interface module in gateway
CN111290768A (en) Updating method, device, equipment and medium for containerization application system
CN112084395A (en) Search method, search device, electronic device, and storage medium
KR102546645B1 (en) Application startup method and appaturas, device and storage medium
CN111782218B (en) Applet processing method, device, equipment and storage medium
CN111913707A (en) Running process multiplexing method and device
CN112764746A (en) Data processing method and device, electronic equipment and storage medium
CN113158098A (en) Page generation method, device, equipment and medium
JP7147123B2 (en) Source channel determination method, device, equipment, program and computer storage medium
CN111522599B (en) Method and device for transmitting information
CN111338937B (en) Method, device, equipment and medium for downloading small program intervention
CN113220571A (en) Debugging method, system, equipment and storage medium of mobile webpage
CN111651229A (en) Font changing method, device and equipment
CN111857488B (en) Method and device for popping up menu in applet, electronic equipment and storage medium
CN111611582B (en) Method and device for identifying page hijacking behavior
CN112069137B (en) Method, device, electronic equipment and computer readable storage medium for generating information

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