CN105893094A - Achieving method and device for application program plug-in - Google Patents
Achieving method and device for application program plug-in Download PDFInfo
- Publication number
- CN105893094A CN105893094A CN201610201697.8A CN201610201697A CN105893094A CN 105893094 A CN105893094 A CN 105893094A CN 201610201697 A CN201610201697 A CN 201610201697A CN 105893094 A CN105893094 A CN 105893094A
- Authority
- CN
- China
- Prior art keywords
- library file
- feature card
- dynamic library
- interface
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides an achieving method and device for an application program plug-in. The achieving method of the application program plug-in comprises the steps of obtaining a dynamic library file corresponding to a function plug-in of an application program is obtained, wherein the dynamic library file comprises an interface file between a predefined function plug-in and the application program; loading the dynamic library file into a memory, and obtaining the interface file from the dynamic library file; according to the function plug-in loaded on the interface file, achieving two-way data communication between the application program and the function plug-in; sending a path of the memory of the function plug-in to the function plug-in, so that the function plug-in can automatically load plug-in resources according to the path of the memory. The method can achieve the application program plug-in, so that the size of an APP package can be decreased, the function plug-in can be dynamically updated, and a user does not need to update the whole APP package.
Description
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of application plug implementation method and
Device.
Background technology
Along with the development of development of Mobile Internet technology, the use of mobile device is very common.User can move
Set up applications (APP) on equipment, to meet the various demand of user.
In correlation technique, when generating APP, it is usually and code and the resource of module is packaged into static library,
Being loaded in APP engineering and be compiled, be ultimately linked in APP bag, code and the resource of all modules are equal
It is included in APP bag.
But, there are the following problems for above-mentioned technology: (1) increases along with functional module, and APP bag is integrated
Static library is the most, and APP bag size will be along with increase, eventually even probably due to wrap excessive and cannot pass through to move
The examination & verification of dynamic device systems (such as iOS system) company;(2) functional module cannot be carried out code dynamically the most more
Newly, user is needed to update whole APP bag.
Summary of the invention
It is contemplated that one of technical problem solved the most to a certain extent in correlation technique.
To this end, it is an object of the present invention to propose the implementation method of a kind of application plug, the party
Method can realize the plug-in unit of application program, such that it is able to reduce the size of APP bag, and can be to function
Plug-in unit dynamically updates, it is not necessary to allow user update whole APP bag.
Further object is that a kind of application plug of proposition realizes device.
For reaching above-mentioned purpose, the realization side of the application plug that first aspect present invention embodiment proposes
Method, including: obtain the dynamic library file that the feature card of application program is corresponding, described dynamic library file wraps
Containing the interface document between predefined feature card and application program;In described dynamic library file is loaded into
In depositing, and from described dynamic library file, obtain interface document;Load described according to described interface document
Feature card, and realize the bidirectional data communication between described application program and described feature card;Will
The internal memory path of described feature card is sent to described feature card, so that described feature card is according to described interior
Deposit path bootstrap loading plug-in resource.
The implementation method of the application plug that first aspect present invention embodiment proposes, dynamic by loading
State library file, can load feature card according to dynamic library file, ensure application program and feature card
Between bidirectional data communication, and realize feature card bootstrap loading plug-in resource, can be at application program
Dynamic loading function plug-in unit during operation, thus realize the plug-in unit of application program, when application program uses
After plug-in unitization management, it is possible to reduce the size of APP bag, and feature card dynamically can be updated,
Without allowing user update whole APP bag.
For reaching above-mentioned purpose, the realization dress of the application plug that second aspect present invention embodiment proposes
Put, including: the first acquisition module, for obtaining the dynamic library file that the feature card of application program is corresponding,
Described dynamic library file comprises the interface document between predefined feature card and application program;Second obtains
Delivery block, for being loaded in internal memory by described dynamic library file, and obtains from described dynamic library file
Interface document;Load-on module, for loading described feature card according to described interface document, and realizes
Bidirectional data communication between described application program and described feature card;Sending module, for by institute
The internal memory path stating feature card is sent to described feature card, so that described feature card is according to described internal memory
Path bootstrap loading plug-in resource.
The application plug that second aspect present invention embodiment proposes realize device, dynamic by loading
State library file, can load feature card according to dynamic library file, ensure application program and feature card
Between bidirectional data communication, and realize feature card bootstrap loading plug-in resource, can be at application program
Dynamic loading function plug-in unit during operation, thus realize the plug-in unit of application program, when application program uses
After plug-in unitization management, it is possible to reduce the size of APP bag, and feature card dynamically can be updated,
Without allowing user update whole APP bag.
Aspect and advantage that the present invention adds will part be given in the following description, and part will be retouched from following
Become obvious in stating, or recognized by the practice of the present invention.
Accompanying drawing explanation
Present invention aspect that is above-mentioned and/or that add and advantage are from the following description of the accompanying drawings of embodiments
Will be apparent from easy to understand, wherein:
Fig. 1 is that the flow process of the implementation method of the application plug that one embodiment of the invention proposes is shown
It is intended to;
Fig. 2 is that the flow process of the implementation method of the application plug that another embodiment of the present invention proposes is shown
It is intended to;
Fig. 3 is the structural representation realizing device of the application plug that one embodiment of the invention proposes
Figure;
Fig. 4 is the structural representation realizing device of the application plug that one embodiment of the invention proposes
Figure.
Detailed description of the invention
Embodiments of the invention are described below in detail, and the example of described embodiment is shown in the drawings, wherein certainly
Begin to same or similar label eventually represent same or similar module or there is the mould of same or like function
Block.The embodiment described below with reference to accompanying drawing is exemplary, is only used for explaining the present invention, and can not
It is interpreted as limitation of the present invention.On the contrary, embodiments of the invention include falling into attached claims
All changes, amendment and equivalent in the range of spirit and intension.
Fig. 1 is that the flow process of the implementation method of the application plug that one embodiment of the invention proposes is shown
It is intended to.
Seeing Fig. 1, the method for the present embodiment includes:
S11: obtain the dynamic library file that the feature card of application program is corresponding, in described dynamic library file
Comprise the interface document between predefined feature card and application program.
In the embodiment of the present invention, it is as a example by the application program being applied to iOS system by application program.
When developing application program, at least part of functional module independently can be developed, and with
The form of plug-in unit is dynamically loaded in APP.The functional module of these stand-alone developments is properly termed as function and inserts
Part.
In iOS system, the file of representation function plug-in unit is referred to as dynamic base (framework) file,
Framework file contains code and resource file.
When developing APP, can with the communication protocol interface between defined function plug-in unit and APP (referred to as
Interface), and interface document definition obtained is saved in dynamic library file.
Wherein, APP, when needs load feature card, can obtain above-mentioned dynamic library text from this locality
Part, or, it is also possible to obtain above-mentioned dynamic library file from service end.Concrete, generating dynamically
During library file, version can be identified, when this locality exists the dynamic library file needing version, from this locality
Obtain above-mentioned dynamic library file, if there is not the dynamic library file needing version in this locality, then from
Service end obtains dynamic library file.
Further, version is needed can to specifically refer to latest edition.Latest edition is generated developer
After this dynamic library file, the dynamic library file of latest edition can be saved in service end.
S12: described dynamic library file is loaded in internal memory, and obtain from described dynamic library file and connect
Mouth file.
After getting above-mentioned dynamic library file, it is possible to use the NSBundle load mechanism in OC
Dynamic library file is loaded in internal memory.
After dynamic library file is loaded into internal memory, this dynamic library file can be resolved, therefrom obtain and connect
Mouth file.
S13: load described feature card according to described interface document, and realize described application program and institute
State the bidirectional data communication between feature card.
Wherein it is possible to obtain interface name from interface document, this interface name is a character string.
Afterwards, reflex mechanism can be used, utilize interface name dynamically to generate interface class, and in fact
Example, obtains interface instance object.
Wherein, reflex mechanism refers to that JAVA reflex mechanism, JAVA reflex mechanism are in running status,
For any one class, all properties and the method for this class can be known;Right for any one
As, its any one method and attribute can be called;The information of this dynamic acquisition and dynamically
The function of the method calling object is referred to as JAVA reflex mechanism.
After obtaining interface instance object, it is possible to use interface instance object uses selector mode dynamic
The method calling APP and feature card interface, it is achieved the loading of feature card.
Selector is the name performed for system of selection in an object, or when source generation
It is used for replacing unique sign of name when code compiling.Selector oneself can not do anything.
It simply denotes a method.Selector method name is made to be different from general character string only
The thing of one is that compiler determines that selectors is unique.Make selector usefully (with
Combine during operation) it plays and is similar to a kinematic function pointer, for one given with name
Word, automatically points to the realization of the method being suitable for that class is used.
When realizing the bidirectional data communication between APP and feature card, trust mechanism can be used,
During above-mentioned employing selector mode call method, object is entrusted in transmission and return, it is achieved APP and plug-in unit
Between bidirectional data communication.Entrust the class object that object interacts in referring to APP with feature card.
Entrusting mechanism (Delegate) is a kind of agreement in iOS system, by the side of@protocol
Formula realizes, it is possible to trust is helped the thing self completing to specify by other people.
S14: the internal memory path of described feature card is sent to described feature card, so that described function is inserted
Part is according to described internal memory path bootstrap loading plug-in resource.
Wherein, the internal memory path of feature card is the internal memory path of dynamic library file, and this internal memory path can
To preassign.
After loading feature card, APP can utilize trust mechanism, by the internal memory of feature card
(bundle) path is sent to feature card, due to when feature card runs need plug-in resource all
It is saved in the internal memory that internal memory path is corresponding, therefore, after feature card gets internal memory path, permissible
From corresponding internal memory, plug-in resource is obtained, it is achieved the bootstrap loading of plug-in resource according to this internal memory path,
The successful operation of assurance function plug-in unit.
In the present embodiment, by loading dynamic library file, function can be loaded according to dynamic library file and insert
Part, the bidirectional data communication ensured between application program and feature card, and realize feature card from adding
Carry plug-in resource, can when application program runs dynamic loading function plug-in unit, thus realize application journey
The plug-in unit of sequence, after application program uses plug-in unitization management, it is possible to reduce the size of APP bag, and
Feature card dynamically can be updated, it is not necessary to allow user update whole APP bag.
Fig. 2 is that the flow process of the implementation method of the application plug that another embodiment of the present invention proposes is shown
It is intended to.
Seeing Fig. 2, the method for the present embodiment includes:
S201: the communication protocol interface between definition APP and feature card, generates interface document.
Wherein, when developing APP, this interface can be defined by developer, generate corresponding interface document
(.h file).
S202: create the dynamic library file comprising interface document, and identify version.
Wherein it is possible to create dynamic base (framework) engineering in XCode, by connecing of above-mentioned generation
Mouth file is included in dynamic base engineering, and carries out the functional development of plug-in unit in dynamic base engineering, generates dynamic
State library file, and identify version.
S203: compression dynamic library file is also saved in service end.
Such as, dynamic library file is compressed into .zip form.
S204:APP, when needs load feature card, carries out version match.
Such as, APP determines the version of the dynamic library file of the needs that the feature card needing to load is corresponding, and
The version of the dynamic library file corresponding with this locally stored feature card compares.
S205:APP judges whether locally stored dynamic library file is latest edition, if so, performs S207,
Otherwise perform S206.
S206: the dynamic library file after service end downloads compression, and unzip in the catalogue of APP.
Wherein, after determining the dynamic library file needing version, the dynamic of respective version can be downloaded from service end
State library file.
S207: utilize the NSBundle load mechanism in OC to be loaded in internal memory by dynamic library file.
Such as, there is the dynamic library file of latest edition in this locality, or, download from service end and solve
After being pressed onto in the catalogue of APP, the dynamic library text of latest edition can be obtained from local APP catalogue
Part, and use above-mentioned mechanism to be loaded in internal memory.
S208: use reflex mechanism, utilize interface name dynamically to generate interface class, and to the example,
Obtain interface instance object.
S209: utilize interface instance object to use selector mode dynamic call APP and feature card
The method of interface, it is achieved the loading of feature card.
S210: use and entrust mechanism, passes when the method for above-mentioned employing selector mode calling interface
Pass and return trust object, it is achieved the bidirectional data communication between APP and plug-in unit.
S211: utilize and entrust mechanism, internal memory (bundle) path of feature card is sent to function
Plug-in unit, it is achieved the resource bootstrap loading of feature card.
In the present embodiment, by by after APP plug-in unit, can be by least part of functional module of APP
Independently develop, and be dynamically loaded in APP with the form of plug-in unit, it is achieved between APP and plug-in unit
Degree of depth decoupling on from function to resource, and realize the dynamic renewal of plug-in unit, greatly reduce APP
The size of bag, meanwhile, can dynamically update function again, and without allowing user update APP, carry
Rise Consumer's Experience.
Fig. 3 is the structural representation realizing device of the application plug that one embodiment of the invention proposes
Figure.Seeing Fig. 3, this device 30 includes: first acquisition module the 31, second acquisition module 32, loading mould
Block 33 and sending module 34.
First acquisition module 31 is for dynamic library file corresponding to the feature card obtaining application program, described
Dynamic library file comprises the interface document between predefined feature card and application program.
In the embodiment of the present invention, it is as a example by the application program being applied to iOS system by application program.
When developing application program, at least part of functional module independently can be developed, and with
The form of plug-in unit is dynamically loaded in APP.The functional module of these stand-alone developments is properly termed as function and inserts
Part.
In iOS system, the file of representation function plug-in unit is referred to as dynamic base (framework) file,
Framework file contains code and resource file.
When developing APP, can with the communication protocol interface between defined function plug-in unit and APP (referred to as
Interface), and interface document definition obtained is saved in dynamic library file.
Wherein, APP, when needs load feature card, can obtain above-mentioned dynamic library text from this locality
Part, or, it is also possible to obtain above-mentioned dynamic library file from service end.Concrete, generating dynamically
During library file, version can be identified, when this locality exists the dynamic library file needing version, from this locality
Obtain above-mentioned dynamic library file, if there is not the dynamic library file needing version in this locality, then from
Service end obtains dynamic library file.
Further, version is needed can to specifically refer to latest edition.Latest edition is generated developer
After this dynamic library file, the dynamic library file of latest edition can be saved in service end.
Second acquisition module 32 is used for being loaded in internal memory described dynamic library file, and from described dynamic base
File obtains interface document.
After getting above-mentioned dynamic library file, it is possible to use the NSBundle load mechanism in OC
Dynamic library file is loaded in internal memory.
After dynamic library file is loaded into internal memory, this dynamic library file can be resolved, therefrom obtain and connect
Mouth file.
Load-on module 33 is for loading described feature card according to described interface document, and realizes described answering
With the bidirectional data communication between program and described feature card.
Wherein it is possible to obtain interface name from interface document, this interface name is a character string.
Afterwards, reflex mechanism can be used, utilize interface name dynamically to generate interface class, and in fact
Example, obtains interface instance object.
Wherein, reflex mechanism refers to that JAVA reflex mechanism, JAVA reflex mechanism are in running status,
For any one class, all properties and the method for this class can be known;Right for any one
As, its any one method and attribute can be called;The information of this dynamic acquisition and dynamically
The function of the method calling object is referred to as JAVA reflex mechanism.
After obtaining interface instance object, it is possible to use interface instance object uses selector mode dynamic
The method calling APP and feature card interface, it is achieved the loading of feature card.
When realizing the bidirectional data communication between APP and feature card, trust mechanism can be used,
During above-mentioned employing selector mode call method, object is entrusted in transmission and return, it is achieved APP and plug-in unit
Between bidirectional data communication.Entrust the class object that object interacts in referring to APP with feature card.
Sending module 34 is used for the internal memory path of described feature card is sent to described feature card, so that
Described feature card is according to described internal memory path bootstrap loading plug-in resource.
Wherein, the internal memory path of feature card is the internal memory path of dynamic library file, and this internal memory path can
To preassign.
After loading feature card, APP can utilize trust mechanism, by the internal memory of feature card
(bundle) path is sent to feature card, due to when feature card runs need plug-in resource all
It is saved in the internal memory that internal memory path is corresponding, therefore, after feature card gets internal memory path, permissible
From corresponding internal memory, plug-in resource is obtained, it is achieved the bootstrap loading of plug-in resource according to this internal memory path,
The successful operation of assurance function plug-in unit.
In some embodiments, seeing Fig. 4, this device 30 also includes:
First generation module 35, is used for generating described interface document.
Wherein, when developing APP, this interface can be defined by developer, generate corresponding interface document
(.h file).
Second generation module 36, for being included in described dynamic library file by described interface document, and marks
Know the version of described dynamic library file.
Wherein, when developing APP, this interface can be defined by developer, generate corresponding interface document
(.h file).
Preserve module 37, after described dynamic library file is compressed, is saved in service end.
Such as, dynamic library file is compressed into .zip form.
Accordingly, the first acquisition module 31 includes:
First module 311, for when application program needs to load described feature card, it is judged that whether this locality
There is the dynamic library file needing version of the feature card needing loading;
Second unit 312, needs the dynamic library file of version if existed for this locality, then obtains in this locality
Described dynamic library file;
, if there is not the dynamic library file needing version, then from service end for this locality in the 3rd unit 313
Download the dynamic library file needing version, and the dynamic library file downloaded is decompressed, after obtaining decompression
Dynamic library file.
Such as, there is the dynamic library file of latest edition in this locality, or, download from service end and solve
After being pressed onto in the catalogue of APP, the dynamic library text of latest edition can be obtained from local APP catalogue
Part, and use above-mentioned mechanism to be loaded in internal memory.
In some embodiments, seeing Fig. 4, load-on module 33 includes:
4th unit 331, for obtaining interface name from described interface document;
5th unit 332, is used for using reflex mechanism, utilizes described interface name dynamically to generate interface class,
And carry out instantiation, obtain interface instance object;
6th unit 333, is used for utilizing interface instance object, uses selector mode dynamic call
Application program and the method for feature card interface, it is achieved the loading of feature card.
In some embodiments, load-on module 33 includes:
7th unit 334, is used for utilizing trust mechanism, when calling the method for described interface, transmits and return
Return and entrust object, it is achieved the bidirectional data communication between application program and described feature card.
In some embodiments, described sending module 34 specifically for:
Utilize and entrust mechanism, the internal memory path of feature card is sent to feature card.
It is understood that the apparatus and method embodiment of the present embodiment is corresponding, the particular content side of may refer to
Associated description in method embodiment, no longer describes in detail at this.
In the present embodiment, by loading dynamic library file, function can be loaded according to dynamic library file and insert
Part, the bidirectional data communication ensured between application program and feature card, and realize feature card from adding
Carry plug-in resource, can when application program runs dynamic loading function plug-in unit, thus realize application journey
The plug-in unit of sequence, after application program uses plug-in unitization management, it is possible to reduce the size of APP bag, and
Feature card dynamically can be updated, it is not necessary to allow user update whole APP bag.
It should be noted that in describing the invention, term " first ", " second " etc. are only used for retouching
State purpose, and it is not intended that indicate or hint relative importance.Additionally, in describing the invention, remove
Non-being otherwise noted, the implication of " multiple " refers at least two.
In flow chart or at this, any process described otherwise above or method description are construed as, table
Show and include one or more generation for the executable instruction of the step that realizes specific logical function or process
Module, fragment or the part of code, and the scope of the preferred embodiment of the present invention includes other realization,
Wherein can not by order that is shown or that discuss, including according to involved function by basic mode simultaneously
Or in the opposite order, performing function, these should be by embodiments of the invention those of skill in the art
Member is understood.
Should be appreciated that each several part of the present invention can realize by hardware, software, firmware or combinations thereof.
In the above-described embodiment, multiple steps or method in memory and can be held by suitably instruction with storage
Software or firmware that row system performs realize.Such as, if realized with hardware, with another embodiment party
As in formula, can realize by any one in following technology well known in the art or their combination: have
For data signal being realized the discrete logic of the logic gates of logic function, there is suitably combination
The special IC of logic gates, programmable gate array (PGA), field programmable gate array (FPGA)
Deng.
Those skilled in the art be appreciated that realize that above-described embodiment method carries whole or
Part steps can be by program and completes to instruct relevant hardware, and described program can be stored in one
In computer-readable recording medium, this program upon execution, including one of step or its group of embodiment of the method
Close.
Additionally, each functional unit in each embodiment of the present invention can be integrated in a processing module,
Can also be that unit is individually physically present, it is also possible to two or more unit are integrated in a module
In.Above-mentioned integrated module both can realize to use the form of hardware, it would however also be possible to employ software function module
Form realizes.If described integrated module realizes and as independent product using the form of software function module
When selling or use, it is also possible to be stored in a computer read/write memory medium.
Storage medium mentioned above can be read only memory, disk or CD etc..
In the description of this specification, reference term " embodiment ", " some embodiments ", " example ",
It is concrete that the description of " concrete example " or " some examples " etc. means to combine this embodiment or example describes
Feature, structure, material or feature are contained at least one embodiment or the example of the present invention.In this theory
In bright book, the schematic representation of above-mentioned term is not necessarily referring to identical embodiment or example.And,
The specific features, structure, material or the feature that describe can be in any one or more embodiments or examples
In combine in an appropriate manner.
Although above it has been shown and described that embodiments of the invention, it is to be understood that above-described embodiment
It is exemplary, it is impossible to being interpreted as limitation of the present invention, those of ordinary skill in the art is the present invention's
In the range of above-described embodiment can be changed, revise, replace and modification.
Claims (13)
1. the implementation method of an application plug, it is characterised in that including:
Obtain the dynamic library file that the feature card of application program is corresponding, described dynamic library file comprises in advance
Interface document between the feature card of definition and application program;
Described dynamic library file is loaded in internal memory, and from described dynamic library file, obtains interface literary composition
Part;
Load described feature card according to described interface document, and realize described application program and described merit
Bidirectional data communication between energy plug-in unit;
The internal memory path of described feature card is sent to described feature card so that described feature card according to
Described internal memory path bootstrap loading plug-in resource.
Method the most according to claim 1, it is characterised in that also include:
Generate described interface document;
Described interface document is included in described dynamic library file, and identifies the version of described dynamic library file
This;
It is saved in service end after described dynamic library file is compressed.
Method the most according to claim 2, it is characterised in that the function of described acquisition application program
The dynamic library file that plug-in unit is corresponding, including:
When application program needs to load described feature card, it is judged that the local function that whether there is needs loading
The dynamic library file needing version of plug-in unit;
If the local dynamic library file needing version that exists, then obtain described dynamic library file in this locality;
If this locality does not exist the dynamic library file needing version, then download from service end and need the dynamic of version
Library file, and the dynamic library file downloaded is decompressed, to obtain the dynamic library file after decompressing.
Method the most according to claim 1, it is characterised in that described add according to described interface document
Carry described feature card, including:
Interface name is obtained from described interface document;
Use reflex mechanism, utilize described interface name dynamically to generate interface class, and carry out instantiation, obtain
Interface instance object;
Utilize interface instance object, use selector mode dynamic call application program and feature card
The method of interface, it is achieved the loading of feature card.
Method the most according to claim 1, it is characterised in that the described application program that realizes is with described
Bidirectional data communication between feature card, including:
Utilize and entrust mechanism, when calling the method for described interface, transmit and return trust object, it is achieved should
With the bidirectional data communication between program and described feature card.
Method the most according to claim 1, it is characterised in that described by described feature card
Deposit path and be sent to described feature card, including:
Utilize and entrust mechanism, the internal memory path of feature card is sent to feature card.
7. according to the method described in any one of claim 1-6, it is characterised in that described application program is
It is applied to the application program of iOS system.
8. an application plug realize device, it is characterised in that including:
First acquisition module, for obtaining the dynamic library file that the feature card of application program is corresponding, described dynamic
State library file comprises the interface document between predefined feature card and application program;
Second acquisition module, for being loaded into described dynamic library file in internal memory, and from described dynamic base
File obtains interface document;
Load-on module, for loading described feature card according to described interface document, and realizes described answering
With the bidirectional data communication between program and described feature card;
Sending module, for the internal memory path of described feature card is sent to described feature card, so that
Described feature card is according to described internal memory path bootstrap loading plug-in resource.
Device the most according to claim 8, it is characterised in that also include:
First generation module, is used for generating described interface document;
Second generation module, for being included in described dynamic library file by described interface document, and identifies institute
State the version of dynamic library file;
Preserve module, after described dynamic library file is compressed, is saved in service end.
Device the most according to claim 9, it is characterised in that described first acquisition module includes:
First module, for when application program needs to load described feature card, it is judged that whether this locality exists
Need the dynamic library file needing version of the feature card loaded;
Second unit, needs the dynamic library file of version if existed for this locality, then obtain described in this locality
Dynamic library file;
Unit the 3rd, if there is not the dynamic library file needing version for this locality, then downloads from service end
Need the dynamic library file of version, and the dynamic library file downloaded is decompressed, with moving after obtaining decompression
State library file.
11. devices according to claim 8, it is characterised in that described load-on module includes:
Unit the 4th, for obtaining interface name from described interface document;
Unit the 5th, is used for using reflex mechanism, utilizes described interface name dynamically to generate interface class, goes forward side by side
Row instantiation, obtains interface instance object;
Unit the 6th, is used for utilizing interface instance object, uses selector mode dynamic call application
Program and the method for feature card interface, it is achieved the loading of feature card.
12. devices according to claim 8, it is characterised in that described load-on module includes:
Unit the 7th, is used for utilizing trust mechanism, when calling the method for described interface, transmits and return committee
Torr object, it is achieved the bidirectional data communication between application program and described feature card.
13. devices according to claim 8, it is characterised in that described sending module specifically for:
Utilize and entrust mechanism, the internal memory path of feature card is sent to feature card.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610201697.8A CN105893094B (en) | 2016-03-31 | 2016-03-31 | The implementation method and device of application plug |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610201697.8A CN105893094B (en) | 2016-03-31 | 2016-03-31 | The implementation method and device of application plug |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105893094A true CN105893094A (en) | 2016-08-24 |
CN105893094B CN105893094B (en) | 2019-05-03 |
Family
ID=57013197
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610201697.8A Active CN105893094B (en) | 2016-03-31 | 2016-03-31 | The implementation method and device of application plug |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105893094B (en) |
Cited By (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106325957A (en) * | 2016-08-31 | 2017-01-11 | 广州品唯软件有限公司 | Plug-in component loading method and equipment thereof |
CN106648795A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Updating method and device of application program |
CN107273142A (en) * | 2017-07-12 | 2017-10-20 | 北京潘达互娱科技有限公司 | Method for updating program, program operating method and device |
CN107426278A (en) * | 2017-04-24 | 2017-12-01 | 阿里巴巴集团控股有限公司 | Call method, device and the mobile terminal of H5 applications |
CN107493336A (en) * | 2017-08-21 | 2017-12-19 | 北京北信源软件股份有限公司 | Realize method and apparatus, computer-readable recording medium and the storage control of client plug-in |
CN107992308A (en) * | 2017-11-22 | 2018-05-04 | 竞技世界(北京)网络技术有限公司 | A kind of plug-in unit management method of android terminal application program |
CN108228264A (en) * | 2016-12-12 | 2018-06-29 | 北京国双科技有限公司 | plug-in resource loading method and device |
CN108279941A (en) * | 2016-12-31 | 2018-07-13 | 阿里巴巴集团控股有限公司 | A kind of compression method and device of application program |
CN108681473A (en) * | 2018-05-18 | 2018-10-19 | 广州酷狗计算机科技有限公司 | Application program generation, operation method, device, computer equipment and storage medium |
CN109491718A (en) * | 2018-09-13 | 2019-03-19 | 北京米文动力科技有限公司 | A kind of plug-in loading method and equipment |
CN109947407A (en) * | 2019-03-07 | 2019-06-28 | 腾讯科技(北京)有限公司 | A kind of data capture method and device |
CN110096282A (en) * | 2019-05-15 | 2019-08-06 | 湖南快乐阳光互动娱乐传媒有限公司 | Data processing method and device based on plug-in architecture |
CN110134457A (en) * | 2019-04-17 | 2019-08-16 | 深圳壹账通智能科技有限公司 | Plug-in loading method and device |
CN110308949A (en) * | 2019-06-28 | 2019-10-08 | 深圳市酷开网络科技有限公司 | Implementation method, device and the computer readable storage medium of plug-in unit frame |
CN110413343A (en) * | 2019-07-17 | 2019-11-05 | 深圳市酷开网络科技有限公司 | A kind of method, apparatus and computer equipment of instant plug-in unit |
CN110531981A (en) * | 2019-08-27 | 2019-12-03 | 珠海格力智能装备有限公司 | Visual software system and application method thereof |
CN110750545A (en) * | 2019-09-03 | 2020-02-04 | 北京字节跳动网络技术有限公司 | Dynamic library hot update method, device, medium and equipment |
CN110874250A (en) * | 2019-11-20 | 2020-03-10 | 杭州天宽科技有限公司 | Conversion method, system, device and storage medium for tool manufacturer and APP terminal |
CN111782504A (en) * | 2020-05-20 | 2020-10-16 | 车智互联(北京)科技有限公司 | Application program abnormity diagnosis method, mobile terminal and readable storage medium |
CN111984299A (en) * | 2019-05-22 | 2020-11-24 | 青岛海信宽带多媒体技术有限公司 | Data loading method and equipment |
CN112214250A (en) * | 2019-06-24 | 2021-01-12 | 北京京东尚科信息技术有限公司 | Application program assembly loading method and device |
CN112416383A (en) * | 2020-01-21 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Hot updating method and device for golang program and computer equipment |
CN112866182A (en) * | 2019-11-28 | 2021-05-28 | 浙江宇视科技有限公司 | Data interfacing method, device and computer-readable storage medium |
CN112948018A (en) * | 2021-03-01 | 2021-06-11 | 北京百度网讯科技有限公司 | Dynamic library loading method, device, equipment and medium for small program |
CN114116048A (en) * | 2021-11-10 | 2022-03-01 | 北京乐驾科技有限公司 | Method and device for realizing lightweight of mobile equipment application program |
CN114489862A (en) * | 2022-02-16 | 2022-05-13 | 深圳市明泰智能技术有限公司 | Plug-in implementation method of IDEV system |
CN116382796A (en) * | 2023-03-29 | 2023-07-04 | 上海视九信息科技有限公司 | Plug-in management method and device of H5 applet runner and electronic equipment |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101561763A (en) * | 2009-04-30 | 2009-10-21 | 腾讯科技(北京)有限公司 | Method and device for realizing dynamic-link library |
US20100162277A1 (en) * | 2008-12-22 | 2010-06-24 | Electronics And Telecommunications Research Institute Of Daejeon | Apparatus and method for executing robot application program |
CN102141922A (en) * | 2010-01-29 | 2011-08-03 | 腾讯科技(深圳)有限公司 | Micro kernel pluggable program application system and implementation method thereof |
CN102195804A (en) * | 2011-03-10 | 2011-09-21 | 易程(苏州)软件股份有限公司 | Automatic updating method of software and system thereof |
CN102520967A (en) * | 2011-12-28 | 2012-06-27 | 深圳市融创天下科技股份有限公司 | Method, system and mobile terminal for creating and using mobile platform plug-in component |
CN103019819A (en) * | 2012-12-05 | 2013-04-03 | 上海创图网络科技发展有限公司 | Dynamic link library uniform scheduling method based on plug-in mechanism |
CN103399792A (en) * | 2013-07-24 | 2013-11-20 | 佳都新太科技股份有限公司 | Implementation scheme of Android-based plug-in applications |
CN103927180A (en) * | 2014-04-21 | 2014-07-16 | 广州市久邦数码科技有限公司 | Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system |
CN104424002A (en) * | 2013-09-10 | 2015-03-18 | 中国科学院声学研究所 | Dynamic component loading method and system based on plug-in mechanism |
CN104834534A (en) * | 2015-06-09 | 2015-08-12 | 北京奇虎科技有限公司 | Application program function extension method, device and system |
-
2016
- 2016-03-31 CN CN201610201697.8A patent/CN105893094B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100162277A1 (en) * | 2008-12-22 | 2010-06-24 | Electronics And Telecommunications Research Institute Of Daejeon | Apparatus and method for executing robot application program |
CN101561763A (en) * | 2009-04-30 | 2009-10-21 | 腾讯科技(北京)有限公司 | Method and device for realizing dynamic-link library |
CN102141922A (en) * | 2010-01-29 | 2011-08-03 | 腾讯科技(深圳)有限公司 | Micro kernel pluggable program application system and implementation method thereof |
CN102195804A (en) * | 2011-03-10 | 2011-09-21 | 易程(苏州)软件股份有限公司 | Automatic updating method of software and system thereof |
CN102520967A (en) * | 2011-12-28 | 2012-06-27 | 深圳市融创天下科技股份有限公司 | Method, system and mobile terminal for creating and using mobile platform plug-in component |
CN103019819A (en) * | 2012-12-05 | 2013-04-03 | 上海创图网络科技发展有限公司 | Dynamic link library uniform scheduling method based on plug-in mechanism |
CN103399792A (en) * | 2013-07-24 | 2013-11-20 | 佳都新太科技股份有限公司 | Implementation scheme of Android-based plug-in applications |
CN104424002A (en) * | 2013-09-10 | 2015-03-18 | 中国科学院声学研究所 | Dynamic component loading method and system based on plug-in mechanism |
CN103927180A (en) * | 2014-04-21 | 2014-07-16 | 广州市久邦数码科技有限公司 | Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system |
CN104834534A (en) * | 2015-06-09 | 2015-08-12 | 北京奇虎科技有限公司 | Application program function extension method, device and system |
Cited By (36)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106325957A (en) * | 2016-08-31 | 2017-01-11 | 广州品唯软件有限公司 | Plug-in component loading method and equipment thereof |
CN108228264A (en) * | 2016-12-12 | 2018-06-29 | 北京国双科技有限公司 | plug-in resource loading method and device |
CN106648795A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Updating method and device of application program |
CN108279941B (en) * | 2016-12-31 | 2021-06-15 | 阿里巴巴集团控股有限公司 | Application program compression method and device |
CN108279941A (en) * | 2016-12-31 | 2018-07-13 | 阿里巴巴集团控股有限公司 | A kind of compression method and device of application program |
CN107426278A (en) * | 2017-04-24 | 2017-12-01 | 阿里巴巴集团控股有限公司 | Call method, device and the mobile terminal of H5 applications |
CN107273142A (en) * | 2017-07-12 | 2017-10-20 | 北京潘达互娱科技有限公司 | Method for updating program, program operating method and device |
CN107273142B (en) * | 2017-07-12 | 2021-04-23 | 北京龙之心科技有限公司 | Program updating method, program running method and device |
CN107493336A (en) * | 2017-08-21 | 2017-12-19 | 北京北信源软件股份有限公司 | Realize method and apparatus, computer-readable recording medium and the storage control of client plug-in |
CN107992308A (en) * | 2017-11-22 | 2018-05-04 | 竞技世界(北京)网络技术有限公司 | A kind of plug-in unit management method of android terminal application program |
CN107992308B (en) * | 2017-11-22 | 2020-10-20 | 竞技世界(北京)网络技术有限公司 | Plug-in management method for android terminal application program |
CN108681473A (en) * | 2018-05-18 | 2018-10-19 | 广州酷狗计算机科技有限公司 | Application program generation, operation method, device, computer equipment and storage medium |
CN109491718A (en) * | 2018-09-13 | 2019-03-19 | 北京米文动力科技有限公司 | A kind of plug-in loading method and equipment |
CN109947407A (en) * | 2019-03-07 | 2019-06-28 | 腾讯科技(北京)有限公司 | A kind of data capture method and device |
CN110134457A (en) * | 2019-04-17 | 2019-08-16 | 深圳壹账通智能科技有限公司 | Plug-in loading method and device |
CN110096282A (en) * | 2019-05-15 | 2019-08-06 | 湖南快乐阳光互动娱乐传媒有限公司 | Data processing method and device based on plug-in architecture |
CN111984299A (en) * | 2019-05-22 | 2020-11-24 | 青岛海信宽带多媒体技术有限公司 | Data loading method and equipment |
CN112214250A (en) * | 2019-06-24 | 2021-01-12 | 北京京东尚科信息技术有限公司 | Application program assembly loading method and device |
CN112214250B (en) * | 2019-06-24 | 2024-05-17 | 北京京东尚科信息技术有限公司 | Application program component loading method and device |
CN110308949A (en) * | 2019-06-28 | 2019-10-08 | 深圳市酷开网络科技有限公司 | Implementation method, device and the computer readable storage medium of plug-in unit frame |
CN110413343A (en) * | 2019-07-17 | 2019-11-05 | 深圳市酷开网络科技有限公司 | A kind of method, apparatus and computer equipment of instant plug-in unit |
CN110531981A (en) * | 2019-08-27 | 2019-12-03 | 珠海格力智能装备有限公司 | Visual software system and application method thereof |
CN110750545A (en) * | 2019-09-03 | 2020-02-04 | 北京字节跳动网络技术有限公司 | Dynamic library hot update method, device, medium and equipment |
CN110874250A (en) * | 2019-11-20 | 2020-03-10 | 杭州天宽科技有限公司 | Conversion method, system, device and storage medium for tool manufacturer and APP terminal |
CN110874250B (en) * | 2019-11-20 | 2023-05-02 | 杭州天宽科技有限公司 | Conversion method, system, device and storage medium of tool manufacturer and APP end |
CN112866182A (en) * | 2019-11-28 | 2021-05-28 | 浙江宇视科技有限公司 | Data interfacing method, device and computer-readable storage medium |
CN112866182B (en) * | 2019-11-28 | 2023-05-23 | 浙江宇视科技有限公司 | Data docking method, device and computer readable storage medium |
CN112416383A (en) * | 2020-01-21 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Hot updating method and device for golang program and computer equipment |
CN111782504A (en) * | 2020-05-20 | 2020-10-16 | 车智互联(北京)科技有限公司 | Application program abnormity diagnosis method, mobile terminal and readable storage medium |
CN112948018B (en) * | 2021-03-01 | 2023-08-01 | 北京百度网讯科技有限公司 | Dynamic library loading method, device, equipment and medium for applet |
CN112948018A (en) * | 2021-03-01 | 2021-06-11 | 北京百度网讯科技有限公司 | Dynamic library loading method, device, equipment and medium for small program |
CN114116048A (en) * | 2021-11-10 | 2022-03-01 | 北京乐驾科技有限公司 | Method and device for realizing lightweight of mobile equipment application program |
CN114116048B (en) * | 2021-11-10 | 2023-12-01 | 北京乐驾科技有限公司 | Method and device for realizing light weight of mobile device application program |
CN114489862A (en) * | 2022-02-16 | 2022-05-13 | 深圳市明泰智能技术有限公司 | Plug-in implementation method of IDEV system |
CN116382796A (en) * | 2023-03-29 | 2023-07-04 | 上海视九信息科技有限公司 | Plug-in management method and device of H5 applet runner and electronic equipment |
CN116382796B (en) * | 2023-03-29 | 2024-02-13 | 上海视九信息科技有限公司 | Plug-in management method and device of H5 applet runner and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105893094B (en) | 2019-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105893094A (en) | Achieving method and device for application program plug-in | |
US11467854B2 (en) | Method and apparatus for loading multiple differing versions of a native library into a native environment | |
US10795660B1 (en) | Live code updates | |
CN110502222B (en) | AAR method, apparatus, medium, and device for outbound dependency on internal base repository | |
CN108319460B (en) | Method and device for generating application program installation package, electronic equipment and storage medium | |
CN102455912A (en) | Runtime extensions | |
CN106020877A (en) | Automatic update method and apparatus for system environment configuration | |
CN109344619A (en) | The hot restorative procedure and device of application program | |
CN112965761B (en) | Data processing method, system, electronic equipment and storage medium | |
CN109857432A (en) | A kind of hot update method and device of game application | |
CN112965713B (en) | Development method, device, equipment and storage medium of visual editor | |
CN113407165B (en) | SDK generation and self-upgrade method, device, readable medium and equipment | |
CN112650521B (en) | Software development kit SDK thermal restoration method and device and electronic equipment | |
CN112905220A (en) | Thermal restoration method, device, equipment and storage medium | |
CN105373384B (en) | A kind of software development methodology and device | |
AU2016378425B2 (en) | Application program running method and apparatus | |
CN105933887B (en) | Apply the adaptation method and device between different dual-card intelligent mobile phones | |
CN112732277B (en) | Java multi-service application automatic installation and deployment integration method and system | |
CN107402749B (en) | Method and device for realizing picture loading library | |
CN111625232B (en) | Method and device for generating application program installation package, readable medium and electronic equipment | |
CN108008984A (en) | A kind of resource file downloading updating method and device | |
CN114153462A (en) | Client source code processing method and device, storage medium and electronic equipment | |
CN113377415A (en) | Application publishing method and device | |
CN111240657A (en) | Method and device for generating SDK and electronic equipment | |
CN110502251A (en) | Using installation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |