CN105094849A - Method and device for transferring resources of plug-in - Google Patents

Method and device for transferring resources of plug-in Download PDF

Info

Publication number
CN105094849A
CN105094849A CN201510526626.0A CN201510526626A CN105094849A CN 105094849 A CN105094849 A CN 105094849A CN 201510526626 A CN201510526626 A CN 201510526626A CN 105094849 A CN105094849 A CN 105094849A
Authority
CN
China
Prior art keywords
resource
plug
unit
routing information
container
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
Application number
CN201510526626.0A
Other languages
Chinese (zh)
Other versions
CN105094849B (en
Inventor
高飞
赵林
贾军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510526626.0A priority Critical patent/CN105094849B/en
Publication of CN105094849A publication Critical patent/CN105094849A/en
Application granted granted Critical
Publication of CN105094849B publication Critical patent/CN105094849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for transferring resources of a plug-in. The method comprises the following steps of injecting path information of plug-in resources into a resource module including the path information of container resources when the plug-in is loaded; and traversing the resources referenced by the plug-in, and transferring the resources referenced by the plug-in from a resource object set pointed by the resource module according to prefix information of the resources. According to the method and the device, undifferentiated transfer of the plug-in resources and the container resources can be implemented in a plug-in loading process, so that the development cost is reduced.

Description

A kind of resource transfer method and apparatus of plug-in unit
[technical field]
The present invention relates to Computer Applied Technology field, particularly a kind of resource transfer method and apparatus of plug-in unit.
[background technology]
Along with the number of users growth of mobile terminal APP (application software) and the lifting of demand for experience, product needs the reparation constantly increasing new function or carry out function, therefore in exploitation, the demand that size of code becomes large problem and dynamic publishing function is faced, so there is plug-in unit, function by product is packaged into plug-in unit and issues, and is loaded by the container as application main body.But plug-in unit relates to the problem of resource transfer in the process performed, and how can carry out resource transfer is easily the problem that will solve at present.
Due in plug-in unit implementation except calling plug-in resource, also may call container resource, if the container resources duplication that relied on by plug-in unit is a in plug-in unit, then can cause that plug-in unit inclusion is long-pending becomes large, and determine that relying on resource brings cost of development higher.If the interface exposing resource in advance on container calls for plug-in unit, then developer needs to know resource that plug-in unit calls which is plug-in unit, and which is container, and development and maintenance cost is higher.
[summary of the invention]
In view of this, the invention provides a kind of resource transfer method and apparatus of plug-in unit, so that realize resource transfer easily, reduce cost of development.
Concrete technical scheme is as follows:
The invention provides a kind of resource transfer method of plug-in unit, the method comprises:
During loading of plug-in, the routing information of plug-in resource is injected the resource module comprising the routing information of container resource;
The resource that traversal plug-in unit is quoted, foundation resource prefix information calls the resource that described plug-in unit is quoted from the resource object set pointed by described resource module.
According to the present invention one preferred implementation, describedly the routing information of plug-in resource injected the resource module comprising the routing information of container resource comprise:
By reflection call-by mechanism, the routing information of described plug-in resource is added into the resource module of container, this resource module comprises the routing information of container resource; Or,
Create the resource module of plug-in unit, by reflection call-by mechanism, the routing information of the routing information of described plug-in resource and container resource is added into the resource module of described plug-in unit.
According to the present invention one preferred implementation, described by the routing information of plug-in resource inject comprise the resource module of the routing information of container resource before, also comprise:
Judge the routing information that whether there is described plug-in resource in described resource module, if not, then continue to perform the described resource module injection of the routing information of plug-in resource being comprised the routing information of container resource.
According to the present invention one preferred implementation, described by the routing information of plug-in resource inject comprise the resource module of the routing information of container resource before, also comprise:
Judge whether described plug-in unit comprises plug-in resource, if so, then continue to perform the described resource module injection of the routing information of plug-in resource being comprised the routing information of container resource.
According to the present invention one preferred implementation, the method also comprises:
When compiling packing is carried out to described plug-in unit, read the resource prefix information in application configuration file, the resource prefix information that different plug-in unit is corresponding different, and plug-in unit different resource prefix information corresponding to container.
According to the present invention one preferred implementation, the method also comprises:
When carrying out compiling packing to described plug-in unit, according to the dependence handbag name in plug-in unit source code, search the container resource that described plug-in unit is quoted.
According to the present invention one preferred implementation, the method also comprises:
Compiling packing is carried out to described plug-in unit, generates the resource index file of plug-in unit;
The resource index file of described plug-in unit and the resource index file of container are merged.
Present invention also offers a kind of resource transfer device of plug-in unit, this device comprises:
Resource injection unit, during for loading of plug-in, injects the resource module comprising the routing information of container resource by the routing information of plug-in resource;
Resource transfer unit, for traveling through the resource that plug-in unit is quoted, foundation resource prefix information calls the resource that described plug-in unit is quoted from the resource object set pointed by described resource module.
According to the present invention one preferred implementation, described resource injection unit, when the injection of the routing information of plug-in resource is comprised the resource module of the routing information of container resource, specifically performs:
By reflection call-by mechanism, the routing information of described plug-in resource is added into the resource module of container, this resource module comprises the routing information of container resource; Or,
Create the resource module of plug-in unit, by reflection call-by mechanism, the routing information of the routing information of described plug-in resource and container resource is added into the resource module of described plug-in unit.
According to the present invention one preferred implementation, this device also comprises:
First judging unit, for when loading described plug-in unit, judge the routing information that whether there is described plug-in resource in described resource module, if not, then trigger described resource injection unit and perform the described operation injection of the routing information of plug-in resource being comprised the resource module of the routing information of container resource.
According to the present invention one preferred implementation, this device also comprises:
Second judging unit, for when loading described plug-in unit, judge whether described plug-in unit comprises plug-in resource, if so, then trigger described resource injection unit and perform the described operation injection of the routing information of plug-in resource being comprised the resource module of the routing information of container resource.
According to the present invention one preferred implementation, this device also comprises:
Prefix reading unit, for when carrying out compiling packing to described plug-in unit, reads the resource prefix information in application configuration file, the resource prefix information that different plug-in unit is corresponding different, and plug-in unit different resource prefix information corresponding to container.
According to the present invention one preferred implementation, this device also comprises:
Resource lookup unit, for when carrying out compiling packing to described plug-in unit, according to the dependence handbag name in plug-in unit source code, searches the container resource that described plug-in unit is quoted.
According to the present invention one preferred implementation, this device also comprises:
Piece file mergence unit, for after the resource index file described plug-in unit being carried out to compiling packing generation plug-in unit, merges the resource index file of described plug-in unit and the resource index file of container.
As can be seen from the above technical solutions, in the present invention plug-in resource is injected the resource module comprising the routing information of container resource, make the unified routing information safeguarding plug-in resource and container resource of resource module, make in plug-in unit loading procedure, can realize calling the indifference of plug-in resource and container resource from the resource object set pointed by resource module according to resource prefix information.Without the need to comprising container resource in plug-in unit bag, also knowing that the resource that plug-in unit is quoted is plug-in unit or container in advance without the need to developer, realizing more conveniently also reducing cost of development.
[accompanying drawing explanation]
The main method process flow diagram that Fig. 1 provides for the embodiment of the present invention;
The structure drawing of device that Fig. 2 provides for this embodiment of the present invention.
[embodiment]
In order to make the object, technical solutions and advantages of the present invention clearly, describe the present invention below in conjunction with the drawings and specific embodiments.
The container related in the embodiment of the present invention is actually the main body of application program, and be responsible for holding application program institute and provide the various functions of service, container externally provides card i/f, can carry out supplementing of function and reparation by the form application programs of loading of plug-in.
The main method process flow diagram that Fig. 1 provides for the embodiment of the present invention, as shown in Figure 1, the method can comprise the following steps:
In 101, during loading of plug-in, the routing information of plug-in resource is injected the resource module comprising the routing information of container resource.
Resource module is mainly used in maintenance resources routing information, and the routing information of the plug-in resource of self, when loading, is injected resource module, comprises the routing information of container resource in this resource module simultaneously by each plug-in unit.That is, the routing information of the routing information of plug-in resource and container resource is merged, safeguards in same resource module.
The process injected adds the process of resource object interface indeed through reflection call-by mechanism.First for plug-in unit establishing resource module, unified resource module can be created in embodiments of the present invention for all plug-in units, then the routing information of the plug-in resource of self is added into this resource module by each plug-in unit, and the routing information of container resource is also added into this resource module.Like this, the routing information of the routing information of container resource and all plug-in resource of same application is just comprised in resource module.
Due to the dynamic interpolation of the underlying resource support resource for some operating system, operating system after such as Android5.0, but add-on system object interface remains hiding, therefore reflection call-by mechanism can be adopted in the resource module of container, directly to add the routing information of plug-in resource, without the need to additionally creating the resource module of plug-in unit.
Before the routing information of plug-in resource is injected resource module, first the routing information that whether there is this plug-in resource in resource module can be judged, if not, then the routing information of plug-in resource is injected the resource module comprising the routing information of container resource; If so, then do not need to repeat to inject.
In addition, first can also judge whether comprise plug-in resource in plug-in unit, if so, then the routing information of plug-in resource be injected above-mentioned resource module; Otherwise, without the need to injecting.For Android operation system, plug-in unit forms an apk bag after compiling packing, if comprise plug-in resource in plug-in unit, then has arsc file in apk bag.For the plug-in unit not comprising arsc file in apk bag, inject without the need to resource can not be performed.
GetResources interface in application, activity and service base class is rewritten, getResources interface is returned in resource module and performed the resource object after injecting.
In 102, the resource that traversal plug-in unit is quoted, foundation resource prefix information calls the resource that plug-in unit is quoted from the resource object set pointed by resource module.In embodiments of the present invention, unify maintenance due to resource module and have plug-in resource and container resource, therefore both comprise container resource in the resource object set pointed by resource module and also comprise plug-in resource, when calling resource in plug-in unit implementation, unification is called resource from this resource object set, what namely carry out plug-in resource and container resource is that indifference is called, and achieves the transparent of resource and calls.
In addition, both comprised container resource in the resource object set pointed by resource module and also comprised plug-in resource, and therefore needed to distinguish plug-in resource and container resource, ensured that the mark of plug-in resource and container resource was unique.For such as Android operation system etc., its current mechanism is the resource of all application except system resource, all unify allocated resource and be designated 0x7f, container resource and plug-in resource are clashed in mark, namely can not specifically distinguish container resource or plug-in resource.For this situation, in the embodiment of the present invention, in application configuration file (such as AndroidManifest.xml) overall in plug-in unit source code, increase the node with application peer, such as increase node <package-idandroid:value=" 1 " >, this node is resource prefix information, for identifying resource.The resource prefix information that different plug-in unit is corresponding different, and plug-in unit different resource prefix information corresponding to container.Still for node <package-idandroid:value=" 1 " >, its intermediate value gets 1,0x7d can be represented, on duty when getting 2,0x7e can be represented, like this, value is come for Resourse Distribute resource prefix information backward successively, and no longer pressure appointment 0x7f is the mark of other resources except system resource.
Correspondingly, plug-in unit is being carried out to the stage compiling packing, reading the resource prefix information in application configuration file, according to this resource prefix information, compiling packing is being carried out to plug-in unit.Like this, in plug-in unit loading procedure, during the concrete resource needing loading of plug-in to quote, corresponding resource can be found according to resource prefix information from the resource object set pointed by resource module, and call.
In addition, carrying out plug-in unit compiling in the process of packing, if determine plug-in unit reference container resource, then may cannot compile because can not find resource and passing through.For this situation, can specify under resource path in plug-in unit source code in embodiments of the present invention and rely on handbag name.Such as, in Android operation system, plug-in unit source code is with the formal definition resource path of "-I+ resource path information ", in embodiments of the present invention, can increase parameter "-rely-app-package " coming and specify dependence handbag name under this path, so-called dependence bag is exactly the container resource bag that plug-in unit is quoted.Correspondingly, when carrying out compiling packing to plug-in unit, according to the dependence handbag name in plug-in unit source code, search the container resource that plug-in unit is quoted, thus ensure that the resource that plug-in unit is quoted can both find, compiling can be carried out smoothly.
It should be noted that, carrying out plug-in unit compiling in the process of packing, the resource information that plug-in unit is quoted can obtain from the topology file of plug-in unit.The resource type that plug-in unit is quoted can include but not limited to: string (character string) class, color (color) class, xml (extend markup language) class etc.The resource that plug-in unit is quoted can be self plug-in resource, and also can be container resource, can be even other plug-in resource in same application.Such as, there is android:text=" string/net_error " in plug-in unit topology file, wherein quoted resource net_error, if define in a reservoir, so just refer to container resource.
When carrying out compiling packing to plug-in unit, except static resource is compiled, the compiling of java code also can be carried out to generate resource index file (i.e. R class file).After plug-in resource being carried out to compiling packing, generate plug-in unit R class file, this plug-in unit R class file only comprises plug-in resource, if the resource of reference container in the java code of plug-in unit, then cannot compile and pass through.For this situation, in embodiments of the present invention, plug-in resource is being compiled, after generating plug-in unit R class file, plug-in unit R class file and container R class file are merged, just comprise the index of the container resource that plug-in resource and this plug-in unit are quoted in such plug-in unit R class file, thus ensure that the java code of plug-in unit can correctly compile.
Be more than the detailed description that method provided by the present invention is carried out, below device provided by the invention be described in detail.
The structure drawing of device that Fig. 2 provides for the embodiment of the present invention, as shown in Figure 2, this device can comprise: resource injection unit 01 and resource transfer unit 02, can further include the first judging unit 03, second judging unit 04, prefix reading unit 05, resource lookup unit 06 and Piece file mergence unit 07.The major function of each component units is as follows:
During loading of plug-in, resource injection unit 01 is responsible for the routing information of plug-in resource to inject the resource module comprising the routing information of container resource.
Resource module is mainly used in maintenance resources routing information, and the routing information of the plug-in resource of self, when loading, is injected resource module, comprises the routing information of container resource in this resource module simultaneously by each plug-in unit.That is, the routing information of the routing information of plug-in resource and container resource is merged, safeguards in same resource module.
Particularly, resource injection unit 01 can adopt but be not limited to following two kinds of modes and carry out resource injection:
First kind of way: by reflection call-by mechanism, the routing information of plug-in resource is added into the resource module of container, this resource module comprises the routing information of container resource.The situation that the basic-level support resource dynamic that this mode is applicable to operating system is added, the operating system after such as Android5.0.
The second way: create the resource module of plug-in unit, by reflection call-by mechanism, is added into the resource module of plug-in unit by the routing information of the routing information of plug-in resource and container resource.The bottom that this situation is applicable to operating system is the support resource situation of dynamically adding not, the operating system before such as Android5.0.The resource module created in this normal form can be for the unified resource module of all plug-in units, and namely a resource module shared by all plug-in units.
Further, before the routing information of plug-in resource is injected resource module by resource injection unit 01, the routing information that whether there is plug-in resource in above-mentioned resource module can be judged by the first judging unit 03, if not, then triggers resource injection unit 01 performs the operation injection of the routing information of plug-in resource being comprised the resource module of the routing information of container resource; If so, then do not need to repeat to inject.
Further, before the routing information of plug-in resource is injected resource module by resource injection unit 01, can judge whether plug-in unit comprises plug-in resource by the second judging unit 04, if so, then triggers resource injection unit 01 performs the operation injection of the routing information of plug-in resource being comprised the resource module of the routing information of container resource; Otherwise can not trigger or forbid that resource injection unit 01 performs the process of described injection.
Above-mentioned first judging unit 03 and the second judging unit 04 can select an existence, also can exist simultaneously.When existing, the operation of judgement can be performed simultaneously simultaneously, also can perform the operation of judgement in turn.When to perform the operation of judgement simultaneously, when only having the judged result of the first judging unit 03 and the second judging unit 04 all to meet the condition of triggers resource injection unit 04, just can perform resource and inject by triggers resource injection unit 01.When performing the operation of judgement in turn, perform judgement in turn with the first judging unit 03 and the second judging unit 04 in fig. 2 and be operating as example, when the judged result of the first judging unit 03 is no, second judging unit 04 performs judgement, when the judged result of the second judging unit 04 is for being, just triggers resource injection unit 01 performs resource injection.
Resource transfer unit 02 is responsible for the resource that traversal plug-in unit is quoted, and foundation resource prefix information calls the resource that this plug-in unit is quoted from the resource object set pointed by resource module.
In addition, both comprised container resource in the resource object set pointed by resource module and also comprised plug-in resource, and therefore needed to distinguish plug-in resource and container resource, ensured that the mark of plug-in resource and container resource was unique.For such as Android operation system etc., its current mechanism is the resource of all application except system resource, all unify allocated resource and be designated 0x7f, container resource and plug-in resource are clashed in mark, namely can not specifically distinguish container resource or plug-in resource.In the embodiment of the present invention, in application configuration file (such as AndroidManifest.xml) overall in plug-in unit source code, increase the node with application peer, such as increase node <package-idandroid:value=" 1 " >, this node is resource prefix information, for identifying resource.The resource prefix information that different plug-in unit is corresponding different, and plug-in unit different resource prefix information corresponding to container.Correspondingly, when carrying out compiling packing to plug-in unit, prefix reading unit 05 in the embodiment of the present invention reads the resource prefix information in application configuration file (such as AndroidManifest.xml), the resource prefix information that different plug-in unit is corresponding different, and plug-in unit different resource prefix information corresponding to container.According to this resource prefix information, compiling packing is carried out to plug-in unit.Like this, in plug-in unit loading procedure, during the concrete resource needing loading of plug-in to quote, corresponding resource can be found according to resource prefix information from the resource object set pointed by resource module, and call.
In addition, carrying out plug-in unit compiling in the process of packing, if determine plug-in unit reference container resource, then may cannot compile because can not find resource and passing through.For this situation, can specify under resource path in plug-in unit source code in embodiments of the present invention and rely on handbag name.Correspondingly, when carrying out compiling packing to plug-in unit, resource lookup unit 06 is responsible for according to the dependence handbag name in plug-in unit source code, searches the container resource that plug-in unit is quoted, thus ensures that the resource that plug-in unit is quoted can both find, and compiling can be carried out smoothly.
When carrying out compiling packing to plug-in unit, except static resource is compiled, the compiling of java code also can be carried out to generate resource index file (i.e. R class file).After plug-in resource being carried out to compiling packing, generate plug-in unit R class file, this plug-in unit R class file only comprises plug-in resource, if the resource of reference container in the java code of plug-in unit, then cannot compile and pass through.For this situation, in embodiments of the present invention, Piece file mergence unit 07 is responsible for, after the resource index file carrying out compiling packing generation plug-in unit to plug-in unit, the resource index file of plug-in unit and the resource index file of container being merged.Just comprise the index of the container resource that plug-in resource and this plug-in unit are quoted in the resource index file of such plug-in unit, thus ensure that the java code of plug-in unit can correctly compile.
Resource injection unit 01 in this device, resource transfer unit 02, first judging unit 03 and the second judging unit 04 can be arranged in the unit of loading of plug-in, and prefix reading unit 05, resource lookup unit 06 and Piece file mergence unit 07 can be arranged at and carry out compiling in the unit of packing to plug-in unit.
In several embodiment provided by the present invention, should be understood that, disclosed apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, and such as, the division of described unit, is only a kind of logic function and divides, and actual can have other dividing mode when realizing.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read-OnlyMemory, ROM), random access memory (RandomAccessMemory, RAM), magnetic disc or CD etc. various can be program code stored medium.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (14)

1. a resource transfer method for plug-in unit, it is characterized in that, the method comprises:
During loading of plug-in, the routing information of plug-in resource is injected the resource module comprising the routing information of container resource;
The resource that traversal plug-in unit is quoted, foundation resource prefix information calls the resource that described plug-in unit is quoted from the resource object set pointed by described resource module.
2. method according to claim 1, is characterized in that, describedly the routing information of plug-in resource is injected the resource module comprising the routing information of container resource comprises:
By reflection call-by mechanism, the routing information of described plug-in resource is added into the resource module of container, this resource module comprises the routing information of container resource; Or,
Create the resource module of plug-in unit, by reflection call-by mechanism, the routing information of the routing information of described plug-in resource and container resource is added into the resource module of described plug-in unit.
3. method according to claim 1 and 2, is characterized in that, described by the routing information of plug-in resource inject comprise the resource module of the routing information of container resource before, also comprise:
Judge the routing information that whether there is described plug-in resource in described resource module, if not, then continue to perform the described resource module injection of the routing information of plug-in resource being comprised the routing information of container resource.
4. method according to claim 1 and 2, is characterized in that, described by the routing information of plug-in resource inject comprise the resource module of the routing information of container resource before, also comprise:
Judge whether described plug-in unit comprises plug-in resource, if so, then continue to perform the described resource module injection of the routing information of plug-in resource being comprised the routing information of container resource.
5. method according to claim 1, is characterized in that, the method also comprises:
When compiling packing is carried out to described plug-in unit, read the resource prefix information in application configuration file, the resource prefix information that different plug-in unit is corresponding different, and plug-in unit different resource prefix information corresponding to container.
6. method according to claim 1, is characterized in that, the method also comprises:
When carrying out compiling packing to described plug-in unit, according to the dependence handbag name in plug-in unit source code, search the container resource that described plug-in unit is quoted.
7. method according to claim 1, is characterized in that, the method also comprises:
Compiling packing is carried out to described plug-in unit, generates the resource index file of plug-in unit;
The resource index file of described plug-in unit and the resource index file of container are merged.
8. a resource transfer device for plug-in unit, is characterized in that, this device comprises:
Resource injection unit, during for loading of plug-in, injects the resource module comprising the routing information of container resource by the routing information of plug-in resource;
Resource transfer unit, for traveling through the resource that plug-in unit is quoted, foundation resource prefix information calls the resource that described plug-in unit is quoted from the resource object set pointed by described resource module.
9. device according to claim 8, is characterized in that, described resource injection unit, when the injection of the routing information of plug-in resource is comprised the resource module of the routing information of container resource, specifically performs:
By reflection call-by mechanism, the routing information of described plug-in resource is added into the resource module of container, this resource module comprises the routing information of container resource; Or,
Create the resource module of plug-in unit, by reflection call-by mechanism, the routing information of the routing information of described plug-in resource and container resource is added into the resource module of described plug-in unit.
10. device according to claim 8 or claim 9, it is characterized in that, this device also comprises:
First judging unit, for when loading described plug-in unit, judge the routing information that whether there is described plug-in resource in described resource module, if not, then trigger described resource injection unit and perform the described operation injection of the routing information of plug-in resource being comprised the resource module of the routing information of container resource.
11. devices according to claim 8 or claim 9, it is characterized in that, this device also comprises:
Second judging unit, for when loading described plug-in unit, judge whether described plug-in unit comprises plug-in resource, if so, then trigger described resource injection unit and perform the described operation injection of the routing information of plug-in resource being comprised the resource module of the routing information of container resource.
12. devices according to claim 8, is characterized in that, this device also comprises:
Prefix reading unit, for when carrying out compiling packing to described plug-in unit, reads the resource prefix information in application configuration file, the resource prefix information that different plug-in unit is corresponding different, and plug-in unit different resource prefix information corresponding to container.
13. devices according to claim 8, is characterized in that, this device also comprises:
Resource lookup unit, for when carrying out compiling packing to described plug-in unit, according to the dependence handbag name in plug-in unit source code, searches the container resource that described plug-in unit is quoted.
14. devices according to claim 8, is characterized in that, this device also comprises:
Piece file mergence unit, for after the resource index file described plug-in unit being carried out to compiling packing generation plug-in unit, merges the resource index file of described plug-in unit and the resource index file of container.
CN201510526626.0A 2015-08-25 2015-08-25 A kind of resource transfer method and apparatus of plug-in unit Active CN105094849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510526626.0A CN105094849B (en) 2015-08-25 2015-08-25 A kind of resource transfer method and apparatus of plug-in unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510526626.0A CN105094849B (en) 2015-08-25 2015-08-25 A kind of resource transfer method and apparatus of plug-in unit

