CN117472462A - Plug-in operation method and device, desktop operating system and electronic equipment - Google Patents

Plug-in operation method and device, desktop operating system and electronic equipment Download PDF

Info

Publication number
CN117472462A
CN117472462A CN202311309708.0A CN202311309708A CN117472462A CN 117472462 A CN117472462 A CN 117472462A CN 202311309708 A CN202311309708 A CN 202311309708A CN 117472462 A CN117472462 A CN 117472462A
Authority
CN
China
Prior art keywords
plug
manager
event
loading
list
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.)
Pending
Application number
CN202311309708.0A
Other languages
Chinese (zh)
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.)
Nfs China Software Co ltd
Original Assignee
Nfs China Software 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 Nfs China Software Co ltd filed Critical Nfs China Software Co ltd
Priority to CN202311309708.0A priority Critical patent/CN117472462A/en
Publication of CN117472462A publication Critical patent/CN117472462A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a plug-in operation method, a plug-in operation device, a desktop operating system and electronic equipment, and belongs to the technical field of computers. The method is applied to a desktop operating system comprising a taskbar manager and a plugin manager, obtains the associated information of plugins to be loaded based on plugin loading events through the taskbar manager, generates event data corresponding to the plugin loading events, and pushes the plugin loading events and the event data to the plugin manager; the plug-in manager responds to the plug-in loading event pushed by the taskbar manager, updates the plug-in management configuration file according to event data, preloads the plug-in by adopting a dynamic link library loading mechanism according to the plug-in management configuration file, instantiates the plug-in, starts the plug-in and controls the plug-in to run. According to the method, the independent plug-in manager is created to manage plug-in operation, and the plug-in and the task bar manager are decoupled, so that the stability of task bar operation in a desktop operating system is improved.

Description

