CN110389791A - Component dispatching method, device, equipment and storage medium - Google Patents
Component dispatching method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN110389791A CN110389791A CN201910427905.XA CN201910427905A CN110389791A CN 110389791 A CN110389791 A CN 110389791A CN 201910427905 A CN201910427905 A CN 201910427905A CN 110389791 A CN110389791 A CN 110389791A
- Authority
- CN
- China
- Prior art keywords
- component
- assembly
- plug
- proxy
- information
- 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
-
- 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
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 embodiment of the present application provides a kind of component dispatching method, device, equipment and storage medium.Method includes: the corresponding relationship for obtaining M component proxy and N number of component in plug-in unit in plug-in system, wherein plug-in system is between plug-in unit and operating system, M < N.Securing component scheduling request, component scheduling request include the mark of the first assembly in N number of component.First assembly is dispatched according to the mark of corresponding relationship and first assembly.So as to reduce the hole position explosion issues of component proxy, and be conducive to the subsequent lasting extension of plug-in unit.
Description
Technical field
The invention relates to field of terminal technology more particularly to a kind of component dispatching method, device, equipment and storages
Medium.
Background technique
Currently, when issuing APP program or repairing APP program, being needed using the program terminal (Application, APP)
It wants user to re-download new version, may all be grown very much with the edition upgrading period and convergent tendency of more new and old edition and APP, this
Sample is bound to cause the waste to terminal resource.Based on this, plug-in unitization is applied and is given birth to.
Plug-in unit technology is initially derived from the idea for exempting from installation and operation Android installation kit (Android Package, APK), this
A APK for exempting from installation can be understood as plug-in unit, support the APP of plug-in unit that can load and run at runtime plug-in unit, so just
The functional modules being of little use some in APP or the core function that may need frequent dynamic update can be made into plug-in unit, one
Aspect can reduce the size of installation kit, and the dynamic expansion of APP function on the other hand may be implemented.
Usual plug-in unit includes multiple components, for example, four common at present big components include: Activity, Service,
BroadcastReceiver and ContentProvider.Since plug-in unit itself can not be run on an operating system,
Component proxy usually is established in APP program (also referred to as host) at present, corresponding component is called by component proxy.In
It in the prior art, is one-to-one relationship between component proxy and component, however since an APP program corresponds to multiple components,
And the hole position of APP program is limited, therefore this is bound to cause that component proxy is excessive, causes the hole position explosion issues of component proxy,
And limit the subsequent lasting extension of plug-in unit.
Summary of the invention
The embodiment of the present application provides a kind of component dispatching method, device, equipment and storage medium.So as to reduce component
The hole position explosion issues of agency, and be conducive to the subsequent lasting extension of plug-in unit.
In a first aspect, a kind of component dispatching method, comprising: obtain in plug-in system M component proxy and N number of group in plug-in unit
The corresponding relationship of part, wherein plug-in system is between plug-in unit and operating system, M < N.
Securing component scheduling request, component scheduling request include the mark of the first assembly in N number of component.It is closed according to corresponding
The mark of system and first assembly dispatches first assembly.
Wherein, since the number M of component proxy is less than the number of component N, i.e. component proxy pre-buried in APP program is opposite
The number of component proxy tails off in existing scheme, so as to reduce the hole position explosion issues of component proxy, and is conducive to
The subsequent lasting extension of plug-in unit.In addition, when component is Activity, since the quantity of Activity agency reduces, so as to
Compatible system rendering and Message Processing are acted on behalf of to reduce, and then system compatible adaptation issues can be reduced.
Optionally, the method also includes: in first assembly operational process, securing component information update request, component
Update the information that request includes: the second component.It is the information of the second component by the information update of first assembly, with out of service the
One component, and run the second component.Alternatively, securing component information update is asked during plug-in component operation belonging to first assembly
It asks, component updates the information that request includes: the second component.It is the information of the second component by the information update of first assembly, to stop
First assembly is only run, and runs the second component.So that the second component can use the occupied resource of first assembly, one
Aspect can save terminal device resource, on the other hand, can satisfy the unified effective compatible processing mechanism of start-up mode, and can
To reduce effective environment information when operation and the logic limitation of decision optimization processing when participating in the cintest.
Optionally, the information of any component includes at least one of the following: the life cycle of any component, readjustment result, opens
Dynamic model formula, status information.
Optionally, first assembly and the second component are two different Activity.
Optionally, N number of component belongs to same plug-in unit or different plug-in units.
Optionally, the method also includes: M component proxy is established in local host.It establishes M component proxy and inserts
The corresponding relationship of N number of component in part.Based on this, terminal device can dispatch component proxy according to the corresponding relationship, due to component
The number M of agency is less than the number of component N, i.e., component proxy pre-buried in APP program is relative to component proxy in existing scheme
Number tail off, so as to reduce the hole position explosion issues of component proxy, and be conducive to the subsequent lasting extension of plug-in unit.This
Outside, when component is Activity, since the quantity of Activity agency reduces, compatible system wash with watercolours is acted on behalf of so as to reduce
Dye and Message Processing, and then system compatible adaptation issues can be reduced.
Optionally, the method also includes: obtain the corresponding interface of first assembly;The interface is loaded onto first assembly pair
In the component proxy answered, to render the interface.I.e. without rendering interface by operating system, to alleviate the pressure of operating system
Power.
Terminal device, component dispatching device, storage medium and computer program product is described below.Its effect and reference are upper
The corresponding effect of embodiment of the method is stated, this is repeated no more.
Second aspect, the application provide a kind of terminal device, comprising: memory and processor, memory is based on storing
Calculation machine executable instruction.
Processor is used for: obtaining the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system, wherein is inserted
Part system is between plug-in unit and operating system, M < N.Securing component scheduling request, component scheduling request include in N number of component
The mark of first assembly.First assembly is dispatched according to the mark of corresponding relationship and first assembly.
Optionally, processor is also used to: in first assembly operational process, the request of securing component information update, component is more
New request includes: the information of the second component.It is the information of the second component by the information update of first assembly, with out of service first
Component, and run the second component.
Optionally, processor is also used to: during plug-in component operation belonging to first assembly, securing component information update is asked
It asks, component updates the information that request includes: the second component.It is the information of the second component by the information update of first assembly, to stop
First assembly is only run, and runs the second component.
Optionally, processor is also used to: M component proxy is established in local host.Establish M component proxy and plug-in unit
In N number of component corresponding relationship.
Optionally, processor is also used to: obtaining the corresponding interface of first assembly;It is corresponding that interface is loaded onto first assembly
In component proxy, to render interface.
The third aspect, the application provide a kind of component dispatching device, comprising: first obtain module, second obtain module and
Scheduler module.
First acquisition module is used to obtain the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system,
In, plug-in system is between plug-in unit and operating system, M < N.Second, which obtains module, is used for securing component scheduling request, component tune
Degree request includes the mark of the first assembly in N number of component.Scheduler module is used for the mark according to corresponding relationship and first assembly
Dispatch first assembly.
Fourth aspect, the application also provide a kind of storage medium, comprising: readable storage medium storing program for executing and computer instruction calculate
Machine instruction is stored in readable storage medium storing program for executing;Computer instruction is for realizing the component dispatching method.
5th aspect, the embodiment of the present application also provide a kind of program product, which includes computer instruction, with reality
Existing said modules dispatching method.
To sum up, the embodiment of the present application provides a kind of component dispatching method, device, equipment and storage medium.Method includes: to obtain
Take the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system, wherein plug-in system is located at plug-in unit and operation
Between system, M < N.Securing component scheduling request, component scheduling request include the mark of the first assembly in N number of component.According to
The mark of corresponding relationship and first assembly dispatches first assembly.Since the number M of component proxy is less than the number of component N, i.e. APP
Pre-buried component proxy tails off relative to the number of component proxy in existing scheme in program, so as to reduce component proxy
Position explosion issues are cheated, and are conducive to the subsequent lasting extension of plug-in unit.In addition, when component is Activity, due to Activity
The quantity of agency reduces, and acts on behalf of compatible system rendering and Message Processing so as to reduce, and then can reduce system compatible
Adaptation issues.It, can will alternatively, during plug-in component operation belonging to first assembly in addition, in first assembly operational process
The information update of first assembly is the information of the second component.So that the second component can use the occupied money of first assembly
On the one hand source can save terminal device resource, on the other hand, can satisfy the unified effective compatible processing mechanism of start-up mode,
And the logic limitation of effective environment information when operation and decision optimization processing when participating in the cintest can be reduced.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this Shen
Some embodiments please for those of ordinary skill in the art without any creative labor, can be with
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of schematic diagram for component dispatching method that one embodiment of the application provides;
Correspondence diagram of the Fig. 2 between one embodiment of the application component proxy provided and component;
Correspondence diagram of the Fig. 3 between another embodiment of the application component proxy provided and component;
Fig. 4 is a kind of schematic diagram for component dispatching method that another embodiment of the application provides;
Fig. 5 is a kind of schematic diagram for component dispatching method that the another embodiment of the application provides;
Fig. 6 is a kind of schematic diagram for component dispatching method that the application another embodiment provides;
Fig. 7 is a kind of structural schematic diagram for component dispatching device that one embodiment of the application provides;
Fig. 8 is a kind of structural schematic diagram for terminal device that one embodiment of the application provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art
All other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The fast lifting of quickly universal and mobile network's speed, resource etc. of intelligent terminal, has inspired various functions
The generation of different APP.However when issuing APP program or repairing APP program, user is needed to re-download new version, with
More new and old edition is bound to cause the waste to terminal resource in this way.As described above, plug-in unitization is applied and is given birth to.Usual plug-in unit includes
Multiple components, for example, at present common four big components include: Activity, Service, BroadcastReceiver and
ContentProvider.Since plug-in unit itself is not run really on an operating system, at present usually in APP journey
Component proxy is established in sequence (also referred to as host), corresponding component is called by component proxy.In the prior art, component
It is one-to-one relationship between agency and component, however since an APP program corresponds to multiple components, and APP program (should
APP program is embedded with component proxy) hole position it is limited, therefore this is bound to cause that component proxy is excessive, causes the hole of component proxy
Position explosion issues, and limit the subsequent lasting extension of plug-in unit.When component is Activity, it is simultaneous also to will cause excessive agency
The rendering of appearance system and Message Processing, to generate serious system compatible adaptation issues.
The application injects energy without static modification in line with to facilitate the effective compatible universal assembly function logic of plug-in card program
Concurrent development synchronous operation has been sheerly system standard application programming interface (Application Programming
Interface, API) facilitate user's specification develop principle.
In order to solve the above-mentioned technical problem, the application provides a kind of component dispatching method, device, equipment and storage medium.
Fig. 1 is a kind of schematic diagram for component dispatching method that one embodiment of the application provides, wherein the component dispatching method
Executing subject can be some or all of of terminal device, below by executing subject be terminal device for this method into
Capable explanation, wherein the terminal device has been currently installed on operating system, such as Android operation system or other operating systems, sheet
Apply without limitation, plug-in unit and the plug-in unit system of at least one APP and at least one APP are installed on the terminal device
System.As shown in Figure 1, the component dispatching method includes the following steps:
Step S101: terminal device obtains the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system,
Wherein, plug-in system is between plug-in unit and operating system, M < N.
Plug-in system is a kind of system between operating system and plug-in unit, so plug-in system to plug-in unit to will above mention
For the environment that a class can really be run, and to the lower legal operation identity that allow terminal device to approve plug-in unit, and provide correspondence
Support, thus generally plug-in system with respect to upper layer plug-in unit and underlying operating system for, can image analogy be a kind of height peace
Middle-agent's layer effect of complete " deceiving those above and hoodwinking those below ".In addition to this, plug-in system will also simulate true terminal device and further mention
" component dynamic proxy ", " device service adapter tube " and one plug-in unit of creation needed for really running for plug-in unit are able to copy true
" the plug-in component operation environment " of system operation.Based on this, need to carry out breakthrough expansion to following several core technologies, " Classloader "
(" ClassLoader "), " resource " (" recources "), " process initiation " (" SystemServer ") and " component "
(" Component "), the application introduce components, first the component core function bearer that is system, bearing system
Functional requirement rendering and interaction response processing, different components can have different core functions, but will there is different uses
Scene.
The scheduling problem of component is most important, in this application, M component proxy in plug-in system with it is N number of in plug-in unit
Component has corresponding relationship, wherein M < N, and M can be 1, as M=1, indicates that a component proxy can dispatch N number of component.
Optionally, N number of component belongs to same plug-in unit or different plug-in units.For example, Fig. 2 provides for one embodiment of the application
Component proxy and component between correspondence diagram inserting as shown in Fig. 2, a component proxy is pre-buried in host
There are N number of components, respectively component 1, component 2 ... component N in part 1.One component proxy and N number of component pair
It answers, as the arrow in Fig. 2 indicates corresponding relationship.Fig. 3 is between another embodiment of the application component proxy provided and component
Correspondence diagram, as shown in figure 3, a component proxy is pre-buried in host, there are N1 components in plug-in unit 1, respectively
For component 1, component 2 ... component N 1, there are N2 component, respectively component N 1+1, component N 1+2 ... component in plug-in unit 2
N1+N2, wherein N1+N2=N.One component proxy is corresponding with N number of component, closes as the arrow in Fig. 3 indicates corresponding
System.
It should be noted that the mechanism that above-mentioned M component proxy has corresponding relationship with component N number of in plug-in unit can be claimed
For Local Activity Manager mechanism, or it can consider that the corresponding relationship belongs to Local Activity Manager
A part of mechanism.
Step S102: terminal device securing component scheduling request, component scheduling request include the first assembly in N number of component
Mark.
Step S103: terminal device dispatches first assembly according to the mark of corresponding relationship and first assembly.
It is illustrated in conjunction with step S102 and step S103:
Wherein, the component scheduling request may include the respective mark of at least one first assembly, component scheduling request
For dispatching at least one described first assembly.The first assembly can be any one component in N number of component, first assembly
Mark may include at least one of following: the title of first assembly, the supplier of first assembly, first assembly version number with
And the life cycle of first assembly supports mark.
After terminal device gets the component scheduling request, terminal device determines each according to the corresponding relationship
The corresponding component proxy of first assembly, and the first assembly is dispatched by the component proxy.
For example, when terminal device gets the mark including component 1, terminal device determines in conjunction with shown in Fig. 2 or Fig. 3
The corresponding component proxy of component 1 component proxy as shown in the left side Fig. 2 or Fig. 3, at this moment terminal device passes through the component proxy
Dispatch the first assembly.
To sum up, the embodiment of the present application provides a kind of component dispatching method, comprising: terminal device obtains in plug-in system M
The corresponding relationship of N number of component in component proxy and plug-in unit, wherein plug-in system is between plug-in unit and operating system, M < N.Eventually
End equipment securing component scheduling request, component scheduling request include the mark of the first assembly in N number of component.Terminal device according to
The mark of corresponding relationship and first assembly dispatches first assembly.Wherein, since the number M of component proxy is less than the number of component N,
I.e. component proxy pre-buried in APP program tails off relative to the number of component proxy in existing scheme, so as to reduce component
The hole position explosion issues of agency, and be conducive to the subsequent lasting extension of plug-in unit.In addition, when component is Activity, due to
The quantity of Activity agency reduces, and acts on behalf of compatible system rendering and Message Processing so as to reduce, and then can reduce
System compatible adaptation issues.
Before above-mentioned steps S101, component dispatching method provided by the present application further include: establish M component proxy and insert
The corresponding relationship of N number of component in part.
Illustratively, Fig. 4 is a kind of schematic diagram for component dispatching method that another embodiment of the application provides, wherein the group
The executing subject of part dispatching method can be some or all of of terminal device, below by taking executing subject is terminal device as an example
This method is illustrated, wherein the terminal device has been currently installed on operating system, such as Android operation system or other behaviour
Make system, the application is without limitation, at least one APP and the plug-in unit of at least one APP are equipped on the terminal device
And plug-in system.As shown in figure 4, further including following steps before above-mentioned steps S101:
Step S401: terminal device establishes M component proxy in local host.
Step S402: terminal device establishes the corresponding relationship of N number of component in M component proxy and plug-in unit.
So-called " local host " refers to the APP program or APP that are mounted on terminal device local.M component of foundation
Act on behalf of Fig. 2 visible with the corresponding relationship of component N number of in plug-in unit or corresponding relationship shown in Fig. 3, wherein as shown in Fig. 2, a group
Part agency is pre-buried in host, and there are N number of components, respectively component 1, component 2 ... component N in plug-in unit 1.One group
Part agency is corresponding with N number of component, as the arrow in Fig. 2 indicates corresponding relationship.As shown in figure 3, a component proxy is pre-buried
In host, there are N1 components, respectively component 1, component 2 ... component N 1 in plug-in unit 1, and there are N2 in plug-in unit 2
Component, respectively component N 1+1, component N 1+2 ... component N 1+N2, wherein N1+N2=N.One component proxy with it is described
N number of component is corresponding, as the arrow in Fig. 3 indicates corresponding relationship.
Established in M component proxy and plug-in unit after the corresponding relationship of N number of component, terminal device can with Synchronization Component and
The life cycle of its corresponding component proxy.
In the embodiment of the present application: terminal device can establish M component proxy in local host.And establish M group
The corresponding relationship of part agency and N number of component in plug-in unit.Since the number M of component proxy is less than the number of component N, i.e. APP program
In pre-buried component proxy tail off relative to the number of component proxy in existing scheme, so as to reduce the hole position of component proxy
Explosion issues, and be conducive to the subsequent lasting extension of plug-in unit.In addition, when component is Activity, since Activity is acted on behalf of
Quantity reduce, so as to reduce act on behalf of compatible system rendering and Message Processing, and then can reduce system compatible adaptation
Problem.
On the basis of any of the above-described embodiment, present invention also provides the schemes of more New Parent.Illustratively, Fig. 5
For a kind of schematic diagram for component dispatching method that the another embodiment of the application provides, the wherein executing subject of the component dispatching method
It can be some or all of of terminal device, this method be illustrated so that executing subject is terminal device as an example below,
In the terminal device be currently installed on operating system, such as Android operation system or other operating systems, the application to this not
It is limited, the plug-in unit and plug-in system of at least one APP and at least one APP is installed on the terminal device.Such as Fig. 5 institute
Show, further include following steps after above-mentioned steps S103:
Step S501: in first assembly operational process, alternatively, during plug-in component operation belonging to first assembly, eventually
The request of end equipment securing component information update, component update the information that request includes: the second component.
Step S502: the information update of first assembly is the information of the second component by terminal device, with out of service first
Component, and run the second component.
Wherein, the information of any component includes at least one of the following: the life cycle of any component, readjustment result, starting
Mode, status information.
Assuming that installing terminal equipment is Android operation system, by taking component Activity as an example, to above-mentioned starting mould
Formula is illustrated:
Task stack in android system is similar to a container, for managing all Activity examples.It is storing
When Activity, meet principle first-in last-out.
It should be that each Activity specifies appropriate start-up mode according to specific demand in actual development.At present
Activity can be designated as any one following mode, standard, singleTop, singleTask and
SingleInstance is belonged in AndroidManifest.xml by the android:launchMode of Activity label
Start-up mode can be set in property.
1, standard mode standard
The default start-up mode of Activity, under standard mode, as soon as whenever starting new Activity, it
Task stack can be entered, and be in the position of stack top, for using the Activity of standard mode, system does not judge this
Activity whether there is in stack, and starting can all create a new example every time.
2, singleTop start-up mode
SingleTop start-up mode is similar with standard, unlike, when the Activity of starting has been positioned at stack top
When, thening be used directly, it does not create new example.If the Activity of starting when being not at stack top, create one it is new
Example is located at stack top.
3, singleTask mode
This mode is specified, which only exists an example.When starting the Activity every time, system can be examined first
It looks into stack with the presence or absence of the movable example, if it find that have existed the example that then be used directly, and by current Activity
On all Activity pop, a new example is created if not finding.
4, singleInstance mode
Activity only one example in the entire system, different above-mentioned Three models, the Activity meeting of this mode
Start a new task stack to manage this Activity.
When singleInstance mode loads Activity, no matter start the Activity from which task stack, only
It will create an Activity example, and will use a completely new task stack to load the Activity example.Using this
Kind mode starting Activity can be divided into following two situation, specific as follows:
The first: if Activity to be started is not present, system can first create a new task stack, then create this
The example of Activity, and stack top is added in the Activity.
Second: if Activity to be started has existed, no matter which application program or which task be located at
In stack.Task stack where the Activity can all be gone to foreground by system, so that the Activity be made to show.
The status information of any component includes: pause, is restarted or recovery state etc..
It should be noted that first assembly and the second component can be two different Activity.It is of course also possible to be
Two different Service, two different BroadcastReceiver or two different ContentProvider, this
Apply without limitation.
The purpose of information that the information update of first assembly is the second component is by terminal device: enabling the second component can be after
It is continuous to use the occupied some resources of first assembly.
Terminal device by the information update of first assembly be the second component information after, this can also be performed in terminal device
The corresponding all function treatments of second component and life cycle callback response processing etc..
The embodiment of the present application provides a kind of component dispatching method, wherein in first assembly operational process, alternatively, first
During plug-in component operation belonging to component, the request of terminal device securing component information update, it includes: second group that component, which updates request,
The information of part.The information update of first assembly is the information of the second component by terminal device, with first assembly out of service, and is transported
The second component of row.So that the second component can use the occupied resource of first assembly, it on the one hand can save terminal and set
On the other hand standby resource can satisfy the unified effective compatible processing mechanism of start-up mode, and effective when can reduce operation
The logic limitation of environmental information and decision optimization processing when participating in the cintest.
On the basis of any of the above-described embodiment, present invention also provides the schemes that render component corresponds to interface.Example
Property, Fig. 6 is the schematic diagram of a kind of component dispatching method that the application another embodiment provides, wherein the component dispatching method
Executing subject can be some or all of of terminal device, carry out so that executing subject is terminal device as an example to this method below
Illustrate, wherein the terminal device has been currently installed on operating system, such as Android operation system or other operating systems, this Shen
Please be without limitation, the plug-in unit and plug-in system of at least one APP and at least one APP are installed on the terminal device.
As shown in fig. 6, further including following steps after above-mentioned steps S103:
Step S601: terminal device obtains the corresponding interface of first assembly;
Step S602: interface is loaded onto the corresponding component proxy of first assembly by terminal device, to render interface.
It should be noted that in the present embodiment, the first assembly is an Activity.
Optionally, before step S601, terminal device obtains the render request to the corresponding interface of first assembly.It is based on
This, terminal device can obtain the corresponding interface of first assembly according to the render request.
Alternatively, after terminal device dispatches first assembly, without obtaining the render request, i.e., to the tune of first assembly
Degree event carrys out triggering terminal equipment and obtains the corresponding interface of first assembly.
Optionally, the mode that terminal device obtains the corresponding interface of first assembly includes: terminal device according in host
Local Activity Manager mechanism generates the corresponding interface of first assembly.
Optionally, after generating the corresponding interface of first assembly, which is loaded onto first assembly pair by terminal device
In the component proxy answered, to render the interface.
Optionally, after generating the corresponding interface of first assembly, terminal device can also be intercepted by component proxy should
Message on interface such as clicks certain icon, and the message intercepted is sent to operating system by the component proxy by terminal device,
Operating system generates corresponding response according to the message got, and the response is sent to component proxy, and terminal device passes through
Component proxy executes the response, such as opens the corresponding interface of above-mentioned icon.
To sum up, in the embodiment of the present application, the corresponding interface of the available first assembly of terminal device;And interface is loaded
To the corresponding component proxy of first assembly, to render interface.And terminal device is not necessarily to render interface by operating system, thus
The pressure of operating system can be alleviated.In addition, terminal device can also intercept the message on interface by component proxy, by this
The message intercepted is sent to operating system by component proxy, and operating system generates corresponding response according to the message got,
And the response is sent to component proxy, terminal device executes the response by component proxy, so that operating system only need to be to generation
It manages component and sends response, without obtaining above-mentioned message and executing the response, and then can further alleviate behaviour
Make the pressure of system.
Fig. 7 is a kind of structural schematic diagram for component dispatching device that one embodiment of the application provides, as shown in fig. 7, wherein
The component dispatching device can be some or all of of terminal device.The terminal device has been currently installed on operating system, such as
Android operation system or other operating systems, the application is without limitation, is equipped at least one on the terminal device
The plug-in unit and plug-in system of APP and at least one APP.As shown in fig. 7, the device includes:
First obtains module 71, and for obtaining, M component proxy in plug-in system is corresponding with component N number of in plug-in unit to be closed
System, wherein plug-in system is between plug-in unit and operating system, M < N.
Second obtains module 72, is used for securing component scheduling request, component scheduling request includes first group in N number of component
The mark of part.
Scheduler module 73, for dispatching first assembly according to the mark of corresponding relationship and first assembly.
Optionally, the device further include:
Third obtains module 74, for the plug-in component operation mistake in first assembly operational process or belonging to first assembly
Cheng Zhong, the request of securing component information update, component update the information that request includes: the second component.
Update module 75, for being the information of the second component by the information update of first assembly, with first group out of service
Part, and run the second component.
Optionally, first assembly and the second component are two different Activity.
Optionally, the information of any component includes at least one of the following: the life cycle of any component, readjustment result, opens
Dynamic model formula, status information.
Optionally, N number of component belongs to same plug-in unit or different plug-in units.
Optionally, described device further include:
First establishes module 76, for establishing M component proxy in local host.
Second establishes module 77, for establishing the corresponding relationship of N number of component in M component proxy and plug-in unit.
Component dispatching device provided by the embodiments of the present application can be used for executing above-mentioned component dispatching method, in
Hold and effect can refer to embodiment part, this is repeated no more.
Fig. 8 is a kind of structural schematic diagram for terminal device that one embodiment of the application provides, which is currently installed on
There is operating system, such as Android operation system or other operating systems, the application is without limitation, on the terminal device
The plug-in unit and plug-in system of at least one APP and at least one APP are installed.As shown in figure 8, the terminal device includes: to deposit
Reservoir 81 and processor 82, memory 81 is for storing computer executable instructions.
Processor 82 is used for: obtaining the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system, wherein
Plug-in system is between plug-in unit and operating system, M < N.Securing component scheduling request, component scheduling request include in N number of component
First assembly mark.First assembly is dispatched according to the mark of corresponding relationship and first assembly.
Optionally, processor 82 is also used to: in first assembly operational process, the request of securing component information update, and component
Update the information that request includes: the second component.It is the information of the second component by the information update of first assembly, with out of service the
One component, and run the second component.
Optionally, processor 82 is also used to: during plug-in component operation belonging to first assembly, securing component information update
Request, component update the information that request includes: the second component.It is the information of the second component by the information update of first assembly, with
First assembly out of service, and run the second component.
Optionally, the information of any component includes at least one of the following: the life cycle of any component, readjustment result, opens
Dynamic model formula, status information.
Optionally, N number of component belongs to same plug-in unit or different plug-in units.
Optionally, first assembly and the second component are two different Activity.
Optionally, processor 82 is also used to: M component proxy is established in local host.It establishes M component proxy and inserts
The corresponding relationship of N number of component in part.
It should be understood that processor 82 can be central processing unit (English: Central Processing Unit, referred to as:
CPU), it can also be other general processors, digital signal processor (English: Digital Signal Processor, letter
Claim: DSP), specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC)
Deng.General processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with the application
The step of method disclosed in embodiment, can be embodied directly in hardware processor and execute completion, or with the hardware in processor
And software module combination executes completion.
Optionally, terminal device further include: transceiver 83, the transceiver 83 between other equipment for carrying out data
Transmission.
Terminal device provided by the embodiments of the present application, can be used for executing above-mentioned component dispatching method, content and
Effect can refer to embodiment part, repeat no more to this.
The application also provides a kind of storage medium, comprising: readable storage medium storing program for executing and computer instruction, computer instruction storage
In readable storage medium storing program for executing;Computer instruction is for realizing component dispatching method described in aforementioned either method embodiment.
The embodiment of the present application also provides a kind of program product, which includes computer instruction (i.e. computer journey
Sequence), to realize said modules dispatching method.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes: read-only memory (English
Text: read-only memory, abbreviation: ROM), RAM, flash memory, hard disk, solid state hard disk, tape (English: magnetic
Tape), floppy disk (English: floppy disk), CD (English: optical disc) and any combination thereof.
Finally, it should be noted that the above various embodiments is only to illustrate the technical solution of the application, rather than its limitations;To the greatest extent
Pipe is described in detail the application referring to foregoing embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, each embodiment technology of the application that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (18)
1. a kind of component dispatching method characterized by comprising
Obtain the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system, wherein the plug-in system is located at
Between the plug-in unit and operating system, M < N;
Securing component scheduling request, the component scheduling request include the mark of the first assembly in N number of component;
The first assembly is dispatched according to the mark of the corresponding relationship and the first assembly.
2. the method according to claim 1, wherein further include:
In the first assembly operational process, the request of securing component information update, it includes: second group that the component, which updates request,
The information of part;
It is the information of second component by the information update of the first assembly, with the first assembly out of service, and transports
Row second component.
3. the method according to claim 1, wherein further include:
During the plug-in component operation belonging to the first assembly, securing component information update request, the component updates request
It include: the information of the second component;
It is the information of second component by the information update of the first assembly, with the first assembly out of service, and transports
Row second component.
4. according to the method in claim 2 or 3, which is characterized in that the information of any component includes at least one of the following: institute
State life cycle, the readjustment result, start-up mode, status information of any component.
5. method according to claim 1-3, which is characterized in that N number of component belong to same plug-in unit or
Different plug-in units.
6. method according to claim 1-3, which is characterized in that
The M component proxy is established in local host;
Establish the corresponding relationship of N number of component in the M component proxy and plug-in unit.
7. according to the method in claim 2 or 3, which is characterized in that the first assembly and second component are two
Different Activity.
8. method according to claim 1-3, which is characterized in that when the first assembly is Activity,
The method also includes:
Obtain the corresponding interface of the first assembly;
The interface is loaded onto the corresponding component proxy of the first assembly, to render the interface.
9. a kind of terminal device characterized by comprising memory and processor, the memory can for storing computer
It executes instruction;
The processor is used for:
Obtain the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system, wherein the plug-in system is located at
Between the plug-in unit and operating system, M < N;
Securing component scheduling request, the component scheduling request include the mark of the first assembly in N number of component;
The first assembly is dispatched according to the mark of the corresponding relationship and the first assembly.
10. terminal device according to claim 9, which is characterized in that the processor is also used to:
In the first assembly operational process, the request of securing component information update, it includes: second group that the component, which updates request,
The information of part;
It is the information of second component by the information update of the first assembly, with the first assembly out of service, and transports
Row second component.
11. terminal device according to claim 9, which is characterized in that the processor is also used to:
During the plug-in component operation belonging to the first assembly, securing component information update request, the component updates request
It include: the information of the second component;
It is the information of second component by the information update of the first assembly, with the first assembly out of service, and transports
Row second component.
12. terminal device described in 0 or 11 according to claim 1, which is characterized in that the information of any component include it is following at least
One: life cycle, the readjustment result, start-up mode, status information of any component.
13. according to the described in any item terminal devices of claim 9-11, which is characterized in that N number of component belongs to same insert
Part or different plug-in units.
14. according to the described in any item terminal devices of claim 9-11, which is characterized in that the processor is also used to:
The M component proxy is established in local host;
Establish the corresponding relationship of N number of component in the M component proxy and plug-in unit.
15. terminal device described in 0 or 11 according to claim 1, which is characterized in that the first assembly and second component
It is two different Activity.
16. according to the described in any item terminal devices of claim 9-11, which is characterized in that the processor is also used to:
Obtain the corresponding interface of the first assembly;
The interface is loaded onto the corresponding component proxy of the first assembly, to render the interface.
17. a kind of component dispatching device characterized by comprising
First obtains module, for obtaining the corresponding relationship of M component proxy and N number of component in plug-in unit in plug-in system, wherein
The plug-in system is between the plug-in unit and operating system, M < N;
Second obtains module, is used for securing component scheduling request, the component scheduling request includes first in N number of component
The mark of component;
Scheduler module, for dispatching the first assembly according to the mark of the corresponding relationship and the first assembly.
18. a kind of storage medium characterized by comprising readable storage medium storing program for executing and computer instruction, the computer instruction are deposited
Storage is in the readable storage medium storing program for executing;The computer instruction is for realizing the described in any item component scheduling of claim 1 to 8
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910427905.XA CN110389791B (en) | 2019-05-22 | 2019-05-22 | Component scheduling method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910427905.XA CN110389791B (en) | 2019-05-22 | 2019-05-22 | Component scheduling method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110389791A true CN110389791A (en) | 2019-10-29 |
CN110389791B CN110389791B (en) | 2023-01-24 |
Family
ID=68285330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910427905.XA Active CN110389791B (en) | 2019-05-22 | 2019-05-22 | Component scheduling method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110389791B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116016676A (en) * | 2022-12-09 | 2023-04-25 | 北京奇艺世纪科技有限公司 | Method, device, equipment and medium for operating data in plug-in |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN104134034A (en) * | 2013-06-13 | 2014-11-05 | 腾讯科技(深圳)有限公司 | Application operation control method and device |
CN107092531A (en) * | 2017-03-10 | 2017-08-25 | 联想(北京)有限公司 | Computational frame, electronic equipment and information processing method |
CN107220083A (en) * | 2017-05-22 | 2017-09-29 | 韩皓 | Exempt from the method and system of installation and operation application program in a kind of Android system |
US20190098089A1 (en) * | 2017-09-26 | 2019-03-28 | Verizon Patent And Licensing Inc. | Distribution hub for internet-of-things data |
-
2019
- 2019-05-22 CN CN201910427905.XA patent/CN110389791B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104134034A (en) * | 2013-06-13 | 2014-11-05 | 腾讯科技(深圳)有限公司 | Application operation control method and device |
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 |
CN107092531A (en) * | 2017-03-10 | 2017-08-25 | 联想(北京)有限公司 | Computational frame, electronic equipment and information processing method |
CN107220083A (en) * | 2017-05-22 | 2017-09-29 | 韩皓 | Exempt from the method and system of installation and operation application program in a kind of Android system |
US20190098089A1 (en) * | 2017-09-26 | 2019-03-28 | Verizon Patent And Licensing Inc. | Distribution hub for internet-of-things data |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116016676A (en) * | 2022-12-09 | 2023-04-25 | 北京奇艺世纪科技有限公司 | Method, device, equipment and medium for operating data in plug-in |
Also Published As
Publication number | Publication date |
---|---|
CN110389791B (en) | 2023-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10292044B2 (en) | Apparatus for end-user transparent utilization of computational, storage, and network capacity of mobile devices, and associated methods | |
CN101097527B (en) | Flowpath scheduling method and system of application progress | |
KR101574366B1 (en) | Synchronizing virtual machine and application life cycles | |
JP5496683B2 (en) | Customization method and computer system | |
US7979869B2 (en) | Method and system for performing I/O operations using a hypervisor | |
US20160285958A1 (en) | Application container for live migration of mobile applications | |
US20060253844A1 (en) | Computer architecture and method of operation for multi-computer distributed processing with initialization of objects | |
US20100223217A1 (en) | Dynamic computation of optimal placement for services in a distributed computing system | |
KR20040086214A (en) | Enhanced runtime hosting | |
WO2012131507A1 (en) | Running a plurality of instances of an application | |
CN109471743A (en) | Log collecting method, device and computer readable storage medium | |
CN102789305A (en) | Postponing suspend | |
CN101765225A (en) | Virtual cluster management system and cluster node | |
CN102279765A (en) | Pre-compiling hosted managed code | |
US8458693B2 (en) | Transitioning from static to dynamic cluster management | |
CN103885833A (en) | Method and system for managing resources | |
US9009740B2 (en) | Invocation of additional processing using remote procedure calls | |
CN107239313A (en) | The upgrade method and storage medium of Spring application services | |
Cannella et al. | Adaptivity support for MPSoCs based on process migration in polyhedral process networks | |
CN103473034A (en) | Method and device for dynamically publishing Web service | |
CN107463404A (en) | Increase the method and system of configuration file in a kind of system to virtual machine file | |
CN110389791A (en) | Component dispatching method, device, equipment and storage medium | |
CN109660688A (en) | Information processing unit and its control method | |
CN109189573A (en) | A kind of isomery internal storage management system based on NVDIMM | |
CN112286638A (en) | Method for realizing hot plug between CPU and memory of Openstack virtual machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |