CN115373763B - Plug-in loading method and device, electronic equipment and storage medium - Google Patents

Plug-in loading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115373763B
CN115373763B CN202211299453.XA CN202211299453A CN115373763B CN 115373763 B CN115373763 B CN 115373763B CN 202211299453 A CN202211299453 A CN 202211299453A CN 115373763 B CN115373763 B CN 115373763B
Authority
CN
China
Prior art keywords
plug
interface
target
display
loading
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
CN202211299453.XA
Other languages
Chinese (zh)
Other versions
CN115373763A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202211299453.XA priority Critical patent/CN115373763B/en
Publication of CN115373763A publication Critical patent/CN115373763A/en
Application granted granted Critical
Publication of CN115373763B publication Critical patent/CN115373763B/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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • 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/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a plug-in loading method and device, electronic equipment and a storage medium. The method comprises the following steps: displaying a first plug-in display interface corresponding to a first plug-in installed in the target type application; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a sub plug-in of the first plug-in the target type application; responding to the selection operation of the plug-in identification, taking a second plug-in corresponding to the plug-in identification selected by the selection operation as a target plug-in, and acquiring interface rendering information corresponding to the target plug-in and plug-in codes corresponding to the target plug-in; and displaying a second plug-in display interface of the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface, and running the running logic of the target plug-in represented by the plug-in code in the first plug-in. The present disclosure improves the efficiency of plug-in loading.

Description

