Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Dynamic component loading method and system based on plug-in mechanism

A dynamic loading and component technology, applied in the direction of program loading/starting, program control devices, etc., can solve the problems of memory consumption, heavy maintenance workload of middleware or application software, and limitation of general-purpose software, and achieve the effect of improving versatility

Inactive Publication Date: 2015-03-18
INST OF ACOUSTICS CHINESE ACAD OF SCI +1
View PDF3 Cites 41 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In an embedded system, there are many business forms of the system. The functions of middleware or application programs are different in different forms, and the components to be loaded are also different. In the prior art, components must be linked when compiling, so for the same middleware Or application programs, it is necessary to link different components for each business form of the system and generate different versions. Using this method makes the subsequent software maintenance workload of middleware or application programs heavy
In addition, embedded systems have very limited hardware resources including memory. After compiling and linking the component library, all components are loaded when the application starts, which consumes memory unnecessarily.
[0003] The existing dynamic loading component processes are all private, and they all realize the search of the component library and the call of the component library method by defining some private function interfaces. This method limits its generality, and the encapsulated interface is only for a specific The component library is valid, but it has no effect on other component libraries

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dynamic component loading method and system based on plug-in mechanism
  • Dynamic component loading method and system based on plug-in mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0065] Embodiments of the present invention include the following steps:

[0066] Step 1, configure a "MIME Type" that can uniquely identify its identity for each component.

[0067] Step 2: When the application program or other components receive the instruction to call the corresponding functions of other components, they search for the components by traversing the feature interfaces of the component libraries in the specified directory in the system; the order of the traversal means is not limited.

[0068] Step 3, if the component exists, load the component into the memory, obtain the component instance, and call the plug-in standard NPAPI interface of the encapsulated component;

[0069] Step 4, when exiting the corresponding function module, unload the component and release the memory.

[0070] Among them, the "MIME Type" that uniquely identifies the identity of the component can use the following methods:

[0071] Set the "MIME Type" that uniquely identifies the compo...

Embodiment 2

[0074] The method of the embodiment of the present invention is further elaborated below through a preferred embodiment:

[0075] figure 1 It is a schematic flow diagram of the embedded browser dynamically searching and loading components in the embodiment of the present invention. Take the embedded browser as the specific application program. The current webpage has become the mainstream portal navigation in the embedded system due to its cross-platform and easy deployment features. The embedded browser is the core of parsing the webpage. Different business systems have different requirements and need to load the functions of different components. For example, for dual-mode The set-top box needs to use the DVB component library, but the Internet set-top box does not need the DVB component library. Through the method of the embodiment of the present invention, the embedded browser can dynamically discover and load local functional components without compiling different versi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a dynamic component loading method and system based on a plug-in mechanism. The method comprises the following steps that after an application program or component receives instructions requiring the calling of corresponding functions in other components, the other components are found, the other components provide a standard plug-in interface, and the unique MIME type for identifying the identity is realized; after the components are found, the components are loaded into a memory, an interface for creating the component instance is obtained, and the corresponding function interface of the components is called; when the corresponding functions are not needed, a component unloading interface is called, and the other components are unloaded. The interface adopted in the embodiment of the invention is a standard plug-in interface, the assembly is not linked during the compiling, unnecessary components are not loaded during the application program starting, the memory is saved, and the generation of application programs in different versions by aiming at embedded systems in different service forms is avoided.

Description

technical field [0001] The invention relates to the technical field of computer application program discovery and component loading, in particular to a method and system for dynamically loading components based on a plug-in mechanism. Background technique [0002] Currently, component technology is widely used in embedded systems. In an embedded system, there are many business forms of the system. The functions of middleware or application programs are different in different forms, and the components to be loaded are also different. In the prior art, components must be linked when compiling, so for the same middleware Or application programs, it is necessary to link different components for each business form of the system and generate different versions. Using this method makes the subsequent software maintenance workload of middleware or application programs heavy. In addition, embedded systems have very limited hardware resources including memory. After compiling and lin...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/445
Inventor 胡琳琳娄丙允张武郭志川
Owner INST OF ACOUSTICS CHINESE ACAD OF SCI
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More