Plug-in operation method and device, desktop operating system and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a plug-in operation method, a device, a desktop operating system, an electronic device, and a computer readable storage medium.
Background
A plug-in is a program written in an application program interface conforming to a certain specification, and can only run in a main body specified by the program, but cannot run separately from the specified main body. In desktop operating systems, plug-ins are used to implement a separate function, for example, to implement calendar functions. In a desktop operating system, a task bar is a task parking and display area for a user to perform man-machine interaction, such as an application window switching operation, an application starter parking, a network state display area and the like. The plug-in may be invoked by the taskbar manager as a function implementation or an extended function implementation of an application docked or exposed in the taskbar.
In the prior art, the plug-in is mainly used as a part of the task bar manager to manage and schedule, and has no independent life cycle management, and if the plug-in needs to be updated or has errors, the function and stability of the whole task bar can be affected.
It can be seen that there remains a need for improvements in the prior art plug-in operation methods.
Disclosure of Invention
The embodiment of the application provides a desktop operating system, a plug-in running method and device, electronic equipment and a storage medium, at least one or more defects can be improved, and therefore stability of task bar running in the desktop operating system is improved.
In a first aspect, an embodiment of the present application provides a plug-in operation method, which is applied to a desktop operating system, where the desktop operating system includes: a taskbar manager and a plugin manager, the method comprising:
after the task bar manager and the plug-in manager are started, the task bar manager acquires the associated information of the plug-in to be loaded based on a plug-in loading event;
the taskbar manager generates event data corresponding to the plug-in loading event according to the association information, and pushes the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
the plug-in manager responds to the plug-in loading event pushed by the taskbar manager, and updates a plug-in management configuration file according to event data corresponding to the plug-in loading event;
the plug-in manager preloads the plug-in by adopting a dynamic link library loading mechanism according to the plug-in management configuration file;
the plug-in manager executes an instantiation operation on the preloaded plug-in to acquire a plug-in instance of the preloaded plug-in;
the plug-in manager registers the obtained plug-in instance into a second plug-in list;
And the plug-in manager schedules the plug-in operation corresponding to the plug-in instance based on the second plug-in list.
In a second aspect, an embodiment of the present application provides a plug-in running device, which is applied to a desktop operating system, where the desktop operating system includes: a taskbar manager and a plugin manager, the apparatus comprising:
the associated information acquisition module is used for acquiring the associated information of the plug-in to be loaded based on a plug-in loading event after the task bar manager and the plug-in manager are started;
the event pushing module is used for generating event data corresponding to the plug-in loading event according to the association information by the taskbar manager and pushing the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
the plug-in management configuration file updating module is used for responding to the plug-in loading event pushed by the taskbar manager by the plug-in manager and updating a plug-in management configuration file according to event data corresponding to the plug-in loading event;
the plug-in preloading module is used for preloading the plug-in by the plug-in manager according to the plug-in management configuration file by adopting a dynamic link library loading mechanism;
The plug-in instance acquisition module is used for executing an instantiation operation on the preloaded plug-in by the plug-in manager to acquire the plug-in instance of the preloaded plug-in;
the plug-in instance registration module is used for registering the acquired plug-in instance in the second plug-in list by the plug-in manager;
and the plug-in running module is used for scheduling the plug-in running corresponding to the plug-in instance by the plug-in manager based on the second plug-in list.
In a third aspect, an embodiment of the present application provides a desktop operating system, including: a taskbar manager and a plugin manager, wherein,
the task bar manager is used for acquiring the associated information of the plug-in to be loaded based on the plug-in loading event;
the taskbar manager is further configured to generate event data corresponding to the plug-in loading event according to the association information, and push the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
the plug-in manager is used for responding to the plug-in loading event pushed by the taskbar manager and updating a plug-in management configuration file according to event data corresponding to the plug-in loading event;
The plug-in manager is further configured to preload a plug-in by using a dynamic link library loading mechanism according to the plug-in management configuration file, execute an instantiation operation on the preloaded plug-in, acquire a plug-in instance of the preloaded plug-in, and register the acquired plug-in instance in a second plug-in list;
the plug-in manager is further configured to schedule, based on the second plug-in list, a plug-in operation corresponding to the plug-in instance.
In a fourth aspect, the embodiment of the application further discloses an electronic device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the plug-in running method described in the embodiment of the application when executing the computer program.
In a fifth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the plug-in operation method disclosed in embodiments of the present application.
According to the plug-in operation method disclosed by the embodiment of the application, the plug-in manager is added in the desktop operation system, and the plug-in operation is controlled in cooperation with the taskbar manager. According to the method, the plug-in loading operation is pushed to the plug-in manager in the form of an event by the task bar manager, the plug-in is loaded in the form of a dynamic link library by the plug-in manager, the plug-in manager controls the plug-in to operate, the plug-in and the task bar manager are decoupled doubly from the program code and the operation angle, and the independent plug-in manager is created to perform clear and definite configuration, loading, instantiation and life cycle management on the plug-in, so that the plug-in management function is separated from the task bar management function, the complexity and maintenance difficulty of a system are reduced, and the operation stability of the task bar in a desktop operating system is improved.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
FIG. 1 is one of the flow diagrams of the plug-in operation method disclosed in the embodiments of the present application;
FIG. 2 is a second flow chart of a plug-in operation method disclosed in an embodiment of the present application;
FIG. 3 is a schematic diagram of a desktop operating system according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of the logical relationship between a plug-in manager and a taskbar manager in a desktop operating system disclosed in an embodiment of the present application;
FIG. 5 is a schematic illustration of a plug-in running device according to an embodiment of the present disclosure;
FIG. 6 is a second schematic structural view of the card running device disclosed in the embodiment of the present application;
FIG. 7 schematically illustrates a block diagram of an electronic device for performing a method according to the present application; and
fig. 8 schematically shows a memory unit for holding or carrying program code implementing the method according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The plug-in operation method disclosed by the embodiment of the application is applied to a desktop operating system shown in fig. 3. As shown in fig. 1, the method includes: steps 101 to 107.
Step 101, after the task bar manager and the plug-in manager are started, the task bar manager obtains the associated information of the plug-in to be loaded based on a plug-in loading event.
Optionally, the preset plug-in loading event may be an event triggered by a plug-in loading operation; the association information includes, but is not limited to, one or more of the following: plug-in identification, plug-in configuration information, display information, and behavior information.
In the starting process of the desktop operating system, the main program starts the task bar manager and the plug-in manager, and then the task bar manager and the plug-in manager execute corresponding operations according to respective designs.
For example, the taskbar manager reads a taskbar configuration file of the system based on triggering of a preset plugin loading event to acquire a plugin identifier, a plugin name, display information and behavior information of a plugin to be loaded.
The taskbar configuration file is primarily used to define and control various properties and behaviors of the taskbar manager. For example, the position, size, color, transparency, displayed application icons, a list of quick launch applications, behavior of a system tray, etc. of the taskbar may be controlled. In addition, the taskbar configuration file also comprises the plug-in name of the plug-in to be loaded, and plug-in configuration information for controlling the display information of the plug-in the taskbar and the executed desktop behavior. For example, display information that controls the display order, size, and the like of the plug-in icons, and behavior information that controls the desktop behavior of the plug-ins. Wherein the behavior information includes, but is not limited to, interactive behavior to which the plug-in can respond: such as clicking, dragging, deleting, etc.
And the taskbar manager reads the plug-in configuration file of the plug-in to be loaded according to the plug-in name and acquires plug-in configuration information.
Specifically, the taskbar manager reads plug-in configuration files of all plug-ins to be loaded according to the plug-in names and preset configuration file path information to acquire independent plug-in configuration information of developers for each plug-in.
In an alternative embodiment, a plug-in developer may write a plug-in configuration file for each plug-in, describing information such as the running environment, running parameters, etc. of the plug-in, name the plug-in configuration file according to the specification of the desktop operating system (for example, name the plug-in configuration file according to the plug-in name), and place the plug-in configuration file under a specified path of the desktop operating system. In this way, the taskbar manager may find the plug-in configuration file corresponding to each plug-in according to the plug-in name.
In some embodiments of the present application, the plug-in configuration information in the plug-in configuration file includes, but is not limited to, one or more of the following: general information, scheduling policy, execution mode, parameters, file path, dependency list and conflict list of plugins, conflict processing policy, which plugins need to be called or responded, shared memory requirement, size and other information. Wherein the general information includes, but is not limited to, one or more of the following: identify, describe, display demand, etc.; the scheduling policy includes, but is not limited to, one or more of the following: scheduling policy and priority of plug-ins; the implementations include, but are not limited to, one or more of the following: synchronous, asynchronous, etc.; the parameters include, but are not limited to, one or more of the following: interface address, operating parameters, etc.; the file path includes, but is not limited to, one or more of the following: the storage location of the plug-in, the storage location of a dynamically linked library file (e.g., a. So file) of the plug-in code, etc. The dependency list is used for describing a list of dependency libraries when the plug-in is executed, and the conflict list is used for describing a list of plug-ins which cannot be executed simultaneously with the plug-in.
Step 102, the taskbar manager generates event data corresponding to the plug-in loading event according to the association information, and pushes the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager.
And the taskbar manager generates event data corresponding to the plug-in loading event according to one or more of the plug-in identification, the plug-in name, the plug-in configuration information, the display information and the behavior information, and pushes the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager.
The task bar manager pushes the plug-in configuration information of each plug-in to be loaded obtained by reading the plug-in configuration file, and the display information and the behavior information of each plug-in to be loaded obtained by reading the task bar configuration file to the plug-in manager in the form of event data, so that the plug-in manager can execute plug-in management according to the information.
In some alternative embodiments, after the taskbar manager and the plugin manager are started, further comprising: the plug-in manager creates a shared memory; correspondingly, the pushing the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager includes: the taskbar manager stores the plug-in loading event and event data corresponding to the plug-in loading event to the shared memory; and the plug-in manager acquires the plug-in loading event and event data corresponding to the plug-in loading event from the shared memory.
Optionally, event flags of different plug-in events can be set in the shared memory, and the taskbar manager or the plug-in manager can timely acquire corresponding plug-in loading events and event data corresponding to the corresponding plug-in loading events by monitoring changes of the event flags.
The desktop operating system disclosed in the embodiment of the application has a shared memory mechanism, for example, a sheet () function can be called to allocate specific memory areas for each plug-in unit needing to be communicated, and the memory areas are visible to all plug-in units and can be used for data exchange and/or signal transmission. The plug-in manager uses a shared memory mechanism to perform interaction between the plug-ins by applying for the shared memory, and data exchange and/or signaling between the plug-in manager and the taskbar manager. The specific method for creating the shared memory refers to the prior art, and is not described in detail in the embodiments of the present application.
According to the plug-in operation method disclosed by the embodiment of the application, a shared memory area is created and managed by the plug-in manager, and all plug-ins can read and write the shared memory area. Thus, the plug-ins can perform data interaction and communication through the shared memory. On the other hand, the plug-in manager provides a standard interface, so that the plug-in can conveniently read and write the shared memory. Therefore, a plug-in developer does not need to be concerned with the specific implementation of the shared memory, only needs to read and write data through an interface provided by the plug-in manager, and does not need to independently process related logic of each plug-in, so that the development complexity of the plug-in is greatly simplified.
And the plug-in manager establishes a shared memory and provides unified memory access interfaces and services, so that signal and data transmission is performed among plug-ins, plug-ins and the plug-in manager and between the plug-in manager and the task bar manager through the shared memory, and the overall operation efficiency of the system is improved.
Taking a weather forecast plug-in included in a desktop operating system as an example, the weather forecast plug-in can acquire real-time weather information and submit the real-time weather information to a task bar for display. However, if other plug-ins of the desktop operating system, such as a calendar plug-in, want to display current weather information, the weather forecast plug-in and the calendar plug-in may share weather information through a shared memory created by the plug-in manager.
Illustratively, the shared memory area includes a field "current weather", and after the weather forecast plug-in obtains new weather information, the plug-in manager may provide an interface to write the newly obtained weather information into the field "current weather" of the shared memory area. Meanwhile, when the calendar plug-in updates the interface, the value of the current weather field in the shared memory area can be read through the interface provided by the plug-in manager, the latest weather information is obtained, and the information is displayed on the interface of the calendar.
In addition, the shared memory area can be used not only for data interaction but also for signal transmission. For example, if the weather forecast plug-in needs to initiate a "weather change" event after acquiring new weather information, this may be achieved by setting a specific flag bit (e.g., a "weather change flag") in the shared memory area. Other plug-ins that are concerned about this event may obtain relevant event notifications by listening for flag bits.
Step 103, the plug-in manager responds to the plug-in loading event pushed by the taskbar manager and updates a plug-in management configuration file according to event data corresponding to the plug-in loading event.
After receiving the plug-in loading event pushed by the taskbar manager, the plug-in manager analyzes event data corresponding to the plug-in loading event and acquires the associated information of the plug-in to be loaded. Wherein the association information includes, but is not limited to, one or more of the following: plug-in identification, plug-in configuration information, display information, and behavior information. And then, the plug-in manager generates a piece of plug-in management information according to the plug-in configuration information, the display information, the behavior information and the plug-in identification in the event data, and additionally writes the plug-in management information into a locally stored plug-in management configuration file for executing plug-in management operation according to the plug-in management configuration file.
Step 104, the plug-in manager preloads the plug-in by adopting a dynamic link library loading mechanism according to the plug-in management configuration file.
As known in the foregoing process of generating the plugin management configuration file, the plugin management configuration file includes one or more pieces of plugin management information, where each piece of plugin management information may include: plug-in identification, execution sequence of plug-ins, display position, dependency relationship, conflict list, execution parameters, execution mode, storage position of dynamic link library file of plug-in code and the like. The plug-in management configuration file is mainly used for controlling the behavior of the plug-in manager and loading of the plug-ins, for example, which plug-ins are to be loaded, the loading sequence of the plug-ins, parameters of the plug-ins and the like can be defined. In addition, the plug-in management configuration file may also define how the plug-in manager handles the lifecycle of the plug-ins, e.g., may define loading, initializing, starting, stopping, and unloading plug-ins, etc. The plug-in management profile is the basis on which the plug-in manager and plug-ins can properly cooperate to achieve the desired functionality and behavior.
After the plug-in management configuration file is generated, the plug-in manager loads the plug-ins based on the storage positions of the dynamic link library files of the plug-in codes of the plug-ins in the plug-in management configuration file.
As described above, the plug-in management configuration file includes: the storage location of the dynamically linked library file of plug-in code. In some alternative embodiments, the plug-in manager preloads a plug-in according to the plug-in management configuration file using a dynamic link library loading mechanism, including: and the plug-in manager executes a preset dynamic link library loading instruction based on the storage position of the dynamic link library file of the plug-in code of the plug-in, and loads the dynamic link library file into the memory of the desktop operating system. The preset dynamic link library loading instruction may be, for example: the dlopen () function is performed.
In some optional embodiments, the plug-in manager executes a preset dynamic link library loading instruction based on a storage location of a dynamic link library file of plug-in code of a plug-in, and loads the dynamic link library file into a memory of the desktop operating system, including: substeps A1-A4.
And in the substep A1, the plug-in manager initializes a first plug-in list of plug-ins to be preloaded according to the plug-in management configuration file.
At the beginning of the start of the plug-in manager, an empty first plug-in list is first created, and the first plug-in list is used for storing information of plug-ins to be loaded.
After the plug-in manager receives information such as plug-in configuration information sent by the taskbar manager and generates a plug-in management configuration file, the plug-in manager firstly updates a first plug-in list according to plug-ins needing to be preloaded and information of each plug-in needing to be preloaded recorded in the plug-in management configuration file, and records related information of the plug-ins needing to be preloaded into the first plug-in list. For example, information such as the name of the plug-in to be preloaded, the storage location of the dynamically linked library file of the plug-in code, the dependency relationship of the plug-in and the like is stored in the first plug-in list.
And a sub-step A2, the plug-in manager checks whether the dynamic link library file corresponding to each plug-in the first plug-in list exists or not, and checks whether the dependency library of each plug-in the first plug-in list is correctly linked or not according to the dependency relationship to obtain a check result.
In the process of preloading the plugins, the plugin manager can sequentially check each plugin in the first plugin list, check whether a dynamic link library file of a plugin code of each plugin is in a specified storage position, check whether a dependency library required in a dependency relationship of each plugin is installed correctly, link correctly and obtain a check result. Alternatively, the library on which a plug-in depends, i.e., the dependent library, may be checked by executing the "ldd plug in. So" command, and further, it is confirmed whether each dependent library has been installed correctly and has been linked correctly into the desktop operating system.
And a sub-step A3, wherein the plug-in manager executes a preset dynamic link library loading instruction based on the storage position of the dynamic link library file of the plug-in code of the plug-in and loads the dynamic link library file into the memory of the desktop operating system in response to the checking result indicating that the dynamic link library file corresponding to the plug-in exists and that the dependent library of the plug-in is correctly linked.
In an alternative embodiment, for a certain plug in1, if the dynamic link library file of plug-in code of plug-in 1 is stored in a specified location of the desktop operating system (e.g., in a manager configuration file position) find the dynamic link library file corresponding to plug-in pin 1 (such as the dynamic link library file name corresponding to plug-in pin 1 in the manager configuration file), the dynamic link library file corresponding to plug in1 is considered to exist. Further, executing the preset instruction to check whether the dependency library of the plug-in plugin1 is correctly linked. Alternatively, the dependency library may be obtained from the dependency list of plug-in plug in1 recorded in the manager profile, and checked by executing a command such as ldd plug in. So whether the dependency library has been installed and linked correctly. Specific commands and methods for querying whether a certain dynamic link library or static link library has been installed and linked correctly refer to the prior art, and are not described in detail in the embodiments of the present application.
If the dynamic link library file corresponding to the plug-in plug in1 exists, and the dependency library of the plug-in plug in1 is queried to be installed correctly, and has been properly linked into the desktop operating system, indicating that plug-in plugin1 has been provided with execution conditions, and the plug-in manager executes a preset dynamic link library loading instruction based on the storage position of the dynamic link library file of the plug-in code of the plug-in, and loads the dynamic link library file into the memory of the desktop operating system.
And a sub-step A4, wherein the plug-in manager removes the information of the plug-in from the first plug-in list in response to the checking result indicating that the dynamic link library file corresponding to the plug-in does not exist or the dependent library of the plug-in is not correctly linked.
If the dynamic link library file corresponding to the plug-in plugin1 does not exist, or the dynamic link library file corresponding to the plug-in plugin1 exists, but all the dependent libraries of the plug-in plugin1 are not installed correctly, or, the dependent libraries of plug-in 1 are not all properly linked into the desktop operating system, in which case plug-in 1 will not be able to execute, and therefore, the plug-in manager skips loading plug-in plug in1, and removing the related information of the plug in1 from the first plug in list.
In some embodiments of the present application, the add-in manager may output loading error information to the taskbar manager to notify the taskbar manager to perform a corresponding operation according to the add-in loading result, for example, prompting the user of an add-in loading failure, a name of a missing add-in, and the like.
Step 105, the plug-in manager performs an instantiation operation on the preloaded plug-in to obtain a plug-in instance of the preloaded plug-in.
After the steps are executed, the plug-in does not start execution, and only the code of the plug-in is loaded into the memory of the desktop operating system. The plug-in code of the plug-in to be loaded is preloaded into the memory, so that the loading time of the plug-in code in the subsequent plug-in execution can be reduced.
Next, the addresses of plug-in interfaces, methods and events of the plug-ins which can be executed are obtained through the dynamically linked library file of the plug-in code which is preloaded, and plug-in objects are instantiated according to the obtained addresses of the plug-in interfaces, methods and events, and the plug-in objects are initialized to an initial state defined in the plug-in code. The plug-in object includes all methods and properties of the plug-in.
According to the obtained plug-in interface, method and address of the event, the specific method for instantiating the plug-in object refers to the prior art, and will not be described in detail in the embodiments of the present application.
In some alternative embodiments, the plug-in manager performs an instantiation operation on a preloaded plug-in, obtains a plug-in instance of the preloaded plug-in, including: the plug-in manager obtains the reference of the preloaded plug-in and stores the reference to a plug-in registry; and the plug-in manager respectively acquires the addresses of interfaces, methods and events of the plug-ins corresponding to each reference according to the references in the plug-in registry, and instantiates plug-in objects according to the addresses of the interfaces, the methods and the events to obtain plug-in instances of the preloaded plug-ins.
Wherein the reference to the preloaded plug-in is the handle to operate the plug-in obtained when the plug-in is preloaded. For example, the reference to a preloaded plugin is the return value of the dlopen () function when the dynamically linked library file for the plugin is loaded using the dlopen () function.
And then, the plug-in manager executes dlsym () function according to the reference in the plug-in registry, and reads the interface, method and event address of the plug-in corresponding to the reference.
After the plug-in preloading is completed, references are created for each preloaded plug-in and stored into a "plug-in registry" so that the plug-ins can be quickly found and operated during subsequent plug-in execution and management.
And 106, the plug-in manager registers the acquired plug-in instance in a second plug-in list.
In some alternative embodiments, the plug-in manager may manage plug-in objects that have been instantiated by setting up a second plug-in list and the manageability engine and provide the operating interfaces of the plug-ins in the second plug-in list to the taskbar manager or other plug-in call. For example, the method of the plug-in is provided to a taskbar manager or other plug-in call.
At initial run time of the plugin manager, a second plugin list is initialized to be empty, after which there is always a plugin instance registered into the second plugin list as the plugin is instantiated. Each element in the second plug-in list points to an instantiated plug-in object.
The management engine is responsible for updating the second plug-in list and processing the data pushed by the task bar management.
And step 107, the plug-in manager schedules the plug-in operation corresponding to the plug-in instance based on the second plug-in list.
In some optional embodiments, the plug-in manager schedules, based on the second plug-in list, a plug-in operation corresponding to the plug-in instance, including: and the plug-in manager schedules the plug-in operation corresponding to the plug-in instance based on the scheduling strategy recorded in the plug-in management configuration file.
For example, the management engine in the plugin manager traverses plugin examples in the second plugin list, for each plugin example, based on the scheduling policy recorded in the plugin management configuration file, checks whether the defined interface and method meet the execution condition of the scheduling policy constraint, and if so, executes the interface or method; or perform certain plug-in operations based on the triggering of the event. For example, if a user requests a particular function, the plug-in manager will invoke a corresponding method execution of the plug-in instance that provides that function.
In particular, for example, the management engine in the plugin manager traverses the second plugin list, checks each plugin instance, obtains the scheduling policy of each plugin from the plugin management configuration file, and decides when and how to schedule the interface of the plugin instance according to the determined scheduling policy. Wherein the scheduling policy includes, but is not limited to, any of the following: priority rules, time rules, event rules, etc. Optionally, if there is no scheduling policy in the plugin management configuration file, the scheduling policy is performed according to a time rule. After the above checking is performed on each plug-in instance, the management engine invokes a specific interface of the plug-in instance to control the operation of the plug-in corresponding to the plug-in instance for the plug-in instance determined to satisfy the scheduling policy. Finally, the management engine outputs the operation result of each plug-in and possible error information. This information needs to be properly recorded and processed.
For example, if the plug-in manager implements a time-driven scheduling policy, then an alternative plug-in scheduling procedure is as follows:
input: the current system time, the second plug-in list, the next scheduled run time of each plug-in. The next planned running time is calculated according to a scheduling strategy or according to the running sequence of the plug-ins.
The scheduling process comprises the following steps: the manageability engine traverses the second list of plugins, checking the next scheduled runtime for each plugin. If this time is equal to or less than the current system time, the management engine calls the run () method of this plug-in, executing the plug-in.
And (3) outputting: the result of the plug-in operation, the new next scheduled operation time, and possible error information.
The management engine performs the scheduling process described above for each plug-in instance separately to ensure that all plug-ins that need to be run can run on time.
For example, when a user's operation request or other system event is monitored by the taskbar manager, the taskbar manager may directly invoke the method of the plug-in instance provided in the second plug-in list to control the plug-in to perform the related operation.
The method of operation of the plug-in is described below in connection with a specific plug-in example.
Taking a weather forecast plug-in as an example, the plug-in can acquire weather information through a network and display the weather information on one window of a task bar of a desktop operating system. The developer writes the codes of the weather forecast plug-in according to the interface specification of the desktop operating system, compiles the codes into a dynamic link library file, for example compiles the dynamic link library file to generate a weather plug in. So file, and then stores the dynamic link library file under a certain path of the desktop operating system. Meanwhile, a developer needs to write a plug-in configuration file of the weather forecast plug-in, for example, the plug-in configuration file is stored as weather plug in. Ini, and some contents are filled in the plug-in configuration file: plug-in identification, description, priority, execution mode (synchronous/asynchronous), parameters, storage location of dynamic link library files, dependency list, conflict list, etc. of the weather forecast plug-in.
Meanwhile, a developer needs to write a taskbar configuration file according to plug-in functions supported by a desktop operating system, and display positions, sequences and behavior information of plug-ins (such as weather forecast plug-ins) are described in the taskbar configuration file.
Meanwhile, the desktop operating system is required to be modified, and a plug-in manager is added, wherein the plug-in manager provides a plug-in operating interface for the task bar manager to call through a second plug-in list. And the plug-in manager obtains plug-in configuration information of plug-ins needing to be loaded, such as weather forecast plug-ins, preloads the plug-in configuration information, instantiates plug-in objects to obtain plug-in instances, registers the plug-in instances to a second plug-in list and provides plug-in operation interfaces for a calling party.
And modifying codes of a weather forecast plug-in called by a taskbar in a taskbar manager in the prior art into plug-in operation interfaces provided by the taskbar manager through a second plug-in list called by the taskbar manager.
After the development of the codes is completed, compiling codes of a desktop operating system to generate executable files. Executing the executable file and starting a desktop operating system.
In the starting process of the desktop operating system, the desktop operating system starts a taskbar manager and a plugin manager, wherein the taskbar manager reads a taskbar configuration file and acquires the plugin name, display information and behavior information of a plugin (such as a weather forecast plugin) to be loaded; reading a plug-in configuration file (such as a weather plug-in configuration file weather plug-in) of a plug-in to be loaded according to the plug-in name, and obtaining plug-in configuration information; and then, the plug-in configuration information, the display information and the behavior information are sent to the plug-in manager.
And then, the plug-in manager generates a plug-in management configuration file according to the plug-in configuration information, the display information and the behavior information sent by the taskbar manager, starts preloading the plug-in and instantiates the plug-in. For example, the name of the weather forecast plug-in and the path of the so file are added in the plug-in registry, and then the weather plug in so dynamic link library file is loaded into memory through the dlopen () function. The need to obtain the interface, method and event address of the weather forecast plug-in can then be achieved by dlsym () function. For example, if the weather forecast plug-in has a method of "getting weather", the address of the method can be obtained in this specified way. Next, the plug-in object of the weather forecast plug-in is instantiated and initialized to an initial state defined within the plug-in code, to which point the weather forecast plug-in has been loaded into memory, the plug-in object is created and initialized.
The plugin manager then creates a second plugin list, each element of which is an instantiated plugin object. For the weather forecast plugin, it is assumed that there is an interface get_weather (), and this interface returns the current weather information after being called.
Then, a plug-in object is created for the weather forecast plug-in according to the configuration file of the plug-in, and an instance of the object is registered in a second plug-in list. At the same time, the address of the get_weather interface of the weather forecast plug-in is obtained, and the address is called in the subsequent step.
The management and scheduling of the plug-in layer may then begin. For example, when the taskbar manager monitors a "refreshing weather" event, a corresponding interface event is generated, the interface event carries the identification of the weather forecast plug-in and specific event data, and the event is sent to the plug-in manager. After receiving the event, the plug-in manager responds to the event and calls a get_weather () interface of a corresponding plug-in instance in the second plug-in list to acquire weather information and a return result, and then controls the weather forecast plug-in to refresh display according to the return result.
In some optional embodiments, the plug-in manager schedules, based on the second plug-in list, a plug-in operation corresponding to the plug-in instance, including: the plug-in manager traverses the second plug-in list to respectively acquire conflict lists of the plug-ins corresponding to the current plug-in instance in the plug-in management configuration file; the plug-in manager checks whether plug-in instances of plug-ins in the conflict list are included in the second plug-in list; responding to the plug-in instances of the plug-ins in the conflict list to be included in the second plug-in list, and scheduling the plug-ins corresponding to the current plug-in instance to run according to the conflict processing strategy of the plug-ins corresponding to the current plug-in instance in the plug-in management configuration file by the plug-in manager; and responding to the fact that the plug-in instance of the plug-in the conflict list is not included in the second plug-in list, and scheduling the plug-in corresponding to the current plug-in instance to operate according to a scheduling strategy of the plug-in corresponding to the current plug-in instance in the plug-in management configuration file by the plug-in manager.
For example, the plugin manager traverses the second plugin list, and in the traversing process, for the current plugin instance, acquires a conflict list of the plugin corresponding to the current plugin instance in the plugin management configuration file. And the conflict list records the plug-in identification of the plug-in which can not run simultaneously with the plug-in. Wherein, the plug-in identifier may be a plug-in name. The plug-in manager further judges whether each plug-in the conflict list is in a running state or not, namely judges whether each plug-in the conflict list has a plug-in instance recorded in the second plug-in list or not.
And if the plug-in instance of the plug-in the conflict list is included in the second plug-in list, the plug-in manager needs to schedule the plug-in corresponding to the current plug-in instance to operate according to the conflict processing strategy of the plug-in corresponding to the current plug-in instance in the plug-in management configuration file. Wherein the conflict handling policy is configured by a plug-in developer or a desktop operating system developer. For example, the conflict handling policy may be: and outputting conflict prompt information, and then discarding execution, determining discarding execution or continuing execution according to the priority of the plug-in. The specific content of the conflict processing policy is not limited in the embodiments of the present application.
And if the plug-in instance of the plug-in the conflict list is not included in the second plug-in list, the plug-in manager needs to schedule the plug-in corresponding to the current plug-in instance to operate according to the scheduling policy of the plug-in corresponding to the current plug-in instance in the plug-in management configuration file. Wherein the scheduling policy is configured by a plug-in developer. For example, the scheduling policy may be executed according to a preset period, executed after a certain condition is met, or the like. The specific content of the scheduling policy is not limited in the embodiment of the present application.
For example, if two weather forecast plug-ins attempt to write the "current weather" field at the same time, then the plug-in manager needs to decide which weather forecast plug-in to execute first, and how to handle the write requests of the other weather forecast plug-ins. The decision basis of the plugin manager is the conflict handling policy in the plugin manager configuration file. If the conflict processing strategy is configured to be executed according to the priority, the plug-in manager schedules the weather forecast plug-in with higher priority to write in the field of current weather, and ignores the writing request of the weather forecast plug-in with lower priority.
Based on the foregoing embodiments, referring to fig. 2, in some alternative embodiments of the present application, after the task bar manager and the plug-in manager are started, the method further includes: step 108 to step 110.
Step 108, the taskbar manager generates event data of a plug-in operation event based on a plug-in identification of a target plug-in aiming at the plug-in operation event of a preset operation type of the target plug-in.
Optionally, the preset operation types include, but are not limited to, one or more of the following: plug-in unloading operation type, plug-in updating operation type and interactive behavior operation type; the interactive behavior operation type can be further subdivided into specific operations: click operation type, drag operation type, refresh operation type, etc. For example, when a user uninstalls a plug-in on a desktop operating system, the taskbar manager may detect a plug-in running event of the plug-in uninstall operation type. For another example, when a user updates a plug-in on the desktop operating system, the taskbar manager may detect a plug-in running event for the type of plug-in update operation. For another example, when a user clicks on an interface of a certain plug-in on the desktop operating system to perform man-machine interaction with the plug-in, the taskbar manager may detect a plug-in running event of an interactive behavior operation type.
The specific implementation manner of the task bar manager to obtain the plug-in running event refers to the prior art, and is not repeated in the embodiment of the present application.
After the taskbar manager monitors the plug-in running event of the type, further acquiring a plug-in aimed at by the plug-in running event as a target plug-in, and generating event data of the plug-in running event based on a plug-in identifier of the target plug-in. Alternatively, the generated event data may include different information for different types of plug-in execution events. For example, for a plug-in running event of a plug-in uninstall operation type, only the plug-in identification may be included in the event data; for a plug-in operation event of a plug-in updating operation type, the event data can comprise a plug-in identifier and plug-in version information; for another example, for a plug-in operation event of the interactive behavior operation type, the event data may include a plug-in identifier, coordinate information corresponding to the interactive operation, input data, and the like.
The information that needs to be included in the event data of the different types of plug-in operation events is determined according to the specific plug-in and the function of the plug-in, which is not limited in the embodiment of the present application.
Step 109, the taskbar manager pushes the plug-in running event and event data of the plug-in running event to the plug-in manager.
In some alternative embodiments, the taskbar manager pushes the plug-in running event and event data for the plug-in running event to the plug-in manager through a pre-created shared memory. As previously described, the add-in manager creates shared memory for data and signaling. Furthermore, the plug-in manager also provides a shared memory access interface for the plug-in or the taskbar manager to call. Optionally, the taskbar manager pushes the plug-in running event and event data of the plug-in running event to the plug-in manager by calling a shared memory access interface provided by the plug-in manager.
Step 110, the plug-in manager controls the target plug-in to run based on the plug-in running event, the event data of the plug-in running event, and/or the second plug-in list.
The plug-in manager may obtain events and event data pushed by the taskbar manager based on event monitoring or other mechanisms and perform corresponding plug-in scheduling.
In some optional embodiments, the plug-in manager controls the target plug-in to operate based on the plug-in operation event, event data of the plug-in operation event, and/or the second plug-in list, including: any one or more of the following scheduling operations.
First, in response to the plug-in running event matching a plug-in unloading operation type, the plug-in manager closes the target plug-in, and unloads a dynamic link library file of the target plug-in, and cleans up management data of the target plug-in the plug-in manager. Wherein the management data includes: and plug-in data associated with the target plug-in the plug-in registry and the second plug-in list.
In some alternative embodiments, the plug-in manager may shut down the target plug-in by invoking an offload method provided by the target plug-in. In the uninstall method, the dependencies may be checked to ensure that no references to the target plugin are being invoked. The plugin manager then invokes a particular function or method to uninstall the code of the target plugin from memory so that its memory space can be reused. For example, a dllcose () function is used to offload the dynamic link library (.so files) of the target plugin. Specifically, a handle returned when the dynamic link library of the target plug-in is preloaded by calling dlopen () is used as a parameter of a dllock () function, the dllock () function is called, and the dynamic link library file of the target plug-in is unloaded.
Further, the plug-in manager needs to delete the data of the table item corresponding to the target plug-in the plug-in registry, delete the data corresponding to the plug-in instance of the target plug-in the second plug-in list, and delete the configuration information corresponding to the target plug-in the plug-in manager configuration file.
In some alternative embodiments, the plug-in manager pushes the uninstallation result of the target plug-in to the taskbar manager, and the taskbar manager executes the corresponding uninstallation prompt.
Second, in response to the plug-in operation event matching a plug-in update operation type, the plug-in manager updates the dynamic link library file of the target plug-in, and updates management data of the target plug-in the plug-in manager based on the updated dynamic link library file.
In some alternative embodiments, the plug-in manager may first load the dynamically linked library file of the newer version of the target plug-in and instantiate the new version of the target plug-in, after which the plug-in manager uninstalls the old version of the target plug-in. After the old version target plugin is successfully unloaded, the plugin manager starts a plugin instance for running the new version target plugin, so that the fact that only one version of target plugin is contained in the desktop operating system is guaranteed to be running. The effect that the dynamic link library file of the old version is updated by adopting the dynamic link library file of the plug-in of the new version, and the management data of the target plug-in the plug-in management configuration file and the plug-in registry, the second plug-in list are matched with the updated dynamic link library file is achieved. The plug-in loading process flow and the plug-in unloading process flow are described in the foregoing, and are not described in detail herein.
Thirdly, responding to the plug-in running event to match the interactive behavior operation type, and calling an interface corresponding to the target plug-in and the plug-in behavior event by the plug-in manager based on the event data of the plug-in running event and the plug-in instance in the second plug-in list to control the operation of the target plug-in.
After the plugin manager receives the plugin operation event of the interaction operation type, which target plugin instance in the second plugin list needs to be called can be determined according to the plugin identification, which interface of the target plugin instance is further determined according to the specific interaction operation type of the plugin operation event, and the determined interface of the target plugin instance is called by taking event data as input, so that the target plugin operation is controlled to respond to the corresponding interaction operation.
The plug-in operation method disclosed by the embodiment of the application is applied to a desktop operating system, and the plug-in operation is controlled by adding a plug-in manager in the desktop operating system and cooperating with a taskbar manager. Specifically, after the task bar manager and the plug-in manager are started, the task bar manager acquires the associated information of the plug-in to be loaded based on a plug-in loading event; the taskbar manager generates event data corresponding to the plug-in loading event according to the association information, and pushes the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager; the plug-in manager responds to the plug-in loading event pushed by the taskbar manager, and updates a plug-in management configuration file according to event data corresponding to the plug-in loading event; the plug-in manager preloads the plug-in by adopting a dynamic link library loading mechanism according to the plug-in management configuration file; the plug-in manager executes an instantiation operation on the preloaded plug-in to acquire a plug-in instance of the preloaded plug-in; the plug-in manager registers the obtained plug-in instance into a second plug-in list; and the plug-in manager schedules the plug-in operation corresponding to the plug-in instance based on the second plug-in list. According to the method, the plug-in loading operation is pushed to the plug-in manager in the form of an event by the task bar manager, the plug-in is loaded in the form of a dynamic link library by the plug-in manager, the plug-in manager controls the plug-in to operate, the plug-in and the task bar manager are decoupled doubly from the program code and the operation angle, and the independent plug-in manager is created to perform clear and definite configuration, loading, instantiation and life cycle management on the plug-in, so that the plug-in management function is separated from the task bar management function, the complexity and maintenance difficulty of a system are reduced, and the operation stability of the task bar in a desktop operating system is improved.
On the other hand, by setting the plug-in manager in the desktop operating system, the plug-in exists in an independent dynamic link library, and the plug-in manager loads, updates and unloads according to the needs, so that the response speed of the system is faster, and the user experience is optimized. In addition, because the plug-in and the desktop operating system main body are mutually independent, even if the plug-in has a problem, the main body part of the system is not affected, and the safety of the system is improved.
The plug-in manager manages the dependency relationship, the conflict relationship and the like among the plug-ins, executes a plug-in scheduling strategy, enables the plug-ins to operate more orderly and efficiently, and is beneficial to improving the system stability.
Furthermore, by preloading the plug-ins, creating plug-in objects and instantiating the plug-ins, corresponding space is allocated for each plug-in the memory, the loading speed of the plug-ins can be remarkably improved, and the response speed of the system can be improved.
As shown in fig. 3, in an embodiment of the present application, a desktop operating system 30 includes: a taskbar manager 310 and a plugin manager 320.
The taskbar manager 310 is configured to obtain, based on a plug-in loading event, association information of a plug-in to be loaded;
The taskbar manager 310 is further configured to generate event data corresponding to the plug-in loading event according to the association information, and push the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
the plug-in manager 320 is configured to respond to the plug-in loading event pushed by the taskbar manager, and update a plug-in management configuration file according to event data corresponding to the plug-in loading event;
the plug-in manager 320 is further configured to preload a plug-in by using a dynamic link library loading mechanism according to the plug-in management configuration file, perform an instantiation operation on the preloaded plug-in, obtain a plug-in instance of the preloaded plug-in, and register the obtained plug-in instance in a second plug-in list;
the plug-in manager 320 is further configured to schedule, based on the second plug-in list, a plug-in operation corresponding to the plug-in instance.
Optionally, the preset plug-in loading event may be an event triggered by a plug-in loading operation; the association information includes, but is not limited to, one or more of the following: plug-in identification, plug-in configuration information, display information, and behavior information.
Plug-in codes of plug-ins loaded in a desktop operating system disclosed by the embodiment of the application need to be compiled into a dynamic link library. Thus, a plug-in implemented in C or C++ language code may be employed and the program code of the plug-in compiled into a dynamically linked library, i.e., a library file in the so format.
Further, the plug-in needs to be developed in compliance with the software development specification of the desktop operating system, and provides a set of interfaces conforming to the plug-in manager standard, which are the main ways in which the plug-in manager and the plug-in communicate, so that the written plug-in code is loaded, invoked and executed by the plug-in manager in the desktop operating system.
Each plugin needs to provide a plugin configuration file, which needs to contain information such as plugin identification, description, execution mode, parameters, file path, scheduling policy of plugins, dependency list, conflict list, priority and the like. This plug-in profile is to be readable by the plug-in manager and needs to support the update.
The embodiments of the present application are not limited to specific functions, development processes, and the like of the plug-in.
The desktop operating system disclosed in the embodiments of the present application, where the specific implementation of the taskbar manager 310 refers to the prior art, differs from the prior art in that the management of the plugins is decoupled.
The taskbar manager 310 is used to manage the taskbar's own behavior and to manage plug-ins by interfacing with the plug-in manager 320. By means of the system structural design, management and updating of plug-ins can be optimized while basic functions of the taskbar are guaranteed, and overall efficiency and stability of a desktop operating system are improved.
For example, the taskbar manager 310 is used for performing window management, task switch management, system status display and notification, and the like. For another example, the taskbar manager 310 is used to manage the loading, updating, unloading, execution, display of plug-ins, and interactions between plug-ins and users, and between plug-ins and operating systems through the plug-in manager 320.
The taskbar manager 310 obtains the association information of the plug-in to be loaded based on the plug-in loading event, generates event data corresponding to the plug-in loading event according to the association information, and pushes the plug-in loading event and the event data corresponding to the plug-in loading event to the specific implementation manner of the plug-in manager, which is described in the following plug-in operation method embodiments, and is not described herein again.
In order to achieve the above functions, the task bar manager in the prior art needs to be modified as follows:
(1) In the prior art, a plug-in code is directly embedded into a code of a taskbar manager by the taskbar manager, so that logic modification of loading plug-ins is realized as follows: the taskbar manager invokes the interface provided by the plugin manager to load and manage plugins.
(2) The plug-in events are processed serially by the taskbar manager in the prior art, such as loading and processing each plug-in event in turn, and are modified into: by processing plug-in events in parallel by the plug-in manager, more efficient plug-in management is achieved.
(3) Logic in the prior art for calling a plug-in to process user interface operation by a taskbar manager is modified into: logic for invoking plug-ins to handle user interface operations in the plug-in manager is unified.
(4) The task bar manager needs to add a new plug-in processing mechanism, push the plug-in address to the plug-in manager, and the plug-in manager processes the dependency relationship of the plug-in, processes the update of the plug-in, and the like. The taskbar manager only needs to call the corresponding interface provided by the plugin manager.
For example, assuming that the taskbar has a clock plug-in, the clock plug-in may display the current time on the taskbar. This clock plug-in is embedded directly into the taskbar manager prior to retrofitting and is loaded and run directly upon startup of the taskbar manager. When the clock plug-in needs to be updated or has an error, the code of the taskbar manager needs to be modified. After the task bar manager is modified, the clock plug-in becomes an independent dynamic link library file, and has own plug-in configuration file and interface. The user interface operations are no longer directly handled by the taskbar manager but are accomplished by invoking the interface of the plugin manager. In this way, the taskbar manager does not have to care about the updating and error handling of the clock plugin, which is done by the plugin manager. Meanwhile, when the plug-ins are loaded, the taskbar manager can process a plurality of plug-ins simultaneously instead of processing the plug-ins serially in sequence, so that the efficiency is improved.
After the modification, the taskbar manager 310 performs interaction of data and/or control signals with the plugin manager 320 through the shared memory.
For example, pushing the plug-in loading event and event data corresponding to the plug-in loading event to the plug-in manager includes: the taskbar manager stores the plug-in loading event and event data corresponding to the plug-in loading event to the shared memory; and the plug-in manager acquires the plug-in loading event and event data corresponding to the plug-in loading event from the shared memory. Wherein the shared memory is created after the plug-in manager is started.
The taskbar manager 310 is further configured to generate event data of a plug-in running event based on a plug-in identifier of a target plug-in for a plug-in running event of a preset operation type of the target plug-in; and pushing the plug-in running event and event data of the plug-in running event to the plug-in manager;
accordingly, the plug-in manager 320 is configured to control the target plug-in to run based on the plug-in running event, the event data of the plug-in running event, and/or the second plug-in list.
The plugin manager 320 controls the specific implementation manner of the target plugin operation based on the plugin operation event, the event data of the plugin operation event, and/or the second plugin list, which will not be described in detail herein.
The specific implementation of the plug-in manager 320 is further described below in connection with the logical relationship of the taskbar manager 310 and the plug-in manager 320 illustrated in FIG. 4.
As shown in FIG. 4, the taskbar manager 310 and the plugin manager 320 communicate data and signals through an interface. The taskbar manager 310 needs to manage plug-ins displayed in the taskbar, and therefore, needs to acquire, through the taskbar configuration file, the plug-in identification, display information, behavior information and other related information of the plug-ins to be loaded, and push the interfaces provided by the plug-in manager 320 to the plug-in manager 320.
The taskbar manager 310 pushes the corresponding event to the plug-in manager 320 through an interface provided by the plug-in manager 320 based on the event for the plug-in, as well as event data for the corresponding event. As previously described, events responded to by the taskbar manager 310 include, but are not limited to: plug-in loading event, plug-in running event of preset operation type.
In some alternative embodiments, the taskbar manager 310 is also configured to receive signals and/or data returned by the plugin manager 320 via an interface provided by the plugin manager 320 and to perform window operations based on the returned signals and/or data. For example, the taskbar manager 310 receives the plug-in uninstallation result fed back by the plug-in manager 320 and deletes the icon of the corresponding plug-in the taskbar.
The plug-in manager 320 is used as a separate module of the desktop operating system and cooperates with the taskbar manager 310, and needs to develop program codes for implementing various functions of the plug-in manager 320, and the program codes of various functions of the plug-in manager 320 are compiled into executable programs of the desktop operating system, so that after the desktop operating system is started, the plug-in manager 320 can manage plug-ins and control plug-in operations based on events and data called or pushed by the taskbar manager 310.
The specific embodiments of updating the plug-in management configuration file by the plug-in manager 320 according to the event data corresponding to the plug-in loading event in response to the plug-in loading event pushed by the taskbar manager will be described in the following, and will not be described in detail herein.
The plugin manager 320 manages the plugin management configuration file, so that the plugin is preloaded according to the storage address of the dynamic link library file in the plugin management configuration file, and the plugin is scheduled to run according to the configured plugin execution mode, priority, dependency list, conflict list, scheduling policy, conflict processing policy and other data in the plugin running process.
The plug-in manager 320 preloads a plug-in according to the plug-in management configuration file by using a dynamic link library loading mechanism, performs an instantiation operation on the preloaded plug-in, obtains a plug-in instance of the preloaded plug-in, and registers the obtained plug-in instance in a second plug-in list, which is described in detail below, and will not be repeated herein.
During the process that the plug-in manager 320 performs an instantiation operation on the preloaded plug-in to obtain a plug-in instance of the preloaded plug-in, the plug-in manager 320 obtains a reference of the preloaded plug-in and stores the reference to a plug-in registry; and then, the plug-in manager 320 obtains the addresses of interfaces, methods and events of the plug-ins corresponding to each reference according to the references in the plug-in registry, and instantiates plug-in objects according to the addresses of the interfaces, methods and events to obtain plug-in instances of the plug-ins which are preloaded. The plug-in registry stores references to plug-ins by which the interfaces, methods, and addresses of events of the plug-ins can be obtained to run the corresponding plug-ins.
The management engine of the plug-in manager 320 manages plug-in operations in response to events and interface calls pushed by the taskbar manager based on the plug-in registry, the second plug-in list, and the management data in the plug-in management configuration file.
For example, the plug-in manager 320 is configured to schedule, based on the second plug-in list, a plug-in operation corresponding to the plug-in instance.
For another example, the plug-in manager 320 is configured to control the target plug-in operation based on the plug-in operation event, event data of the plug-in operation event, and/or the second plug-in list.
The detailed description of the plug-in manager 320 is described in the following examples, and is not repeated here.
In the desktop operating system in the prior art, the logic of loading the plug-in by the taskbar manager is to directly embed the plug-in code into the code of the taskbar manager, and the installation, updating and unloading of the plug-in are inflexible. In addition, the stability of the plug-in directly influences the stability of task bar execution, and the desktop operating system disclosed by the embodiment of the application is provided with the plug-in manager by improving the system architecture, so that the management task of the plug-in is migrated from the task bar manager to the plug-in manager, plug-in codes and desktop operating system codes are independently developed and compiled, and plug-in codes are dynamically loaded. Correspondingly, for the improvement of the system architecture, a plug-in management flow is redesigned, and an interface is provided by the plug-in manager for the task bar manager to call, so that the task bar manager can manage the plug-ins. Furthermore, the plug-in manager executes corresponding plug-in management operation based on event or interface call pushed by the taskbar manager, and the running state of the plug-in does not influence the execution of the taskbar manager, so that the stability of a desktop operating system is further improved. Meanwhile, plug-in codes are loaded into a desktop operating system through a dynamic link library, are not bound and compiled with a taskbar manager, and are more flexible to install, update and uninstall.
Furthermore, the plug-in manager executes corresponding plug-in management operation based on event or interface call pushed by the taskbar manager, different plug-ins can run in parallel, more efficient plug-in management is realized, and the flexibility of interaction with the plug-ins is improved.
The embodiment of the application also discloses a plug-in running device which is applied to a desktop operating system, wherein the desktop operating system comprises: a taskbar manager and a plugin manager. As shown in fig. 5, the apparatus includes:
the module 510 for obtaining association information of plug-ins to be loaded is configured to obtain association information of plug-ins to be loaded based on a plug-in loading event by the taskbar manager after the taskbar manager and the plug-in manager are started;
the event pushing module 520 is configured to generate event data corresponding to the plug-in loading event according to the association information by using the taskbar manager, and push the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
a plug-in management configuration file updating module 530, configured to update a plug-in management configuration file according to event data corresponding to the plug-in loading event in response to the plug-in loading event pushed by the taskbar manager;
A plug-in preloading module 540, configured to preload a plug-in by the plug-in manager according to the plug-in management configuration file by using a dynamic link library loading mechanism;
a plug-in instance obtaining module 550, configured to perform an instantiation operation on a preloaded plug-in by using the plug-in manager, to obtain a plug-in instance of the preloaded plug-in;
the plug-in instance registration module 560 is configured to register the obtained plug-in instance in the second plug-in list by using the plug-in manager;
and a plug-in running module 570, configured to schedule, by using the plug-in manager, a plug-in running corresponding to the plug-in instance based on the second plug-in list.
Optionally, the plug-in management configuration file includes: the storage position of the dynamic link library file of the plug-in code; the plug-in preloading module 540 is further configured to:
and the plug-in manager executes a preset dynamic link library loading instruction based on the storage position of the dynamic link library file of the plug-in code of the plug-in, and loads the dynamic link library file into the memory of the desktop operating system.
Optionally, the plug-in management configuration file further includes: the plug-in manager executes a preset dynamic link library loading instruction based on the storage position of a dynamic link library file of plug-in code of the plug-in, and loads the dynamic link library file into a memory of the desktop operating system, including:
The plug-in manager initializes a first plug-in list of plug-ins to be preloaded according to the plug-in management configuration file;
the plug-in manager checks whether the dynamic link library file corresponding to each plug-in the first plug-in list exists or not, and checks whether the dependency library of each plug-in the first plug-in list is correctly linked or not according to the dependency relationship to obtain a checking result;
responding to the checking result to indicate that the dynamic link library file corresponding to the plug-in exists and the dependency library of the plug-in is correctly linked, and executing a preset dynamic link library loading instruction by the plug-in manager based on the storage position of the dynamic link library file of the plug-in code of the plug-in, and loading the dynamic link library file into the memory of the desktop operating system;
and the plug-in manager removes the information of the plug-in from the first plug-in list in response to the checking result indicating that the dynamic link library file corresponding to the plug-in does not exist or that the dependent library of the plug-in is not correctly linked.
Optionally, the plug-in instance obtaining module 550 is further configured to:
the plug-in manager obtains the reference of the preloaded plug-in and stores the reference to a plug-in registry;
And the plug-in manager respectively acquires the addresses of interfaces, methods and events of the plug-ins corresponding to each reference according to the references in the plug-in registry, and instantiates plug-in objects according to the addresses of the interfaces, the methods and the events to obtain plug-in instances of the preloaded plug-ins.
Optionally, after the taskbar manager and the plugin manager are started, the apparatus further includes:
a shared memory creation module (not shown) for creating a shared memory by the plug-in manager;
the pushing the plug-in loading event and event data corresponding to the plug-in loading event to the plug-in manager includes:
the taskbar manager stores the plug-in loading event and event data corresponding to the plug-in loading event to the shared memory;
and the plug-in manager acquires the plug-in loading event and event data corresponding to the plug-in loading event from the shared memory.
Optionally, the plug-in running module 570 is further configured to:
the plug-in manager traverses the second plug-in list to respectively acquire conflict lists of the plug-ins corresponding to the current plug-in instance in the plug-in management configuration file;
The plug-in manager checks whether plug-in instances of plug-ins in the conflict list are included in the second plug-in list;
responding to the plug-in instances of the plug-ins in the conflict list to be included in the second plug-in list, and scheduling the plug-ins corresponding to the current plug-in instance to run according to the conflict processing strategy of the plug-ins corresponding to the current plug-in instance in the plug-in management configuration file by the plug-in manager;
and responding to the fact that the plug-in instance of the plug-in the conflict list is not included in the second plug-in list, and scheduling the plug-in corresponding to the current plug-in instance to operate according to a scheduling strategy of the plug-in corresponding to the current plug-in instance in the plug-in management configuration file by the plug-in manager.
Optionally, after the taskbar manager and the plugin manager are started, as shown in fig. 6, the apparatus further includes:
a plug-in running event pushing module 580, configured to generate event data of a plug-in running event based on a plug-in identifier of a target plug-in for a plug-in running event of a preset operation type of the target plug-in by using the taskbar manager;
the plug-in running event pushing module 580 is further configured to push, by the taskbar manager, the plug-in running event and event data of the plug-in running event to the plug-in manager;
And the plug-in running control module 590 is configured to control the plug-in manager to run the target plug-in based on the plug-in running event, event data of the plug-in running event, and/or the second plug-in list.
Optionally, the plug-in manager controls the target plug-in to run based on the plug-in running event, event data of the plug-in running event, and/or the second plug-in list, including:
responding to the plug-in running event to match a plug-in unloading operation type, closing the target plug-in by the plug-in manager, unloading a dynamic link library file of the target plug-in, and cleaning management data of the target plug-in the plug-in manager;
responding to the plug-in operation event to match a plug-in updating operation type, and updating a dynamic link library file of the target plug-in by the plug-in manager and updating management data of the target plug-in the plug-in manager based on the updated dynamic link library file;
and responding to the plug-in running event matching interaction behavior operation type, and calling an interface corresponding to the target plug-in and the plug-in behavior event by the plug-in manager based on the event data of the plug-in running event and the plug-in instance in the second plug-in list to control the target plug-in to run.
The plug-in operation device disclosed in the embodiment of the present application is used to implement the plug-in operation method described in the embodiment of the present application, and specific implementation manners of each module of the device are not repeated, and reference may be made to specific implementation manners of corresponding steps in the method embodiment.
According to the plug-in operation device disclosed by the embodiment of the application, the plug-in manager is added in the desktop operation system, and the plug-in operation is controlled in cooperation with the taskbar manager. Specifically, after the task bar manager and the plug-in manager are started, the task bar manager acquires the associated information of the plug-in to be loaded based on a plug-in loading event; the taskbar manager generates event data corresponding to the plug-in loading event according to the association information, and pushes the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager; the plug-in manager responds to the plug-in loading event pushed by the taskbar manager, and updates a plug-in management configuration file according to event data corresponding to the plug-in loading event; the plug-in manager preloads the plug-in by adopting a dynamic link library loading mechanism according to the plug-in management configuration file; the plug-in manager executes an instantiation operation on the preloaded plug-in to acquire a plug-in instance of the preloaded plug-in; the plug-in manager registers the obtained plug-in instance into a second plug-in list; and the plug-in manager schedules the plug-in operation corresponding to the plug-in instance based on the second plug-in list. The device pushes the plug-in loading operation to the plug-in manager in the form of an event by the task bar manager, loads the plug-in the form of a dynamic link library by the plug-in manager, controls the plug-in to operate by the plug-in manager, and double decouples the plug-in from the task bar manager from the aspects of program codes and operation.
On the other hand, by setting the plug-in manager in the desktop operating system, the plug-in exists in an independent dynamic link library, and the plug-in manager loads, updates and unloads according to the needs, so that the response speed of the system is faster, and the user experience is optimized. In addition, because the plug-in and the desktop operating system main body are mutually independent, even if the plug-in has a problem, the main body part of the system is not affected, and the safety of the system is improved.
The plug-in manager manages the dependency relationship, the conflict relationship and the like among the plug-ins, executes a plug-in scheduling strategy, enables the plug-ins to operate more orderly and efficiently, and is beneficial to improving the system stability.
Furthermore, by preloading the plug-ins, creating plug-in objects and instantiating the plug-ins, corresponding space is allocated for each plug-in the memory, the loading speed of the plug-ins can be remarkably improved, and the response speed of the system can be improved.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The foregoing has described in detail a method and apparatus for plug-in operation provided herein, and specific examples have been applied herein to illustrate the principles and embodiments of the present application, where the foregoing examples are provided to assist in understanding the method and core idea of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in an electronic device according to embodiments of the present application may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present application may also be embodied as an apparatus or device program (e.g., computer program and computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
For example, fig. 7 shows an electronic device in which methods according to the present application may be implemented. The electronic device may be a PC, a mobile terminal, a personal digital assistant, a tablet computer, etc. The electronic device conventionally comprises a processor 710 and a memory 720 and a program code 730 stored on said memory 720 and executable on the processor 710, said processor 710 implementing the method described in the above embodiments when said program code 730 is executed. The memory 720 may be a computer program product or a computer readable medium. The memory 720 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 720 has a memory space 7201 for program code 730 of a computer program for performing any of the method steps described above. For example, the memory space 7201 for the program code 730 may include individual computer programs for implementing the various steps in the above methods, respectively. The program code 730 is computer readable code. These computer programs may be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. The computer program comprises computer readable code which, when run on an electronic device, causes the electronic device to perform a method according to the above-described embodiments.
The embodiment of the application also discloses a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the plug-in running method according to the embodiment of the application.
Such a computer program product may be a computer readable storage medium, which may have memory segments, memory spaces, etc. arranged similarly to the memory 720 in the electronic device shown in fig. 7. The program code may be stored in the computer readable storage medium, for example, in a suitable form. The computer readable storage medium is typically a portable or fixed storage unit as described with reference to fig. 8. In general, the memory unit comprises computer readable code 730', which computer readable code 730' is code that is read by a processor, which code, when executed by the processor, implements the steps of the method described above.
Reference herein to "one embodiment," "an embodiment," or "one or more embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Furthermore, it is noted that the word examples "in one embodiment" herein do not necessarily all refer to the same embodiment.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (12)

1. A plug-in running method is applied to a desktop operating system, and is characterized in that the desktop operating system comprises: a taskbar manager and a plugin manager, the method comprising:
after the task bar manager and the plug-in manager are started, the task bar manager acquires the associated information of the plug-in to be loaded based on a plug-in loading event;
the taskbar manager generates event data corresponding to the plug-in loading event according to the association information, and pushes the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
the plug-in manager responds to the plug-in loading event pushed by the taskbar manager, and updates a plug-in management configuration file according to event data corresponding to the plug-in loading event;
the plug-in manager preloads the plug-in by adopting a dynamic link library loading mechanism according to the plug-in management configuration file;
the plug-in manager executes an instantiation operation on the preloaded plug-in to acquire a plug-in instance of the preloaded plug-in;
the plug-in manager registers the obtained plug-in instance into a second plug-in list;
And the plug-in manager schedules the plug-in operation corresponding to the plug-in instance based on the second plug-in list.
2. The method according to claim 1, wherein the plug-in management configuration file includes: the storage position of the dynamic link library file of the plug-in code;
the plug-in manager preloads the plug-in by adopting a dynamic link library loading mechanism according to the plug-in management configuration file, and the method comprises the following steps:
and the plug-in manager executes a preset dynamic link library loading instruction based on the storage position of the dynamic link library file of the plug-in code of the plug-in, and loads the dynamic link library file into the memory of the desktop operating system.
3. The method according to claim 2, wherein the plug-in management configuration file further comprises: dependency of plug-ins;
the plug-in manager executes a preset dynamic link library loading instruction based on the storage position of the dynamic link library file of the plug-in code of the plug-in, and loads the dynamic link library file into the memory of the desktop operating system, and the method comprises the following steps:
the plug-in manager initializes a first plug-in list of plug-ins to be preloaded according to the plug-in management configuration file;
The plug-in manager checks whether the dynamic link library file corresponding to each plug-in the first plug-in list exists or not, and checks whether the dependency library of each plug-in the first plug-in list is correctly linked or not according to the dependency relationship to obtain a checking result;
responding to the checking result to indicate that the dynamic link library file corresponding to the plug-in exists and the dependency library of the plug-in is correctly linked, and executing a preset dynamic link library loading instruction by the plug-in manager based on the storage position of the dynamic link library file of the plug-in code of the plug-in, and loading the dynamic link library file into the memory of the desktop operating system;
and the plug-in manager removes the information of the plug-in from the first plug-in list in response to the checking result indicating that the dynamic link library file corresponding to the plug-in does not exist or that the dependent library of the plug-in is not correctly linked.
4. The method of claim 1, wherein the plug-in manager performs an instantiation operation on a preloaded plug-in, obtaining a plug-in instance of the preloaded plug-in, comprising:
the plug-in manager obtains the reference of the preloaded plug-in and stores the reference to a plug-in registry;
And the plug-in manager respectively acquires the addresses of interfaces, methods and events of the plug-ins corresponding to each reference according to the references in the plug-in registry, and instantiates plug-in objects according to the addresses of the interfaces, the methods and the events to obtain plug-in instances of the preloaded plug-ins.
5. The method of claim 1, further comprising, after the taskbar manager and the plugin manager are started:
the plug-in manager creates a shared memory;
the pushing the plug-in loading event and event data corresponding to the plug-in loading event to the plug-in manager includes:
the taskbar manager stores the plug-in loading event and event data corresponding to the plug-in loading event to the shared memory;
and the plug-in manager acquires the plug-in loading event and event data corresponding to the plug-in loading event from the shared memory.
6. The method of claim 1, wherein the plug-in manager schedules plug-ins corresponding to the plug-in instances to run based on the second plug-in list, comprising:
the plug-in manager traverses the second plug-in list to respectively acquire conflict lists of the plug-ins corresponding to the current plug-in instance in the plug-in management configuration file;
The plug-in manager checks whether plug-in instances of plug-ins in the conflict list are included in the second plug-in list;
responding to the plug-in instances of the plug-ins in the conflict list to be included in the second plug-in list, and scheduling the plug-ins corresponding to the current plug-in instance to run according to the conflict processing strategy of the plug-ins corresponding to the current plug-in instance in the plug-in management configuration file by the plug-in manager;
and responding to the fact that the plug-in instance of the plug-in the conflict list is not included in the second plug-in list, and scheduling the plug-in corresponding to the current plug-in instance to operate according to a scheduling strategy of the plug-in corresponding to the current plug-in instance in the plug-in management configuration file by the plug-in manager.
7. The method of claim 1, wherein after the taskbar manager and the plugin manager are started, the method further comprises:
the taskbar manager generates event data of a plug-in operation event based on a plug-in identifier of a target plug-in aiming at the plug-in operation event of a preset operation type of the target plug-in;
the taskbar manager pushes the plug-in running event and event data of the plug-in running event to the plug-in manager;
The plug-in manager controls the target plug-in to run based on the plug-in running event, event data of the plug-in running event, and/or the second plug-in list.
8. The method of claim 7, wherein the plug-in manager controls the target plug-in operation based on the plug-in operation event, event data of the plug-in operation event, and/or the second plug-in list, comprising:
responding to the plug-in running event to match a plug-in unloading operation type, closing the target plug-in by the plug-in manager, unloading a dynamic link library file of the target plug-in, and cleaning management data of the target plug-in the plug-in manager;
responding to the plug-in operation event to match a plug-in updating operation type, and updating a dynamic link library file of the target plug-in by the plug-in manager and updating management data of the target plug-in the plug-in manager based on the updated dynamic link library file;
and responding to the plug-in running event matching interaction behavior operation type, and calling an interface corresponding to the target plug-in and the plug-in behavior event by the plug-in manager based on the event data of the plug-in running event and the plug-in instance in the second plug-in list to control the target plug-in to run.
9. A plug-in running device applied to a desktop operating system, wherein the desktop operating system comprises: a taskbar manager and a plugin manager, the apparatus comprising:
the associated information acquisition module is used for acquiring the associated information of the plug-in to be loaded based on a plug-in loading event after the task bar manager and the plug-in manager are started;
the event pushing module is used for generating event data corresponding to the plug-in loading event according to the association information by the taskbar manager and pushing the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
the plug-in management configuration file updating module is used for responding to the plug-in loading event pushed by the taskbar manager by the plug-in manager and updating a plug-in management configuration file according to event data corresponding to the plug-in loading event;
the plug-in preloading module is used for preloading the plug-in by the plug-in manager according to the plug-in management configuration file by adopting a dynamic link library loading mechanism;
the plug-in instance acquisition module is used for executing an instantiation operation on the preloaded plug-in by the plug-in manager to acquire the plug-in instance of the preloaded plug-in;
The plug-in instance registration module is used for registering the acquired plug-in instance in the second plug-in list by the plug-in manager;
and the plug-in running module is used for scheduling the plug-in running corresponding to the plug-in instance by the plug-in manager based on the second plug-in list.
10. A desktop operating system, comprising: a taskbar manager and a plugin manager, wherein,
the task bar manager is used for acquiring the associated information of the plug-in to be loaded based on the plug-in loading event;
the taskbar manager is further configured to generate event data corresponding to the plug-in loading event according to the association information, and push the plug-in loading event and the event data corresponding to the plug-in loading event to the plug-in manager;
the plug-in manager is used for responding to the plug-in loading event pushed by the taskbar manager and updating a plug-in management configuration file according to event data corresponding to the plug-in loading event;
the plug-in manager is further configured to preload a plug-in by using a dynamic link library loading mechanism according to the plug-in management configuration file, execute an instantiation operation on the preloaded plug-in, acquire a plug-in instance of the preloaded plug-in, and register the acquired plug-in instance in a second plug-in list;
The plug-in manager is further configured to schedule, based on the second plug-in list, a plug-in operation corresponding to the plug-in instance.
11. An electronic device comprising a memory, a processor and program code stored on the memory and executable on the processor, wherein the processor implements the plug-in operation method of any one of claims 1 to 8 when the program code is executed by the processor.
12. A computer readable storage medium having stored thereon program code, which when executed by a processor realizes the steps of the plug-in operation method according to any of claims 1 to 8.
CN202311309708.0A 2023-10-10 2023-10-10 Plug-in operation method and device, desktop operating system and electronic equipment Pending CN117472462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311309708.0A CN117472462A (en) 2023-10-10 2023-10-10 Plug-in operation method and device, desktop operating system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311309708.0A CN117472462A (en) 2023-10-10 2023-10-10 Plug-in operation method and device, desktop operating system and electronic equipment

Publications (1)

Publication Number Publication Date
CN117472462A true CN117472462A (en) 2024-01-30

Family

ID=89635549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311309708.0A Pending CN117472462A (en) 2023-10-10 2023-10-10 Plug-in operation method and device, desktop operating system and electronic equipment

Country Status (1)

Country Link
CN (1) CN117472462A (en)

Similar Documents

Publication Publication Date Title
US11853774B2 (en) Dynamically loaded plugin architecture
US8286154B2 (en) Apparatus and method for live loading of version upgrades in a process control environment
KR101963912B1 (en) Application compatibility with library operating systems
US7774636B2 (en) Method and system for kernel panic recovery
US7900202B2 (en) Identification of software execution data
CN104603750A (en) Layout and execution of software applications using BPRAM
KR20130140777A (en) System reset
CN104583948A (en) Layout and execution of operating systems using BPRAM
CN111989656A (en) Configurable recovery state
US20220326927A1 (en) Abort installation of firmware bundles
US10552135B1 (en) Reducing a size of an application package
Duell et al. Requirements for linux checkpoint/restart
US20070113051A1 (en) Apparatus and method for live loading of control applications in a process control environment
CN117472462A (en) Plug-in operation method and device, desktop operating system and electronic equipment
CN108563320B (en) Processing method and processing system
KR101083090B1 (en) Mobile terminal with mobile platform comprising structure of functional modularization, method for driving the mobile platform and managing idle application
EP4102357A1 (en) Development environment organizer with enhanced state switching and sharing
US10185574B2 (en) Live imaging of a device
TWI549056B (en) Application compatibility with library operating systems
CN112667413A (en) Access control method and system of business rule engine and readable storage medium
CN117707543A (en) Application installation package manufacturing and installation method, computing device and storage medium
CN117472509A (en) Non-containerized application management method based on Kubernetes cluster equipment
CN113656057A (en) JAVA file updating method, network equipment and storage medium
Lewandowski Maintaining Node Symmetry In a Networked Windows NT Environment

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