Publications (2)

Publication Number Publication Date
CN105094849A true CN105094849A (en) 2015-11-25
CN105094849B CN105094849B (en) 2019-05-28

Family

ID=54575377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510526626.0A Active CN105094849B (en) 2015-08-25 2015-08-25 A kind of resource transfer method and apparatus of plug-in unit

Country Status (1)

Country Link
CN (1) CN105094849B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874394A (en) * 2017-01-13 2017-06-20 百度在线网络技术(北京)有限公司 A kind of method and apparatus of file packing pretreatment
CN107870789A (en) * 2017-10-18 2018-04-03 福建天泉教育科技有限公司 A kind of method and terminal of plug-in unit of packing
CN111124526A (en) * 2018-11-01 2020-05-08 北京奇虎科技有限公司 Dependency management method, dependency management device, storage medium and computer equipment
CN114168294A (en) * 2021-12-10 2022-03-11 北京鲸鲮信息系统技术有限公司 Compilation resource allocation method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8769622B2 (en) * 2011-06-30 2014-07-01 International Business Machines Corporation Authentication and authorization methods for cloud computing security
CN104123151A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Plug-in management method and device for application program in mobile terminal and mobile terminal
CN104536776A (en) * 2014-11-28 2015-04-22 百度在线网络技术(北京)有限公司 Method and device for running plug-in application in plug-in running environment at host end

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8769622B2 (en) * 2011-06-30 2014-07-01 International Business Machines Corporation Authentication and authorization methods for cloud computing security
CN104123151A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Plug-in management method and device for application program in mobile terminal and mobile terminal
CN104536776A (en) * 2014-11-28 2015-04-22 百度在线网络技术(北京)有限公司 Method and device for running plug-in application in plug-in running environment at host end

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
兰雨晴等: "《从Windows到Linux的应用移植实现之浏览器应用技术篇》", 31 January 2014, 国防工业出版社 *
网友: "Resource Naming Convention for Android Library Projects", 《HTTP://IKRAMU.COM/BLOG/2013/01/20/RESOURCE-NAMING-CONVENTION-FOR-ANDROID-LIBRARY-PROJECTS/》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874394A (en) * 2017-01-13 2017-06-20 百度在线网络技术(北京)有限公司 A kind of method and apparatus of file packing pretreatment
CN106874394B (en) * 2017-01-13 2020-12-29 百度在线网络技术(北京)有限公司 File packaging preprocessing method and equipment
CN107870789A (en) * 2017-10-18 2018-04-03 福建天泉教育科技有限公司 A kind of method and terminal of plug-in unit of packing
CN107870789B (en) * 2017-10-18 2021-01-26 福建天泉教育科技有限公司 Method and terminal for packaging plug-ins
CN111124526A (en) * 2018-11-01 2020-05-08 北京奇虎科技有限公司 Dependency management method, dependency management device, storage medium and computer equipment
CN114168294A (en) * 2021-12-10 2022-03-11 北京鲸鲮信息系统技术有限公司 Compilation resource allocation method and device, electronic equipment and storage medium
CN114168294B (en) * 2021-12-10 2024-07-02 北京字节跳动网络技术有限公司 Method and device for distributing compiling resources, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105094849B (en) 2019-05-28