Plug-in loading method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a plug-in loading method and apparatus, an electronic device, and a storage medium.
Background
With the development of computer technology, a micro front end technology has appeared, which can load different applications in a browser page by providing multiple application portals in a browser, and when a user uses a browser, loading corresponding application portals in the browser environment.
In the related art, the current micro front-end technology is mainly applied to browsers, and for plug-ins of design applications, because the host environment of the plug-ins of the design applications is different from that of the browsers, for example, a plug-in of a design application usually comprises two independent portals and corresponding sandbox operating environments, respectively for exposing the plug-in UI interface and interacting with the design application canvas, whereas the micro front end technology for browsers generally assumes only one entry, which cannot be applied in designing application plug-ins. If the functions of different plug-ins need to be used in the design application, a user needs to install different plug-ins one by one to realize the loading of different plug-ins in the design application, so that the plug-in loading efficiency in the design application is low.
Disclosure of Invention
The present disclosure provides a plug-in loading method, device, electronic device and storage medium, so as to at least solve the problem of low efficiency of plug-in loading in design application in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a plug-in loading method, including:
displaying a first plug-in display interface corresponding to a first plug-in installed in the target type application; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a sub plug-in of the first plug-in the target type application;
responding to the selection operation of the plug-in identification, taking a second plug-in corresponding to the plug-in identification selected by the selection operation as a target plug-in, and acquiring interface rendering information corresponding to the target plug-in and plug-in codes corresponding to the target plug-in;
and displaying a second plug-in display interface of the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface, and running the running logic of the target plug-in represented by the plug-in code in the first plug-in.
In an exemplary embodiment, the first plug-in includes a first loading module for loading the interface rendering information and a second loading module for loading the plug-in code; the obtaining of the interface rendering information corresponding to the target plug-in and the plug-in code corresponding to the target plug-in includes: acquiring the interface rendering information and the plug-in codes from a content distribution network through the first loading module; the second plug-in display interface for displaying the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface and the running logic for running the target plug-in represented by the plug-in code in the first plug-in include: sending the plug-in code from the first load module to the second load module through a message queue; loading the interface rendering information in the first loading module and loading the plug-in code in the second loading module; displaying the second plug-in display interface rendered by the interface rendering information in the first plug-in display interface according to the interface rendering information loaded in the first loading module, and running the running logic represented by the plug-in code in the first plug-in according to the plug-in code loaded in the second loading module.
In an exemplary embodiment, before the obtaining, by the first loading module, the interface rendering information and the plug-in code from a content distribution network, the method further includes: responding to a construction request aiming at a plug-in to be constructed, and displaying a plug-in construction interface; acquiring interface rendering information of the plug-in to be built uploaded in the plug-in building interface and plug-in codes of the plug-in to be built; and storing the interface rendering information of the plug-in to be constructed and the plug-in code of the plug-in to be constructed to the content distribution network.
In an exemplary embodiment, the executing logic that executes the plug-in code representation in the first plug-in according to the plug-in code loaded in the second loading module includes: analyzing the plug-in code by utilizing the second loading module to obtain the running logic; and loading the running logic into the running environment of the first plug-in, and running the running logic of the target plug-in through the running environment of the first plug-in.
In an exemplary embodiment, the exposing a first plug-in exposing interface corresponding to a first plug-in installed in a target type application includes: responding to the login operation aiming at the target type application, acquiring a login identification corresponding to the login operation, and displaying an application display interface of the target type application; responding to a first plug-in calling operation triggered in the application display interface, displaying a first plug-in display interface of the first plug-in, and acquiring a second plug-in matched with the login identification from a plurality of preset plug-ins to be displayed; and displaying the plug-in identification of the second plug-in on the first plug-in display interface.
In an exemplary embodiment, after the displaying the plug-in identifier of the second plug-in on the first plug-in display interface, the method further includes: displaying a plug-in setting interface in response to a plug-in setting operation triggered in the first plug-in displaying interface; the display state identifier of the second plug-in is displayed in the plug-in setting interface; responding to a display state switching operation triggered by the display state identifier in the plug-in setting interface, and acquiring a hidden plug-in corresponding to the display state switching operation; and canceling the display of the plug-in identifier of the hidden plug-in on the first plug-in display interface.
In an exemplary embodiment, after the second plug-in presentation interface for presenting the target plug-in rendered by the interface rendering information in the first plug-in presentation interface and the execution logic for executing the target plug-in represented by the plug-in code in the first plug-in, the method further includes: responding to the switching operation aiming at the plug-in identification, and acquiring the switched plug-in identification, interface rendering information of a switching plug-in corresponding to the switching plug-in identification and plug-in codes of the switching plug-in; displaying a third plug-in display interface of the switching plug-in obtained by rendering interface rendering information of the switching plug-in the first plug-in display interface, and running the running logic of the switching plug-in represented by the plug-in code of the switching plug-in the first plug-in.
In an exemplary embodiment, the method further comprises: responding to the selection operation of the plug-in identification, and displaying notification information in the first plug-in display interface; the notification information is used for representing that the loading state of the target plug-in is a loading state; after the displaying, in the first plug-in display interface, the second plug-in display interface of the target plug-in obtained by rendering the interface rendering information, and the running logic of the target plug-in represented by the plug-in code running in the first plug-in, the method further includes: hiding the display of the notification information in the first plug-in display interface.
According to a second aspect of the embodiments of the present disclosure, there is provided a plug-in loading apparatus including:
the first interface display unit is configured to execute display of a first plug-in display interface corresponding to a first plug-in installed in the target type application; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a sub plug-in of the first plug-in the target type application;
the plug-in information acquisition unit is configured to execute a selection operation responding to the plug-in identification, take a second plug-in corresponding to the plug-in identification selected by the selection operation as a target plug-in, and acquire interface rendering information corresponding to the target plug-in and plug-in codes corresponding to the target plug-in;
the second interface display unit is configured to execute a second plug-in display interface for displaying the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface, and execute the running logic of the target plug-in represented by the plug-in code in the first plug-in.
In an exemplary embodiment, the first plug-in includes a first loading module for loading the interface rendering information and a second loading module for loading the plug-in code; the plug-in information acquisition unit is further configured to execute the acquisition of the interface rendering information and the plug-in codes from a content distribution network through the first loading module; a second interface presentation unit further configured to execute sending the plug-in code from the first load module to the second load module through a message queue; loading the interface rendering information in the first loading module and loading the plug-in code in the second loading module; displaying the second plug-in display interface rendered by the interface rendering information in the first plug-in display interface according to the interface rendering information loaded in the first loading module, and running the running logic represented by the plug-in codes in the first plug-in according to the plug-in codes loaded in the second loading module.
In an exemplary embodiment, the plug-in loading apparatus further includes: the second plug-in building unit is configured to execute the step of responding to the building request of the plug-in to be built and displaying the plug-in building interface; acquiring interface rendering information of the plug-in to be constructed uploaded in the plug-in construction interface and plug-in codes of the plug-in to be constructed; and storing the interface rendering information of the plug-in to be built and the plug-in code of the plug-in to be built to the content distribution network.
In an exemplary embodiment, the second interface presentation unit is further configured to perform parsing of the plug-in code by using the second loading module to obtain the running logic; and loading the running logic into the running environment of the first plug-in, and running the running logic of the target plug-in through the running environment of the first plug-in.
In an exemplary embodiment, the first interface presentation unit is further configured to execute, in response to a login operation for the target type application, obtaining a login identifier corresponding to the login operation, and presenting an application presentation interface of the target type application; responding to a first plug-in calling operation triggered in the application display interface, displaying a first plug-in display interface of the first plug-in, and acquiring a second plug-in matched with the login identification from a plurality of preset plug-ins to be displayed; and displaying the plug-in identification of the second plug-in on the first plug-in display interface.
In an exemplary embodiment, the plug-in loading apparatus further includes: a display plug-in setting unit configured to perform a plug-in setting operation triggered in the first plug-in display interface, displaying the plug-in setting interface; the display state identifier of the second plug-in is displayed in the plug-in setting interface; responding to a display state switching operation triggered by the display state identifier in the plug-in setting interface, and acquiring a hidden plug-in corresponding to the display state switching operation; and canceling the display of the plug-in identifier of the hidden plug-in on the first plug-in display interface.
In an exemplary embodiment, the plug-in loading apparatus further includes: a third interface display unit, configured to execute a switching operation in response to the plug-in identifier, and acquire a switched plug-in identifier, interface rendering information of a switching plug-in corresponding to the switched plug-in identifier, and a plug-in code of the switching plug-in; displaying a third plug-in display interface of the switching plug-in obtained by rendering interface rendering information of the switching plug-in the first plug-in display interface, and running the running logic of the switching plug-in represented by the plug-in code of the switching plug-in the first plug-in.
In an exemplary embodiment, the plug-in loading apparatus further includes: a notification information presentation unit configured to perform presentation of notification information in the first plug-in presentation interface in response to a selection operation of the plug-in identification; the notification information is used for representing that the loading state of the target plug-in is a loading state; further comprising: a notification information hiding unit configured to perform hiding of presentation of the notification information in the first plug-in presentation interface.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the plug-in loading method as defined in any one of the embodiments of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein when executed by a processor of an electronic device, instructions in the computer-readable storage medium enable the electronic device to perform the plug-in loading method according to any one of the embodiments of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, a computer program product is provided, where the computer program product includes instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the plug-in loading method according to any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
displaying an interface by displaying a first plug-in corresponding to a first plug-in installed in a target type application; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a sub plug-in of the first plug-in the target type application; responding to the selection operation of the plug-in identification, taking a second plug-in corresponding to the plug-in identification selected by the selection operation as a target plug-in, and acquiring interface rendering information corresponding to the target plug-in and plug-in codes corresponding to the target plug-in; and displaying a second plug-in display interface of the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface, and running the running logic of the target plug-in represented by the plug-in code in the first plug-in. According to the method and the device, the plug-in identifiers corresponding to the second plug-ins serving as the sub plug-ins are arranged in the first plug-in display interface corresponding to the first plug-in installed by the target type application, and the target plug-ins can be selected by a user through selecting plug-in identification, so that the second plug-in display interface of the target plug-ins is displayed in the first plug-in display interface, and the running logic of the target plug-ins is run in the first plug-ins, so that the second plug-ins are loaded through the first plug-ins installed by the target type application, the user only needs to install the first plug-ins, different second plug-ins can be loaded, and the plug-in loading efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram illustrating an application environment for a plug-in loading method in accordance with an illustrative embodiment.
FIG. 2 is a flow diagram illustrating a method for plug-in loading in accordance with an illustrative embodiment.
FIG. 3 is an interface diagram illustrating a first plug-in presentation interface according to an exemplary embodiment.
FIG. 4 is a flow diagram illustrating the building of a plug-in to be built in accordance with an exemplary embodiment.
FIG. 5 is a flow diagram illustrating a presentation of a first plug-in presentation interface in accordance with an exemplary embodiment.
FIG. 6 is a flow diagram illustrating switching of a presentation state of a plug-in identification of a second plug-in according to an example embodiment.
FIG. 7 is a plug-in architecture framework diagram of design software, shown in accordance with an exemplary embodiment.
FIG. 8 is a diagram illustrating a child plug-in call framework in accordance with an illustrative embodiment.
FIG. 9 is a flow diagram illustrating a sub-plug-in call in accordance with an illustrative embodiment.
FIG. 10 is a block diagram illustrating a plug-in loading device in accordance with an exemplary embodiment.
FIG. 11 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are both information and data that are authorized by the user or sufficiently authorized by various parties.
The plug-in loading method provided by the disclosure can be applied to the application environment shown in fig. 1. Wherein the terminal 101 interacts with the server 102 via a network. After a user opens a target type application installed on the terminal 101, a first plug-in installed on the application may be called through the target type application, at this time, the terminal 101 may display a display interface with the installed first plug-in, that is, a first plug-in display interface, meanwhile, the first plug-in display interface may carry a plurality of plug-in identifiers representing different second plug-ins, and the user may further perform a selection operation on the plug-in identifiers, so that the terminal 101 may use the second plug-in corresponding to the selected plug-in identifier as the target plug-in, and may further obtain, from the server 102, interface rendering information and corresponding plug-in codes corresponding to the target plug-in, thereby displaying, in the first plug-in display interface, a display interface of the target plug-in, that is, obtained by rendering the interface rendering information, that is, the display interface of the second plug-in, and running logic corresponding to the plug-in codes, that is, running logic of the target plug-in. The terminal 101 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 102 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Fig. 2 is a flowchart illustrating a plug-in loading method according to an exemplary embodiment, where as shown in fig. 2, the plug-in loading method is used in the terminal 101, and includes the following steps.
In step S201, a first plug-in presentation interface corresponding to a first plug-in installed in the target type application is presented; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a child plug-in of the first plug-in the target type application.
The target type application refers to an application program installed with a first plug-in, the application program may be some design software applications, such as canvas software, the first plug-in is a plug-in installed on the design software application, the first plug-in may be a main plug-in manually installed on the design software application by a user, the second plug-in refers to a sub plug-in which may be loaded through the first plug-in, and the user may load the second plug-in through the first plug-in installed on the target type application, so that the function of the second plug-in may be used in the first plug-in of the target type application, and thus, the second plug-in does not need to be installed in the target type application. The first plug-in display interface refers to an interface in which the first plug-in is displayed on the terminal 101, and the interface may carry a plurality of plug-in identifiers used for representing different second plug-ins, for example, plug-in icons corresponding to the plurality of second plug-ins may be displayed on the first plug-in display interface.
In step S202, in response to the selection operation of the plug-in identifier, the second plug-in corresponding to the plug-in identifier selected by the selection operation is taken as a target plug-in, and interface rendering information corresponding to the target plug-in and plug-in code corresponding to the target plug-in are obtained.
The target plug-in refers to a second plug-in corresponding to a plug-in identifier selected by a user in a first plug-in display interface, after the terminal 101 displays the first plug-in display interface carrying plug-in identifiers of a plurality of second plug-ins, the user may further perform a selection operation on one of the plug-in identifiers of the plurality of second plug-ins displayed on the first plug-in display interface, the terminal 101 may use the second plug-in corresponding to the plug-in identifier selected by the user as the target plug-in, for example, the first plug-in display interface may carry a plug-in identifier a representing the second plug-in a, a plug-in identifier B representing the second plug-in B, and a plug-in identifier C representing the second plug-in C, the user may trigger a selection operation on the plug-in identifier, which may be a trigger a selection operation on the plug-in identifier B by the user, and then the second plug-in B corresponding to the plug-in identifier B may be used as the target plug-in. The interface rendering information is information for rendering a display interface of the target plug-in, and may be, for example, display interface information of the target plug-in, and the plug-in code refers to run code of the target plug-in.
Specifically, after the user triggers a selection operation on the plug-in identifiers of the plurality of second plug-ins, the terminal 101 may use the second plug-in corresponding to the plug-in identifier selected by the user as the target plug-in, and may also obtain interface rendering information of the target plug-in and plug-in codes of the target plug-in.
In step S203, a second plug-in presentation interface of the target plug-in obtained by rendering the interface rendering information is presented in the first plug-in presentation interface, and the running logic of the target plug-in represented by the plug-in code is run in the first plug-in.
The second plug-in display interface refers to a display interface of the target plug-in, and after obtaining the interface rendering information and the plug-in codes of the target plug-in, the terminal 101 may load the interface rendering information and the plug-in codes, so as to display the display interface obtained by rendering the interface rendering information in the first plug-in display interface, that is, display the second plug-in display interface, and run the run logic represented by the plug-in codes in the first plug-in, that is, run logic of the target plug-in.
For example, a first plug-in presentation interface may be as shown in fig. 3, and on the left side of the first plug-in presentation interface shown in fig. 3, plug-in identifiers of different second plug-ins may be carried, which are a sub-plug-in identifier a representing a sub-plug-in a, a sub-plug-in identifier B representing a sub-plug-in B, and a sub-plug-in identifier C representing a sub-plug-in C, respectively, a user may perform a selection operation on the displayed sub-plug-in identifiers, which may be a selection operation on the sub-plug-in identifier C, at this time, the terminal 101 may use the sub-plug-in C as a target plug-in, and present a presentation interface corresponding to the sub-plug-in C on the right side of the first plug-in presentation interface as a second plug-in presentation interface.
In the plug-in loading method, a first plug-in display interface corresponding to a first plug-in installed in a target type application is displayed; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a sub plug-in of the first plug-in the target type application; responding to the selection operation of the plug-in identification, taking a second plug-in corresponding to the plug-in identification selected by the selection operation as a target plug-in, and acquiring interface rendering information corresponding to the target plug-in and plug-in codes corresponding to the target plug-in; and displaying a second plug-in display interface of the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface, and running the running logic of the target plug-in represented by the plug-in code in the first plug-in. According to the method and the device, the plug-in identifiers corresponding to the second plug-ins serving as the sub plug-ins are arranged in the first plug-in display interface corresponding to the first plug-in installed by the target type application, and the target plug-ins can be selected by a user through selecting plug-in identification, so that the second plug-in display interface of the target plug-ins is displayed in the first plug-in display interface, and the running logic of the target plug-ins is run in the first plug-ins, so that the second plug-ins are loaded through the first plug-ins installed by the target type application, the user only needs to install the first plug-ins, different second plug-ins can be loaded, and the plug-in loading efficiency is improved.
In an exemplary embodiment, the first plug-in comprises a first loading module for loading interface rendering information and a second loading module for loading plug-in code; step S202 may further include: acquiring the interface rendering information and the plug-in codes from a content distribution network through a first loading module; step S203 may further include: sending the plug-in code from the first loading module to the second loading module through the message queue; loading interface rendering information in a first loading module, and loading plug-in codes in a second loading module; displaying a second plug-in display interface rendered by the interface rendering information in the first plug-in display interface according to the interface rendering information loaded in the first loading module, and running the running logic represented by the plug-in codes in the first plug-in according to the plug-in codes loaded in the second loading module.
In this embodiment, the first plug-in may include two loading modules for loading the target plug-in, which are respectively a first loading module for loading the interface rendering information and a second loading module for loading the plug-in code, where the first loading module may be an interface-side module of the first plug-in, the second loading module may be a plug-in-side module of the first plug-in, and communication between the first loading module and the second loading module may be performed in a form of a message queue. The content distribution network may be implemented by the server 102, and interface rendering information and corresponding plug-in codes of each second plug-in may be stored in advance in the content distribution network.
Specifically, after the terminal 101 determines the target plug-in, the interface rendering information and the plug-in code corresponding to the target plug-in may be read from the content distribution network, and meanwhile, since the plug-in side module of the first plug-in, that is, the second loading module, cannot directly access the extensible hypertext transfer request, the first plug-in obtains the interface rendering information and the plug-in code of the target plug-in a manner of first passing through the interface side module of the first plug-in, that is, obtaining the interface rendering information and the plug-in code of the target plug-in from the content distribution network through the first loading module.
Then, the obtained plug-in code is sent from the first loading module to the second loading module through a message queue for information communication between the first loading module and the second loading module, so that the second loading module can obtain the plug-in code, and load the interface rendering information in the first loading module of the first plug-in and load the plug-in code in the second loading module, so that the terminal 101 can display a second plug-in display interface rendered by the interface rendering information in the first plug-in display interface according to the interface rendering information loaded in the first loading module, and run a running logic represented by the plug-in code in the first plug-in based on the plug-in code loaded in the second loading module.
In this embodiment, interface rendering information and plug-in codes may also be obtained from the content distribution network through the first loading module of the first plug-in, and the plug-in codes are sent from the first loading module to the second loading module through the message queue, so that the interface rendering information is loaded at the first loading module, the display of the second plug-in display interface is realized, and the plug-in codes are loaded at the second loading module, so that the operation of the operation logic of the target plug-in is realized.
Further, as shown in fig. 4, before acquiring the interface rendering information and the plug-in code from the content distribution network through the first loading module, the method further includes:
in step S401, in response to a build request for a plug-in to be built, a plug-in build interface is presented.
In this embodiment, the user may also construct the second plug-in through the terminal 101, and the plug-in construction interface refers to a display interface for constructing the plug-in to be constructed. The user may implement the building of the second plug-in by triggering a building request to the terminal, at which point the terminal 101 may then respond to the request to expose a plug-in building interface for building the second plug-in.
In step S402, interface rendering information of the plug-in to be built uploaded in the plug-in building interface and plug-in code of the plug-in to be built are acquired.
The interface rendering information of the plug-in to be built is rendering information used for rendering a plug-in display interface corresponding to the plug-in to be built, the plug-in code of the plug-in to be built refers to a code used for running a running logic of the plug-in to be built, the interface rendering information of the plug-in to be built and the corresponding plug-in code can be obtained in advance by a user, so that the interface rendering information and the plug-in code can be uploaded in the plug-in building interface displayed by the terminal 101, and the terminal 101 can obtain the interface rendering information and the plug-in code of the plug-in to be built, which are uploaded in the plug-in building interface by the user.
In step S403, the interface rendering information of the plug-in to be built and the plug-in code of the plug-in to be built are stored to the content distribution network.
Finally, after the terminal 101 obtains the interface rendering information and the plug-in code of the plug-in to be constructed, the interface rendering information and the plug-in code may be stored in a content distribution network to complete the construction process of the plug-in to be constructed. And then, when the user loads the plug-in through the first application, the user can obtain interface rendering information and plug-in codes from the content distribution network to realize the loading of the plug-in.
In this embodiment, the user may further store the interface rendering information of the plug-in to be built and the plug-in code to the content distribution network through the plug-in building interface displayed by the terminal 101, so that the building of the plug-in to be built is realized, a basis is provided for the implementation process of loading the second plug-in by the first plug-in, and the user may realize the general building of the second plug-in through the above manner, thereby improving the universality of the plug-in building.
In addition, according to the plug-in code loaded in the second loading module, the running logic represented by the plug-in code is run in the first plug-in, and the running logic represented by the plug-in code may further include: analyzing the plug-in code by using a second loading module to obtain an operation logic; and loading the running logic into the running environment of the first plug-in, and running the running logic of the target plug-in through the running environment of the first plug-in.
In this embodiment, after obtaining the plug-in code, the second loading module may first analyze the plug-in code to obtain a running logic, and then may load the running logic into the running environment of the first plug-in, for example, a temporary variable may be created to store the running logic corresponding to the running of the target plug-in, and then the running logic may be loaded into the running environment of the first plug-in through a function, or a bind function, so as to load the running logic into the running environment of the first plug-in, and then the running logic of the target plug-in may be run through the running environment of the first plug-in, so as to implement running of the target plug-in on the first plug-in.
In this embodiment, the plug-in code of the target plug-in may also be analyzed by the second loading module to obtain an operation logic of the target plug-in, and then the operation logic is loaded to the operation environment of the first plug-in, so that the operation logic of the target plug-in is operated in the operation environment of the first plug-in to implement that the target plug-in is operated on the first plug-in.
In an exemplary embodiment, as shown in fig. 5, step S201 may further include:
in step S501, in response to a login operation for the target type application, a login identifier corresponding to the login operation is obtained, and an application display interface of the target type application is displayed.
The login operation refers to an operation of a user logging in a target type application, the user needs to log in the target type application before using the target type application, for example, an account and a corresponding account password of the user are entered in an opened login interface to realize login for the target type application, a login identifier is an identifier representing the identity of the user, for example, the login account of the user may be used, and an application display interface refers to a display interface of the target type application on a terminal. After the terminal logs in the target type application, the terminal 101 may obtain a login account of the user as a login identifier, and may display a display interface corresponding to the target type application, that is, an application display interface, on the terminal 101.
In step S502, in response to a first plug-in calling operation triggered in the application display interface, displaying a first plug-in display interface of the first plug-in, and acquiring a second plug-in matched with the login identifier from a plurality of preset plug-ins to be displayed;
in step S503, a plug-in identifier of the second plug-in is displayed on the first plug-in display interface.
In this embodiment, not all the plugin identifiers of the plugins to be displayed are on the first plugin display interface, but a part of the plugins to be displayed is selected from the plugins to be displayed, and the plugins matched with the login identifiers are used as the second plugins, and only the plugin identifiers of the second plugins are displayed on the first plugin display interface, and meanwhile, because the login accounts of different users are different, that is, the login identifiers of different users are different, the second plugins displayed on the first plugin display interface may also be different.
For example, the plug-ins to be presented may include a sub plug-in a, a sub plug-in B, and a sub plug-in C, where the second plug-in matching with the login identifier corresponding to the user a may include the sub plug-in a and the sub plug-in B, and the second plug-in matching with the login identifier corresponding to the user a may include the sub plug-in a and the sub plug-in C, when the user a logs in the target type application and invokes the first plug-in, the plug-in identifiers presented on the first plug-in presentation interface may be the sub plug-in identifiers a and the sub plug-in identifiers B, and if the login target type application is the user B, the plug-in identifiers presented on the first plug-in presentation interface may be the sub plug-in identifiers a and the sub plug-in identifiers C.
In this embodiment, the second plug-in may be screened from the plurality of plug-ins to be displayed based on the login identifier of the user login target type application, and then the plug-in identifier of the second plug-in may be displayed.
Further, after step S503, as shown in fig. 6, the method may further include:
in step S601, a plug-in setting interface is displayed in response to a plug-in setting operation triggered in the first plug-in displaying interface; and the display state identifier of the second plug-in is displayed in the plug-in setting interface.
In this embodiment, the user may further set a display state of a plug-in identifier of a second plug-in displayed in the first plug-in display interface, where the plug-in setting interface is an interface for setting a display state of the plug-in identifier of the second plug-in, and the interface may also display a display state identifier of the second plug-in, if the display state identifier of a certain second plug-in is represented as a display state, the plug-in identifier of the second plug-in may be displayed in the first plug-in display interface, and if the display state identifier of a certain second plug-in is represented as a hidden state, the display of the plug-in identifier of the second plug-in the first plug-in display interface may be cancelled.
In step S602, in response to a display state switching operation triggered for the display state identifier in the plug-in setting interface, a hidden plug-in corresponding to the display state switching operation is acquired;
in step S603, the presentation of the plug-in identifier of the hidden plug-in is cancelled on the first plug-in presentation interface.
The display state switching operation is an operation of switching the display state represented by the display state identifier, and the hidden plug-in means a second plug-in which the display plug-in identifier is hidden on the first plug-in display interface. In this embodiment, the end break 101 initially defaults that all the plug-in identifiers of the second plug-in are displayed on the first plug-in display interface, at this time, the display state identifiers of all the second plug-ins are represented as a display state, and after a user triggers a display state switching operation for a certain display state identifier, the display state can be switched to a hidden state, at this time, the terminal can further acquire the second plug-in switched to the hidden state as a hidden plug-in, and at this time, the display of the plug-in identifier of the hidden plug-in can be cancelled on the first plug-in display interface.
For example, the default display plug-in identifier of the second plug-in may include a sub-plug-in identifier a and a sub-plug-in identifier B, and if the user performs the display state switching operation on the display state identifier corresponding to the sub-plug-in B, the sub-plug-in B is used as a hidden plug-in, and at this time, the terminal 101 may cancel the display of the sub-plug-in identifier B corresponding to the sub-plug-in B on the first plug-in display interface.
In this embodiment, the user may also configure the plug-in identifier display state of the displayed second plug-in, thereby implementing the user-defined configuration of the plug-in identifier display of the second plug-in, and further improving the intelligence of the plug-in identifier display of the second plug-in.
In an exemplary embodiment, after step S203, the method further includes: responding to the switching operation aiming at the plug-in identification, and acquiring the switched plug-in identification, interface rendering information of a switching plug-in corresponding to the switching plug-in identification and plug-in codes of the switching plug-in; and displaying a third plug-in display interface of the switching plug-in obtained by rendering interface rendering information of the switching plug-in the first plug-in display interface, and operating the operation logic of the switching plug-in represented by the plug-in code of the switching plug-in the first plug-in.
In this embodiment, the user may also switch the loaded target plug-in real time, the switch plug-in identifier refers to the plug-in identifier selected by the user after the switch operation, and the third display interface refers to the display interface of the switch plug-in corresponding to the switch plug-in identifier. The user can also trigger the switching operation of the plug-in identifier on the first plug-in display interface through the terminal 101, at this time, the terminal 101 can obtain the corresponding plug-in identifier after the switching operation of the user, that is, the switching plug-in identifier, and at the same time, can also obtain the interface rendering information of the switching plug-in corresponding to the switching plug-in identifier, and the plug-in code of the switching plug-in, so that a third plug-in display interface of the switching plug-in is displayed on the first display interface, and the operation logic of the switching plug-in is operated.
For example, if the plug-in identifier selected by the current user is the sub-plug-in identifier B, the second plug-in loaded in the first plug-in by the terminal 101 at this time may be the sub-plug-in B, if the user needs to add the sub-plug-in a, the switching operation may be performed in the first plug-in display interface, which may be implemented in a manner of performing a trigger operation on the sub-plug-in identifier a corresponding to the sub-plug-in a, and at this time, the terminal 101 may use the sub-plug-in identifier a as a switching plug-in identifier, thereby obtaining interface rendering information and plug-in codes corresponding to the sub-plug-in a, thereby displaying the plug-in display interface of the sub-plug-in a on the first display interface, and running the running logic of the sub-plug-in a, thereby implementing the switching loading of the sub-plug-in a.
In this embodiment, the user may also trigger the switching operation for the plug-in identifier through the terminal 101 to implement the switching loading of the second plug-in, thereby further improving the efficiency of switching and loading the second plug-in.
In addition, the plug-in loading method may further include: responding to the selection operation of the plug-in identification, and displaying the notification information in a first plug-in display interface; the notification information is used for representing that the loading state of the target plug-in is a loading state; after step S203, the method may further include: and hiding the display of the notification information in the first plug-in display interface.
In this embodiment, the loading of the target plug-in is not completed instantaneously, but requires a certain time for loading processing, in this case, the terminal 101 may display the notification information representing the loading state in the first plug-in display interface to indicate that the target plug-in is being loaded, and after the loading is completed, the display of the notification information may be hidden to represent that the target plug-in has been loaded.
Specifically, after the user triggers the operation of selecting the plug-in identifier, the terminal 101 starts loading the target plug-in on the first plug-in, at this time, notification information may be displayed in the first plug-in display interface to represent that the target plug-in is being loaded, and after the target plug-in is loaded, the second plug-in display interface of the target plug-in is displayed in the first plug-in display interface, and after the running logic of the target plug-in is run in the first plug-in, the display of the notification information may be hidden to represent that the target plug-in has been loaded.
In this embodiment, after the user performs the selection operation on the plug-in identifier, the terminal 101 may further display notification information indicating that the loading state of the target plug-in is the loading state, so as to indicate that the target plug-in is loaded, and after the target plug-in is loaded, the display of the notification information may be cancelled, so that the user can be notified of the loading state of the target control, and the intelligence of the target plug-in loading is further improved.
In an exemplary embodiment, a plug-in loading method applied to design software is further provided, and dynamic loading of other plug-ins in one plug-in is realized. The method is independent of browser environment at the bottom layer, and can be reused in a plug-in system of other software through low-cost modification. Specifically, the following may be mentioned:
the plug-in architecture framework of different design software is generally similar, taking the plug-in canvas software as an example. Canvas plug-ins exist in two parts, the interface side and the plug-in side: the user interaction interface of the interface side display plug-in is a hypertext markup language file; the plug-in side is responsible for interacting with the layer canvas and is a pure programming file. The interface side and the plug-in side are in message communication through a message channel. Wherein, on the interface side of the plug-in, most webpage capabilities can be used at will. In the plug-in side sandbox of the canvas, only a small portion of the global objects may be accessed, and most objects such as browser windows, files, extensible hypertext transfer requests, etc. are not accessible, as shown in FIG. 7.
Dynamically loading daughter cards in a mother card involves two aspects: the interface side of the dynamic loading plug-in, and the plug-in side of the dynamic loading plug-in. The overall framework of the daughter board loading solution proposed in this embodiment is shown in fig. 8.
When the sub-plug-ins are packaged and constructed, the plug-in side codes are directly packaged according to common webpage front-end application without any limitation. The whole plug-in side code file of the sub plug-in is packaged, output and mounted on a certain variable, so that the whole plug-in side code file can be taken from the mounted variable only by binding the variable without depending on any global variable, and the strict sandbox limitation can be broken through.
When a user opens a sub-plug-in a main plug-in, the interface side and plug-in side entry codes of the sub-plug-in need to be loaded respectively. The add-on widget interface side may reuse the micro front-end solution of various front-end web pages. If the plug-in side code of the sub plug-in is added, because the plug-in side of the main plug-in cannot use the extensible hypertext transfer request, the plug-in side source code of the sub plug-in can be obtained on the interface side of the main plug-in, and then the source code is sent to the plug-in side of the main plug-in, and then dynamic analysis is performed. The overall process of loading daughter cards may be as shown in fig. 9.
Through this embodiment, branch of academic or vocational study is in order to let the user only need install a section core plug-in design software, other functions all can regard as sub-plug-in dynamic loading, have effectively reduced the volume of core plug-in, have promoted loading speed by a wide margin, thereby finally promoted user experience, and can be with a plug-in that has a large amount of complex functions, the split is the sub-plug-in of a plurality of single functions, the development of each sub-plug-in does not restrict technical scheme, can give different user teams to be responsible for, and independent at any time advance line deployment.
It should be understood that, although the steps in the flowcharts of the present disclosure are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in the figures may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the steps or stages is not necessarily sequential, but may be performed alternately or in alternation with other steps or at least some of the other steps or stages.
It is understood that the same/similar parts among the various embodiments of the method described above in this specification can be referred to each other, and each embodiment focuses on the differences from the other embodiments, and where relevant, reference may be made to the description of the other method embodiments.
FIG. 10 is a block diagram illustrating a plug-in loading device in accordance with an exemplary embodiment. Referring to fig. 10, the apparatus includes a first interface presentation unit 1001, a plug-in information acquisition unit 1002, and a second interface presentation unit 1003.
A first interface display unit 1001 configured to perform displaying of a first plug-in display interface corresponding to a first plug-in installed in a target type application; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a sub plug-in of the first plug-in the target type application;
a plug-in information obtaining unit 1002 configured to execute, in response to a selection operation on a plug-in identifier, taking a second plug-in corresponding to the plug-in identifier selected by the selection operation as a target plug-in, and obtain interface rendering information corresponding to the target plug-in and plug-in code corresponding to the target plug-in;
the second interface showing unit 1003 is configured to execute a second plug-in showing interface for showing the target plug-in obtained by rendering the interface rendering information in the first plug-in showing interface, and execute the running logic of the target plug-in represented by the plug-in code in the first plug-in.
In an exemplary embodiment, the first plug-in comprises a first loading module for loading interface rendering information and a second loading module for loading plug-in codes; a plug-in information obtaining unit 1002, further configured to execute obtaining, by the first loading module, interface rendering information and plug-in codes from the content distribution network; the second interface presentation unit 1003 is further configured to execute sending the plug-in code from the first loading module to the second loading module through the message queue; loading interface rendering information in a first loading module, and loading plug-in codes in a second loading module; displaying a second plug-in display interface rendered by the interface rendering information in the first plug-in display interface according to the interface rendering information loaded in the first loading module, and running the running logic represented by the plug-in codes in the first plug-in according to the plug-in codes loaded in the second loading module.
In an exemplary embodiment, the plug-in loading device further includes: the second plug-in building unit is configured to execute the step of responding to the building request of the plug-in to be built and displaying the plug-in building interface; acquiring interface rendering information of the plug-in to be built uploaded in the plug-in building interface and plug-in codes of the plug-in to be built; and storing the interface rendering information of the plug-in to be constructed and the plug-in code of the plug-in to be constructed to a content distribution network.
In an exemplary embodiment, the second interface presenting unit 1003 is further configured to perform parsing, by using the second loading module, the plug-in code to obtain an operation logic; and loading the running logic into the running environment of the first plug-in, and running the running logic of the target plug-in through the running environment of the first plug-in.
In an exemplary embodiment, the first interface display unit 1001 is further configured to perform, in response to a login operation for a target type application, acquiring a login identifier corresponding to the login operation, and displaying an application display interface of the target type application; responding to a first plug-in calling operation triggered in an application display interface, displaying a first plug-in display interface of a first plug-in, and acquiring a second plug-in matched with a login identifier from a plurality of preset plug-ins to be displayed; and displaying the plug-in identification of the second plug-in on the first plug-in display interface.
In an exemplary embodiment, the plug-in loading device further includes: a display plug-in setting unit configured to perform a plug-in setting operation triggered in response to the first plug-in display interface, to display the plug-in setting interface; the display state identifier of the second plug-in is displayed in the plug-in setting interface; responding to a display state switching operation triggered by aiming at the display state identifier in a plug-in setting interface, and acquiring a hidden plug-in corresponding to the display state switching operation; and canceling the display of the plug-in identification of the hidden plug-in on the first plug-in display interface.
In an exemplary embodiment, the plug-in loading apparatus further includes: the third interface display unit is configured to execute switching operation responding to the plug-in identification, acquire the switched plug-in identification, interface rendering information of a switching plug-in corresponding to the switching plug-in identification and plug-in codes of the switching plug-in; and displaying a third plug-in display interface of the switching plug-in obtained by rendering interface rendering information of the switching plug-in the first plug-in display interface, and operating the operation logic of the switching plug-in represented by the plug-in code of the switching plug-in the first plug-in.
In an exemplary embodiment, the plug-in loading apparatus further includes: a notification information display unit configured to perform display of notification information in a first plug-in display interface in response to a selection operation of the plug-in identification; the notification information is used for representing that the loading state of the target plug-in is a loading state; further comprising: and the notification information hiding unit is configured to execute the display of the hidden notification information in the first plug-in display interface.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 11 is a block diagram illustrating an electronic device 1100 for plug-in loading in accordance with an exemplary embodiment. For example, the electronic device 1100 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so forth.
Referring to fig. 11, electronic device 1100 may include one or more of the following components: processing component 1102, memory 1104, power component 1106, multimedia component 1108, audio component 1110, input/output (I/O) interface 1112, sensor component 1114, and communications component 1116.
The processing component 1102 generally controls the overall operation of the electronic device 1100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1102 may include one or more processors 1120 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1102 may include one or more modules that facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
The memory 1104 is configured to store various types of data to support operations at the electronic device 1100. Examples of such data include instructions for any application or method operating on the electronic device 1100, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1104 may be implemented by any type or combination of volatile or non-volatile storage devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.
The power supply component 1106 provides power to the various components of the electronic device 1100. The power components 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 1100.
The multimedia component 1108 includes a screen between the electronic device 1100 and a user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1110 is configured to output and/or input audio signals. For example, the audio component 1110 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 1100 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, audio component 1110 further includes a speaker for outputting audio signals.
The I/O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1114 includes one or more sensors for providing various aspects of state assessment for the electronic device 1100. For example, the sensor assembly 1114 may detect an open/closed state of the electronic device 1100, the relative positioning of components, such as a display and keypad of the electronic device 1100, the sensor assembly 1114 may also detect a change in the position of the electronic device 1100 or components of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, orientation or acceleration/deceleration of the device 1100, and a change in the temperature of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 1116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 1100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as the memory 1104 comprising instructions, executable by the processor 1120 of the electronic device 1100 to perform the method described above is also provided. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which includes instructions executable by the processor 1120 of the electronic device 1100 to perform the above-described method.
It should be noted that the descriptions of the above-mentioned apparatus, the electronic device, the computer-readable storage medium, the computer program product, and the like according to the method embodiments may also include other embodiments, and specific implementations may refer to the descriptions of the related method embodiments, which are not described in detail herein.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method for loading a plug-in, comprising:
displaying a first plug-in display interface corresponding to a first plug-in installed in the target type application; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a sub plug-in of the first plug-in the target type application;
responding to the selection operation of the plug-in identification, taking a second plug-in corresponding to the plug-in identification selected by the selection operation as a target plug-in, and acquiring interface rendering information corresponding to the target plug-in and a plug-in code corresponding to the target plug-in;
and displaying a second plug-in display interface of the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface, and running the running logic of the target plug-in represented by the plug-in code in the first plug-in.
2. The method of claim 1, wherein the first plug-in comprises a first loading module for loading the interface rendering information and a second loading module for loading the plug-in code;
the obtaining of the interface rendering information corresponding to the target plug-in and the plug-in code corresponding to the target plug-in includes:
acquiring the interface rendering information and the plug-in codes from a content distribution network through the first loading module;
the second plug-in display interface for displaying the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface and the running logic for running the target plug-in represented by the plug-in code in the first plug-in include:
sending the plug-in code from the first loading module to the second loading module through a message queue;
loading the interface rendering information in the first loading module and loading the plug-in code in the second loading module;
displaying the second plug-in display interface rendered by the interface rendering information in the first plug-in display interface according to the interface rendering information loaded in the first loading module, and running the running logic represented by the plug-in code in the first plug-in according to the plug-in code loaded in the second loading module.
3. The method of claim 2, wherein before the obtaining, by the first loading module, the interface rendering information and the plug-in code from a content distribution network, further comprises:
responding to a construction request aiming at the plug-in to be constructed, and displaying a plug-in construction interface;
acquiring interface rendering information of the plug-in to be built uploaded in the plug-in building interface and plug-in codes of the plug-in to be built;
and storing the interface rendering information of the plug-in to be built and the plug-in code of the plug-in to be built to the content distribution network.
4. The method of claim 2, wherein the executing the run logic characterized by the plug-in code in the first plug-in according to the plug-in code loaded in the second load module comprises:
analyzing the plug-in code by using the second loading module to obtain the running logic;
and loading the running logic into the running environment of the first plug-in, and running the running logic of the target plug-in through the running environment of the first plug-in.
5. The method of claim 1, wherein exposing the first plugin exposure interface corresponding to the first plugin installed in the target-type application comprises:
responding to the login operation aiming at the target type application, acquiring a login identification corresponding to the login operation, and displaying an application display interface of the target type application;
responding to a first plug-in calling operation triggered in the application display interface, displaying a first plug-in display interface of the first plug-in, and acquiring a second plug-in matched with the login identification from a plurality of preset plug-ins to be displayed;
and displaying the plug-in identification of the second plug-in on the first plug-in display interface.
6. The method of claim 5, wherein after presenting the plug-in identification of the second plug-in on the first plug-in presentation interface, further comprising:
displaying a plug-in setting interface in response to a plug-in setting operation triggered in the first plug-in displaying interface; the display state identifier of the second plug-in is displayed in the plug-in setting interface;
responding to a display state switching operation triggered by the display state identifier in the plug-in setting interface, and acquiring a hidden plug-in corresponding to the display state switching operation;
and canceling the display of the plug-in identifier of the hidden plug-in on the first plug-in display interface.
7. The method of claim 1, wherein after the step of presenting a second plug-in presentation interface of the target plug-in rendered by the interface rendering information in the first plug-in presentation interface and executing the execution logic of the target plug-in represented by the plug-in code in the first plug-in, the method further comprises:
responding to the switching operation aiming at the plug-in identification, and acquiring the switched plug-in identification, interface rendering information of a switching plug-in corresponding to the switching plug-in identification and plug-in codes of the switching plug-in;
displaying a third plug-in display interface of the switching plug-in obtained by rendering interface rendering information of the switching plug-in the first plug-in display interface, and running the running logic of the switching plug-in represented by the plug-in code of the switching plug-in the first plug-in.
8. The method of claim 1, further comprising:
responding to the selection operation of the plug-in identification, and displaying notification information in the first plug-in display interface; the notification information is used for representing that the loading state of the target plug-in is a loading state;
after the second plug-in display interface of the target plug-in obtained by rendering the interface rendering information is displayed in the first plug-in display interface and the running logic of the target plug-in represented by the plug-in code is run in the first plug-in, the method further includes:
hiding the display of the notification information in the first plug-in display interface.
9. A card loading device, comprising:
the first interface display unit is configured to execute display of a first plug-in display interface corresponding to a first plug-in installed in the target type application; the first plug-in display interface comprises plug-in identifiers corresponding to a plurality of second plug-ins; the second plug-in is a child plug-in of the first plug-in the target type application;
the plug-in information acquisition unit is configured to execute a selection operation responding to the plug-in identification, take a second plug-in corresponding to the plug-in identification selected by the selection operation as a target plug-in, and acquire interface rendering information corresponding to the target plug-in and plug-in codes corresponding to the target plug-in;
the second interface display unit is configured to execute a second plug-in display interface for displaying the target plug-in obtained by rendering the interface rendering information in the first plug-in display interface, and execute the running logic of the target plug-in represented by the plug-in code in the first plug-in.
10. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the plug-in loading method of any one of claims 1 to 8.
11. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the plug-in loading method of any of claims 1 to 8.
CN202211299453.XA 2022-10-24 2022-10-24 Plug-in loading method and device, electronic equipment and storage medium Active CN115373763B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211299453.XA CN115373763B (en) 2022-10-24 2022-10-24 Plug-in loading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211299453.XA CN115373763B (en) 2022-10-24 2022-10-24 Plug-in loading method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115373763A CN115373763A (en) 2022-11-22
CN115373763B true CN115373763B (en) 2023-02-17

Family

ID=84074348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211299453.XA Active CN115373763B (en) 2022-10-24 2022-10-24 Plug-in loading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115373763B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117193874A (en) * 2023-09-05 2023-12-08 北京基调网络股份有限公司 Plug-in processing method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385434A (en) * 2016-08-31 2017-02-08 广州品唯软件有限公司 User interaction method, device and system
US10956179B1 (en) * 2017-12-22 2021-03-23 Intuit, Inc. Third party integration of plugins and widgets
CN114942796A (en) * 2022-05-05 2022-08-26 北京达佳互联信息技术有限公司 Plug-in compiling and calling method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385434A (en) * 2016-08-31 2017-02-08 广州品唯软件有限公司 User interaction method, device and system
US10956179B1 (en) * 2017-12-22 2021-03-23 Intuit, Inc. Third party integration of plugins and widgets
CN114942796A (en) * 2022-05-05 2022-08-26 北京达佳互联信息技术有限公司 Plug-in compiling and calling method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于.NET反射技术的插件式GIS软件设计原理与实现;巫细波等;《地理与地理信息科学》;20091115(第06期);全文 *

Also Published As

Publication number Publication date
CN115373763A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
CN106569800B (en) Front-end interface generation method and device
US9870239B2 (en) Method and device for running application program
EP3428790B1 (en) Method and device for displaying application interface
KR20230088427A (en) File transmission method, file transmission device and electronic device
CN107463372B (en) Data-driven page updating method and device
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
CN115373763B (en) Plug-in loading method and device, electronic equipment and storage medium
CN111427449A (en) Interface display method, device and storage medium
CN110543265A (en) Page title bar generation method and device, electronic equipment and storage medium
CN111221613A (en) Program calling method and device and storage medium
CN111079040A (en) Resource sniffing method, device, terminal, server and storage medium
CN112733058B (en) Data processing system, method, device, electronic equipment and storage medium
CN111596980B (en) Information processing method and device
CN114546436A (en) Micro front-end service updating method and device, electronic equipment and storage medium
CN111104183B (en) Application program running method and device, electronic equipment and storage medium
CN107257384B (en) Service state monitoring method and device
CN113919311A (en) Data display method and device, electronic equipment and storage medium
CN112860625A (en) Data acquisition method, data storage method, device, equipment and storage medium
CN114385373A (en) Data sharing method, data sharing device and computer readable storage medium
CN111104110A (en) Global style sharing method, global style sharing device and electronic device
CN113377322A (en) Page direct processing method and device and electronic equipment
CN115203618B (en) Page processing method and device, electronic equipment and storage medium
CN113867992B (en) Call chain resource isolation method and device, storage medium and electronic equipment
CN113360341B (en) Front-end application maintenance and loading method and device

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