Similar Documents

Publication Publication Date Title
KR101736650B1 (en) Method and embedded device for loading driver
US10452363B2 (en) Methods and systems for evaluating bytecode in an on-demand service environment including translation of apex to bytecode
CN107045438B (en) Application top view processing method, device and component
US20140189662A1 (en) Extending A Development Environment
ES2733516T3 (en) Verification of limits at compile time for user-defined types
CN105046116B (en) Protect dex files not by the method for decompiling in android system
US20040015822A1 (en) Method and apparatus for dynamic assembly and verification of software components into flexible applications
US8843920B2 (en) Systems and methods for deferring software implementation decisions until load time
CN105094849A (en) Method and device for transferring resources of plug-in
CN110989976A (en) Web application componentization development method based on J2EE, storage medium and electronic device
CN104471557A (en) Optimized execution of dynamic languages
CN106775781B (en) Method and device for reducing application installation packages and electronic equipment
CN102455931A (en) Method and system for developing Android platform engineering
CN105630491A (en) Method and device for changing functions of program
CN104731622A (en) Application program loading method and device and mobile terminal
CN113312046A (en) Sub-application page processing method and device and computer equipment
CN108376066A (en) Code processing apparatus and code process method
CN109558121A (en) Development approach, device, equipment and the storage medium of interface drive program
CN106775916B (en) Method and device for reducing application installation packages and electronic equipment
CN112748946B (en) Application program installation file generation method and device, computing equipment and storage medium
CN112631656A (en) Intelligent contract optimization method and device based on source code
CN110941443A (en) Method and device for modifying file name in SDK and electronic equipment
Dageförde et al. An operational semantics for constraint-logic imperative programming
CN113177292B (en) Universal BIM secondary development implementation method and device
CN105393216B (en) Run-time memory is adjusted

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