CN105278942A - Component management method and apparatus - Google Patents

Component management method and apparatus Download PDF

Info

Publication number
CN105278942A
CN105278942A CN201410353837.4A CN201410353837A CN105278942A CN 105278942 A CN105278942 A CN 105278942A CN 201410353837 A CN201410353837 A CN 201410353837A CN 105278942 A CN105278942 A CN 105278942A
Authority
CN
China
Prior art keywords
target element
described target
library file
assembly
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410353837.4A
Other languages
Chinese (zh)
Other versions
CN105278942B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410353837.4A priority Critical patent/CN105278942B/en
Publication of CN105278942A publication Critical patent/CN105278942A/en
Application granted granted Critical
Publication of CN105278942B publication Critical patent/CN105278942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention discloses a component management method and apparatus, and belongs to the technical field of computers. The method comprises: determining a target component that needs to be loaded according to a currently run application; acquiring a library file corresponding to the target component; and dynamically loading the target component into the currently run application according to the library file corresponding to the target component. According to the component management method and apparatus disclosed by the present invention, the target component that needs to be loaded is determined, the library file corresponding to the target component is acquired, and the target component is dynamically loaded into the currently run application according to the library file corresponding to the target component. Since a component can be dynamically loaded according to needs when an application is run, management flexibility of the components can be improved, and the application can be less affected.

Description

Assembly management method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of assembly management method and device.
Background technology
Along with developing rapidly of computer technology, more and more wider by the range of application of application program process information.Wherein, application program, when process information, needs to use assembly corresponding to application program to process information usually.Thus how the assembly of application programs carries out managing is the key improving application program experience.
Correlation technique provides a kind of assembly management method, and the assembly in the method is fixing to be loaded in the application.During concrete enforcement, in the process of application development, assembly loads in the application with the form of code.Follow-up when managing assembly, because assembly is load fixation kit in the application, thus the operation of assembly is relevant to the current residing hardware environment of application program.If the current residing hardware environment of application program does not meet the service condition of the fixation kit loaded, then load the application program meeting compulsory withdrawal of this fixation kit, or the fixation kit loaded can collapse.
Realizing in process of the present invention, inventor finds that said method at least exists following problem:
Because assembly is the fixation kit loaded in the application; make when the current residing hardware environment of application program does not meet the service condition of the fixation kit loaded; the fixation kit loaded can directly collapse or load the application program meeting compulsory withdrawal of fixation kit; cause the dirigibility of said modules management method poor, the use impact of application programs is larger.
Summary of the invention
In order to solve the problem of prior art, embodiments provide a kind of assembly management method and device, described technical scheme is as follows:
On the one hand, provide a kind of assembly management method, described method comprises:
The target element needing to load is determined according to the application program of current operation;
Obtain the library file that described target element is corresponding;
Described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to described target element.
On the other hand, provide a kind of assembly management device, described device comprises:
Determination module, for determining the target element needing to load according to the application program of current operation;
Acquisition module, for obtaining library file corresponding to described target element;
Load-on module, is dynamically loaded into described target element in the application program of described current operation for the library file corresponding according to described target element.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By determining the target element needing to load, obtain the library file that target element is corresponding, described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to target element.Due to can when application program be run, dynamic load assembly as required, thus improve the managerial flexibility of assembly, reduce the impact of application programs.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of a kind of assembly management method according to an exemplary embodiment;
Fig. 2 is the process flow diagram of a kind of assembly management method according to an exemplary embodiment;
Fig. 3 is the structural representation of a kind of assembly management device according to an exemplary embodiment;
Fig. 4 is the structural representation of a kind of assembly management device according to an exemplary embodiment;
Fig. 5 is the structural representation of a kind of assembly management device according to an exemplary embodiment;
Fig. 6 is the structural representation of a kind of assembly management device according to an exemplary embodiment;
Fig. 7 is the structural representation of a kind of assembly management device according to an exemplary embodiment;
Fig. 8 is the structural representation of a kind of terminal according to an exemplary embodiment.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Due in correlation technique when Management Unit; the assembly loaded is the fixation kit in application program; make when the current residing hardware environment of application program does not meet the service condition of the fixation kit loaded; the fixation kit loaded can directly collapse or load the application program meeting compulsory withdrawal of fixation kit; cause the dirigibility of said modules management method poor, the use impact of application programs is larger.
In order to prevent above-mentioned situation, improve the dirigibility of assembly management, and reduce the impact of application programs, embodiments provide a kind of assembly management method, the method is applied to terminal, this terminal includes but not limited to mobile phone, computing machine, panel computer etc., and see Fig. 1, the method flow that the present embodiment provides comprises:
101: determine the target element needing to load according to the application program of current operation;
102: obtain the library file that target element is corresponding;
As a kind of embodiment, before obtaining library file corresponding to target element, also comprise:
The library file of each assembly is preserved in advance in this locality;
Obtain the library file that target element is corresponding, comprising:
The library file that target element is corresponding is obtained from the library file that this locality prestores.
103: target element is dynamically loaded in the application program of current operation by the library file corresponding according to target element.
As a kind of embodiment, after according to library file corresponding to target element target element being dynamically loaded in the application program of current operation, also comprise:
If successful loaded targets assembly, the component resources that initialized target assembly is corresponding, and after component resources initialization success, operational objective assembly.
As a kind of embodiment, after according to library file corresponding to target element target element being dynamically loaded in the application program of current operation, also comprise:
If the described target element of unsuccessful loading, then use the replaced function of described target element.
As a kind of embodiment, after operational objective assembly, also comprise:
Detect whether meet target element extract condition;
If detect meet target element extract condition, then target element out of service, and discharge component resources corresponding to target element.
As a kind of embodiment, detect whether meet target element extract condition, comprising:
Detect whether get target element extract instruction;
If what get target element extracts instruction, then what meet target element extracts condition.
As a kind of embodiment, detect whether meet target element extract condition, comprising:
Detect the operation demand whether current operating environment meets target element;
If current operating environment is less than the operation demand of foot-eye assembly, then what meet target element extracts condition.
The method that the present embodiment provides, by determining the target element needing to load, obtain the library file that target element is corresponding, described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to target element.Due to can when application program be run, dynamic load assembly as required, thus improve the managerial flexibility of assembly, reduce the impact of application programs.
Embodiments provide a kind of assembly management method, the method relates to terminal, in conjunction with the content in above-described embodiment, is illustrated the method that the present embodiment provides.See Fig. 2, the method flow that the present embodiment provides comprises:
201: determine the target element needing to load according to the application program of current operation;
The present embodiment does not need the mode of the target element loaded to do concrete restriction to determining according to the application program of current operation, include but not limited to: determine that the application program of current operation needs the function performed, the function performed as required determines the target element needing to load.Wherein, needing the quantity of the target element loaded can be one, also can be multiple, and the present embodiment is to needing the quantity of the target element loaded to do concrete restriction.
Such as, determine that the application program of current operation needs n-back test to be play video, then can load corresponding video playback assembly.At this, video playback assembly is the target element needing to load, and the number of target element is one.In addition, while broadcasting video, need to load video acceleration component toward contact, to accelerate video playback, namely video acceleration component is also for needing the target element loaded.Now, the number of target element is multiple.
202: obtain the library file that target element is corresponding;
The present embodiment does not do concrete restriction to the mode obtaining library file corresponding to target element, includes but not limited to: the library file preserving each assembly in advance in this locality; The library file that target element is corresponding is obtained from the library file that this locality prestores.Wherein, each target element correspond at least one library file, and the present embodiment does not do concrete restriction to the number of library file corresponding to each target element.
About the mode obtaining library file corresponding to target element in the library file prestored from this locality, the present embodiment does not do concrete restriction to this, includes but not limited to: obtain library file corresponding to target element in the library file prestored in this locality according to the attribute of target element.Wherein, the attribute of target element can comprise the mark etc. of target element, and the present embodiment does not do concrete restriction to this.
Such as, with the mark that the attribute of target element is target element, unique corresponding one of each target element is designated example, in advance the library file of each assembly is kept in this locality, due to the corresponding mark of each target element, the mark of each target element can be associated with corresponding library file.If desired obtain the library file that certain target element is corresponding, can search according to this locality that is identified at of this target element, thus obtain library file corresponding to mark.
It should be noted that, in said process, the library file of each assembly can be kept in local system firmware, as in the ROM (Read-OnlyMemory, read-only memory) of this locality, concrete restriction is done in the position that the present embodiment does not store in this locality the library file of each assembly.In addition, the library file of each assembly can also be packed and be put into APK (AndroidPacKage, Android installation kit), when needing installation kit to contain the APK of library file, solution can press out, and store simultaneously from APK.Wherein, can be stored in the system firmware in said process, can be stored in External memory equipment, the present embodiment does not do concrete restriction to this yet.
In addition, because target element is when being released to the system firmwares such as local ROM or External memory equipment, can be limited to device space size, whether installable file system is normally and whether have the conditions such as access limit, therefore, condition can be extracted according to above-mentioned conditional definition in advance.When loaded targets assembly, can first detect current whether meet extract condition, meet if current and extract condition, then now can use the replaced function of target element, namely target element can be performed the assembly of function of the same race or application program or systemic-function substitute, the present embodiment does not do concrete restriction to this.Wherein, about detecting the current mode whether meeting condition of extracting, the present embodiment does not do concrete restriction to this, include but not limited to: when being released to the system firmwares such as local ROM or External memory equipment at target element, whether enough detect corresponding device space size, if device space size is inadequate, then determine current meet extract condition; Or, checkout equipment file system whether in normal condition and whether have access limit, if installable file system not in normal condition or not there is access limit, then determine current meet extract condition.
203: target element is dynamically loaded in the application program of current operation by the library file corresponding according to target element;
Because target element is actually the process after run time version, and library file corresponding to target element contains corresponding code.Therefore, about the mode according to library file corresponding to target element target element is dynamically loaded in the application program of current operation, the present embodiment does not do concrete restriction to this, includes but not limited to: be loaded into by library file corresponding for target element in code corresponding to the application program of current operation.If the application program of current operation needs to use this target element, then can perform code in library file corresponding to this target element, thus target element has been dynamically loaded in the application program of current operation.
204: if successful loaded targets assembly, the component resources that initialized target assembly is corresponding, and after component resources initialization success, operational objective assembly;
By above-mentioned steps 203, target element can be dynamically loaded in the application program of current operation, if be successfully loaded with, then the component resources that initialized target assembly is corresponding.Wherein, component resources can comprise the context code of operational objective assembly needs, the hardware resource etc. of target element needs use, and the present embodiment does not do concrete restriction to this.The present embodiment does not do concrete restriction to the mode of component resources corresponding to initialized target assembly, includes but not limited to: the component resources type corresponding according to target element carries out initialization to component resources.Such as, when component resources is the context code of operational objective assembly needs, can context code be loaded in internal memory, to complete the initialization of component resources.When component resources is hardware resource printer, the initial parameter of printer can be reset, to complete the initialization of component resources.
Through said process, if after component resources initialization success, can operational objective assembly, to perform different functions.Such as, if target element is video playback assembly, then can run video playback assembly, to play video by this video playback assembly.
It should be noted that, there is the failed possibility of loading in the process due to loaded targets assembly in above-mentioned steps 203, therefore, when unsuccessful loaded targets assembly, then can use the replaced function of this target element equally.
Such as, if when the library file that target element is corresponding is loaded in code corresponding to the application program of current operation, having there is fault in the file system storing code corresponding to application program, or does not have write permission.Now, due to can not the library file of loaded targets assembly, thus the failure of loaded targets assembly can be caused, at this moment just can use the replaced function of this target element.Such as, for target element for a kind of audio frequency player module, when this audio frequency player module loads unsuccessfully, due to WindowsMediaPlayer audio frequency player module can be carried toward contact in Windows system, therefore, the audio frequency player module audio plays that can be carried by system, to load the function that failed audio frequency player module will perform before completing.Or target element can be a kind of browser, when this browser loads unsuccessfully, owing to can carry InternetExplorer browser toward contact in Windows system, thus the browser that system can be used to carry browses webpage for user.
In addition, also may there is failed situation in the component resources corresponding due to initialized target assembly in this step, and now, can use the replaced function of target element equally, detailed process with reference to foregoing, can repeat no more herein.By the replaced function of above-mentioned target element, the correctness of application program inherent logic can be ensured, thus application program to be loaded unsuccessfully or in other non-serviceable situation at target element, normally can to run and can not compulsory withdrawal, and then to improve the stability that application program runs.
Alternatively, in component resources initialization success, after operational objective assembly, can run mark for the target element of each operation arranges one, for representing that this target element has been successfully loaded and has run, the present embodiment does not do concrete restriction to this.
Alternatively, the method provided due to the present embodiment is dynamic load assembly, and assembly has extremely strong independence.Therefore, except the process of above-mentioned charging assembly, the present embodiment additionally provides a kind of method of dynamic offloading assembly, and detailed process refers to follow-up optional step.
205: detect whether meet target element extract condition;
Due to the situation that target element lost efficacy may be there is during operational objective assembly, therefore, condition is extracted when can pre-define operational objective assembly, and after operational objective assembly, detect and currently extract condition when whether meeting operational objective assembly, thus take follow-up treatment step according to testing result, to ensure the stability of application program.The present embodiment does not do concrete restriction to detecting the mode whether meeting the condition of extracting of target element, includes but not limited to the following two kinds detection mode:
The first detection mode: detect whether get target element extract instruction; If what get target element extracts instruction, then what meet target element extracts condition.
For the first detection mode, the present embodiment does not do concrete restriction to detecting the mode of extracting instruction whether getting target element, include but not limited to: Offered target assembly unload options in the application program of loaded targets assembly in advance, and show in the interactive interface of application program with the interactive form preset.When get user according to the unloading target element instruction of the unload options input in interactive interface after, the unloading target element instruction got is extracted instruction as target element.Wherein, interactive form can preset according to demand, and the present embodiment does not limit the interactive form preset.
Such as, the current target element loaded can be shown by the form of list in the interactive interface of application program, and a unload options is set after the list items that each target element is corresponding, as the form with button.When detecting that user clicks unload options button corresponding to certain target element, then that determines to have got this target element extracts instruction.
By said process, get target element extract instruction after, then testing result be meet target element extract condition.
The second detection mode: detect the operation demand whether current operating environment meets target element; If current operating environment is less than the operation demand of foot-eye assembly, then what meet target element extracts condition.
For the second detection mode, the operation demand of target element can operation resource needed for target element, and the present embodiment does not do concrete restriction to the content of target element operation demand.Such as, the memory source etc. of operational objective assembly needs.The present embodiment does not do concrete restriction to the mode whether detection current operating environment meets the operation demand of target element, include but not limited to: the operation demand of target element and current operating environment are compared whether meet the operation demand of target element according to comparative result determination current operating environment.
Such as, for the operation demand of target element for needing certain memory source, if the free memory resource that current operating environment is left is 50M (million), and the memory source that operational objective assembly needs is 100M.Both compared known, the free memory resource that current operating environment is left is the memory source being less than operational objective assembly needs, then now can determine the operation demand of current operating environment less than foot-eye assembly.
By said process, after the operation demand of current operating environment less than foot-eye assembly being detected, then testing result be meet target element extract condition.
206: if detect meet target element extract condition, then target element out of service, and discharge component resources corresponding to target element.
By above-mentioned steps 205, what meet target element if detect extracts condition, then can target element out of service, and discharges component resources corresponding to target element.Wherein, component resources corresponding when the component resources of release is initialized target assembly in above-mentioned steps 204, all components resource corresponding when can discharge initialization during release, also can release portion component resources, and the present embodiment does not do concrete restriction to this.
In addition, due in above-mentioned steps 204, after operational objective assembly, mark can be run for the target element of each operation arranges one.Therefore, operation mark that in this step can be corresponding by target element out of service is removed, and the present embodiment does not do concrete restriction to this.When systems axiol-ogy is to originally after the operation mark that the target element run is corresponding is eliminated, the replaced function of this target element can be used, to ensure the inherent logic of application program, detailed process can with reference to the content in above-mentioned steps 204, and the present embodiment does not do concrete restriction to this.
The method that the present embodiment provides, by determining the target element needing to load, obtain the library file that target element is corresponding, described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to target element.Due to can when application program be run, dynamic load assembly as required, thus improve the managerial flexibility of assembly, reduce the impact of application programs.
Embodiments provide a kind of assembly management device, the assembly management method that this device provides for performing above-described embodiment.See Fig. 3, this device comprises:
Determination module 301, for determining the target element needing to load according to the application program of current operation;
Acquisition module 302, for obtaining library file corresponding to target element;
Load-on module 303, is dynamically loaded into target element in the application program of current operation for the library file corresponding according to target element.
As a kind of embodiment, see Fig. 4, this device also comprises:
Memory module 304, for preserving the library file of each assembly in advance in this locality;
Acquisition module 302, obtains library file corresponding to target element in the library file that prestores from this locality.
As a kind of embodiment, see Fig. 5, this device also comprises:
Initialization module 305, for when successful loaded targets assembly, the component resources that initialized target assembly is corresponding;
Run module 306, for after component resources initialization success, operational objective assembly.
As a kind of embodiment, see Fig. 6, this device also comprises:
Processing module 307, for when unsuccessful loaded targets assembly, uses the replaced function of target element.
As a kind of embodiment, see Fig. 7, this device also comprises:
Detection module 308, for detect whether meet target element extract condition;
Stopping modular 309, for when detect meet target element extract condition time, then target element out of service;
Release module 310, for discharging component resources corresponding to target element.
As a kind of embodiment, detection module 308, for detect whether get target element extract instruction; If what get target element extracts instruction, then what meet target element extracts condition.
As a kind of embodiment, whether detection module 308, meet the operation demand of target element for detecting current operating environment; If current operating environment is less than the operation demand of foot-eye assembly, then what meet target element extracts condition.
The device that the present embodiment provides, by determining the target element needing to load, obtain the library file that target element is corresponding, described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to target element.Due to can when application program be run, dynamic load assembly as required, thus improve the managerial flexibility of assembly, reduce the impact of application programs.
Present embodiments provide a kind of terminal, this terminal may be used for performing the assembly management method provided in each embodiment above-mentioned.See Fig. 8, this terminal 800 comprises:
Terminal 800 can comprise RF (RadioFrequency, radio frequency) circuit 110, the storer 120 including one or more computer-readable recording mediums, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (WirelessFidelity, Wireless Fidelity) module 170, include the parts such as processor 180 and power supply 190 that more than or processes core.It will be understood by those skilled in the art that the restriction of the not structure paired terminal of the terminal structure shown in Fig. 8, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.Wherein:
RF circuit 110 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, transfer to more than one or one processor 180 to process; In addition, base station is sent to by relating to up data.Usually, RF circuit 110 includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupling mechanism, LNA (LowNoiseAmplifier, low noise amplifier), diplexer etc.In addition, RF circuit 110 can also by radio communication and network and other devices communicatings.Described radio communication can use arbitrary communication standard or agreement, include but not limited to GSM (GlobalSystemofMobilecommunication, global system for mobile communications), GPRS (GeneralPacketRadioService, general packet radio service), CDMA (CodeDivisionMultipleAccess, CDMA), WCDMA (WidebandCodeDivisionMultipleAccess, Wideband Code Division Multiple Access (WCDMA)), LTE (LongTermEvolution, Long Term Evolution), Email, SMS (ShortMessagingService, Short Message Service) etc.
Storer 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of storer 120 by running, thus performs the application of various function and data processing.Storer 120 mainly can comprise storage program district and store data field, and wherein, storage program district can store operating system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of terminal 800.In addition, storer 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, storer 120 can also comprise Memory Controller, to provide the access of processor 180 and input block 130 pairs of storeies 120.
Input block 130 can be used for the numeral or the character information that receive input, and produces and to arrange with user and function controls relevant keyboard, mouse, control lever, optics or trace ball signal and inputs.Particularly, input block 130 can comprise Touch sensitive surface 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on Touch sensitive surface 131 or near Touch sensitive surface 131 such as finger, stylus) thereon, and drive corresponding coupling arrangement according to the formula preset.Optionally, Touch sensitive surface 131 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 180, and the order that energy receiving processor 180 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize Touch sensitive surface 131.Except Touch sensitive surface 131, input block 130 can also comprise other input equipments 132.Particularly, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 140 can be used for the various graphical user interface showing information or the information being supplied to user and the terminal 800 inputted by user, and these graphical user interface can be made up of figure, text, icon, video and its combination in any.Display unit 140 can comprise display panel 141, optionally, the form such as LCD (LiquidCrystalDisplay, liquid crystal display), OLED (OrganicLight-EmittingDiode, Organic Light Emitting Diode) can be adopted to configure display panel 141.Further, Touch sensitive surface 131 can cover display panel 141, when Touch sensitive surface 131 detects thereon or after neighbouring touch operation, send processor 180 to determine the type of touch event, on display panel 141, provide corresponding vision to export with preprocessor 180 according to the type of touch event.Although in fig. 8, Touch sensitive surface 131 and display panel 141 be as two independently parts realize input and input function, in certain embodiments, can by Touch sensitive surface 131 and display panel 141 integrated and realize input and output function.
Terminal 800 also can comprise at least one sensor 150, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display panel 141, proximity transducer when terminal 800 moves in one's ear, can cut out display panel 141 and/or backlight.As the one of motion sensor, Gravity accelerometer can detect the size of all directions (are generally three axles) acceleration, size and the direction of gravity can be detected time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as passometer, knock) etc.; As for terminal 800 also other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and terminal 800.Voicefrequency circuit 160 can by receive voice data conversion after electric signal, be transferred to loudspeaker 161, by loudspeaker 161 be converted to voice signal export; On the other hand, the voice signal of collection is converted to electric signal by microphone 162, voice data is converted to after being received by voicefrequency circuit 160, after again voice data output processor 180 being processed, through RF circuit 110 to send to such as another terminal, or export voice data to storer 120 to process further.Voicefrequency circuit 160 also may comprise earphone jack, to provide the communication of peripheral hardware earphone and terminal 800.
WiFi belongs to short range wireless transmission technology, and terminal 800 can help user to send and receive e-mail by WiFi module 170, browse webpage and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 8 shows WiFi module 170, be understandable that, it does not belong to must forming of terminal 800, can omit in the scope of essence not changing invention as required completely.
Processor 180 is control centers of terminal 800, utilize the various piece of various interface and the whole mobile phone of connection, software program in storer 120 and/or module is stored in by running or performing, and call the data be stored in storer 120, perform various function and the process data of terminal 800, thus integral monitoring is carried out to mobile phone.Optionally, processor 180 can comprise one or more process core; Preferably, processor 180 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 180.
Terminal 800 also comprises the power supply 190 (such as battery) of powering to all parts, preferably, power supply can be connected with processor 180 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 190 can also comprise one or more direct current or AC power, recharging system, power failure detection circuit, power supply changeover device or the random component such as inverter, power supply status indicator.
Although not shown, terminal 800 can also comprise camera, bluetooth module etc., does not repeat them here.Specifically in the present embodiment, the display unit of terminal is touch-screen display, and terminal also includes storer, and one or more than one program, one of them or more than one program are stored in storer, and are configured to be performed by more than one or one processor.Described more than one or one routine package is containing the instruction for performing following operation:
The target element needing to load is determined according to the application program of current operation;
Obtain the library file that target element is corresponding;
Target element is dynamically loaded in the application program of current operation by the library file corresponding according to target element.
Suppose that above-mentioned is the first possible embodiment, then, in the embodiment that the second provided based on the embodiment that the first is possible is possible, in the storer of terminal, also comprise the instruction for performing following operation:
The library file of each assembly is preserved in advance in this locality;
Obtain the library file that target element is corresponding, comprising:
The library file that target element is corresponding is obtained from the library file that this locality prestores.
In the third the possible embodiment provided based on the embodiment that the first is possible, in the storer of terminal, also comprise the instruction for performing following operation:
If successful loaded targets assembly, the component resources that initialized target assembly is corresponding, and after component resources initialization success, operational objective assembly.
In the 4th kind of possible embodiment provided based on the embodiment that the first is possible, in the storer of terminal, also comprise the instruction for performing following operation:
If the described target element of unsuccessful loading, then use the replaced function of described target element.
In the 5th kind of possible embodiment provided based on the embodiment that the third is possible, in the storer of terminal, also comprise the instruction for performing following operation:
Detect whether meet target element extract condition;
If detect meet target element extract condition, then target element out of service, and discharge component resources corresponding to target element.
In the 6th kind of possible embodiment provided based on the 5th kind of possible embodiment, in the storer of terminal, also comprise the instruction for performing following operation:
Detect whether get target element extract instruction;
If what get target element extracts instruction, then what meet target element extracts condition.
In the 7th kind of possible embodiment provided based on the 5th kind of possible embodiment, in the storer of terminal, also comprise the instruction for performing following operation:
Detect the operation demand whether current operating environment meets target element;
If current operating environment is less than the operation demand of foot-eye assembly, then what meet target element extracts condition.
Terminal provided by the invention, by determining the target element needing to load, obtain the library file that target element is corresponding, described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to target element.Due to can when application program be run, dynamic load assembly as required, thus improve the managerial flexibility of assembly, reduce the impact of application programs.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium, and this computer-readable recording medium can be the computer-readable recording medium comprised in the storer in above-described embodiment; Also can be individualism, be unkitted the computer-readable recording medium allocated in terminal.This computer-readable recording medium stores more than one or one program, and this more than one or one program is used for execution by one or more than one processor and realizes assembly management method, and the method comprises:
The target element needing to load is determined according to the application program of current operation;
Obtain the library file that target element is corresponding;
Target element is dynamically loaded in the application program of current operation by the library file corresponding according to target element.
Suppose that above-mentioned is the first possible embodiment, then, in the embodiment that the second provided based on the embodiment that the first is possible is possible, before the library file that the described target element of described acquisition is corresponding, also comprise:
The library file of each assembly is preserved in advance in this locality;
Obtain the library file that target element is corresponding, comprising:
The library file that target element is corresponding is obtained from the library file that this locality prestores.
In the third the possible embodiment provided based on the embodiment that the first is possible, after described target element is dynamically loaded in the application program of described current operation by the described library file corresponding according to described target element, also comprise:
If successful loaded targets assembly, the component resources that initialized target assembly is corresponding, and after component resources initialization success, operational objective assembly.
In the 4th kind of possible embodiment provided based on the embodiment that the first is possible, after described target element is dynamically loaded in the application program of described current operation by the described library file corresponding according to described target element, also comprise:
If the described target element of unsuccessful loading, then use the replaced function of described target element.
In the 5th kind of possible embodiment provided based on the embodiment that the third is possible, after the described target element of described operation, also comprise:
Detect whether meet target element extract condition;
If detect meet target element extract condition, then target element out of service, and discharge component resources corresponding to target element.
Detect the condition of extracting whether meeting described target element described in the 6th kind of possible embodiment provided based on the 5th kind of possible embodiment, comprising:
Detect whether get target element extract instruction;
If what get target element extracts instruction, then what meet target element extracts condition.
Detect the condition of extracting whether meeting described target element described in the 7th kind of possible embodiment provided based on the 5th kind of possible embodiment, comprising:
Detect the operation demand whether current operating environment meets target element;
If current operating environment is less than the operation demand of foot-eye assembly, then what meet target element extracts condition.
The computer-readable recording medium that the embodiment of the present invention provides, by determining the target element needing to load, obtain the library file that target element is corresponding, described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to target element.Due to can when application program be run, dynamic load assembly as required, thus improve the managerial flexibility of assembly, reduce the impact of application programs.
Embodiments provide a kind of graphical user interface, described graphical user interface is used in terminal, and described terminal comprises touch-screen display, storer and one or more than one processor for performing one or more than one program; Described graphical user interface comprises:
The target element needing to load is determined according to the application program of current operation;
Obtain the library file that target element is corresponding;
Target element is dynamically loaded in the application program of current operation by the library file corresponding according to target element.
The graphical user interface that the embodiment of the present invention provides, by determining the target element needing to load, obtain the library file that target element is corresponding, described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to target element.Due to can when application program be run, dynamic load assembly as required, thus improve the managerial flexibility of assembly, reduce the impact of application programs.
It should be noted that: the assembly management device that above-described embodiment provides is when Management Unit, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by device is divided into different functional modules, to complete all or part of function described above.In addition, the assembly management device that above-described embodiment provides and assembly management embodiment of the method belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
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 done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. an assembly management method, is characterized in that, described method comprises:
The target element needing to load is determined according to the application program of current operation;
Obtain the library file that described target element is corresponding;
Described target element is dynamically loaded in the application program of described current operation by the library file corresponding according to described target element.
2. method according to claim 1, is characterized in that, before the library file that the described target element of described acquisition is corresponding, also comprises:
The library file of each assembly is preserved in advance in this locality;
The library file that the described target element of described acquisition is corresponding, comprising:
Library file corresponding to described target element is obtained from the library file that this locality prestores.
3. method according to claim 1, is characterized in that, the described library file corresponding according to described target element also comprises after being dynamically loaded into by described target element in the application program of described current operation:
If successfully load described target element, the component resources that target element described in initialization is corresponding, and after component resources initialization success, run described target element.
4. method according to claim 1, is characterized in that, the described library file corresponding according to described target element also comprises after being dynamically loaded into by described target element in the application program of described current operation:
If the described target element of unsuccessful loading, then use the replaced function of described target element.
5. method according to claim 3, is characterized in that, after the described target element of described operation, also comprises:
Detect whether meet described target element extract condition;
If detect meet described target element extract condition, then described target element out of service, and discharge component resources corresponding to described target element.
6. method according to claim 5, is characterized in that, what whether described detection met described target element extracts condition, comprising:
Detect whether get described target element extract instruction;
If what get described target element extracts instruction, then what meet described target element extracts condition.
7. method according to claim 5, is characterized in that, what whether described detection met described target element extracts condition, comprising:
Detect the operation demand whether current operating environment meets described target element;
If described current operating environment does not meet the operation demand of described target element, then what meet described target element extracts condition.
8. an assembly management device, is characterized in that, described device comprises:
Determination module, for determining the target element needing to load according to the application program of current operation;
Acquisition module, for obtaining library file corresponding to described target element;
Load-on module, is dynamically loaded into described target element in the application program of described current operation for the library file corresponding according to described target element.
9. device according to claim 8, is characterized in that, described device, also comprises:
Memory module, for preserving the library file of each assembly in advance in this locality;
Described acquisition module, obtains library file corresponding to described target element in the library file that prestores from this locality.
10. device according to claim 8, is characterized in that, described device, also comprises:
Initialization module, for when successfully loading described target element, the component resources that target element described in initialization is corresponding;
Run module, for after component resources initialization success, run described target element.
11. devices according to claim 8, is characterized in that, described device, also comprises:
Processing module, for when the described target element of unsuccessful loading, uses the replaced function of described target element.
12. devices according to claim 10, is characterized in that, described device, also comprises:
Detection module, for detect whether meet described target element extract condition;
Stopping modular, for when detect meet described target element extract condition time, described target element out of service;
Release module, for discharging component resources corresponding to described target element.
13. devices according to claim 12, is characterized in that, described detection module, for detect whether get described target element extract instruction; If what get described target element extracts instruction, then what meet described target element extracts condition.
14. devices according to claim 12, is characterized in that, whether described detection module meets the operation demand of described target element for detecting current operating environment; If described current operating environment does not meet the operation demand of described target element, then what meet described target element extracts condition.
CN201410353837.4A 2014-07-23 2014-07-23 Component management method and device Active CN105278942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410353837.4A CN105278942B (en) 2014-07-23 2014-07-23 Component management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410353837.4A CN105278942B (en) 2014-07-23 2014-07-23 Component management method and device

Publications (2)

Publication Number Publication Date
CN105278942A true CN105278942A (en) 2016-01-27
CN105278942B CN105278942B (en) 2020-11-06

Family

ID=55148004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410353837.4A Active CN105278942B (en) 2014-07-23 2014-07-23 Component management method and device

Country Status (1)

Country Link
CN (1) CN105278942B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132844A (en) * 2016-12-01 2018-06-08 腾讯科技(深圳)有限公司 Plug-in download method and device
CN108737324A (en) * 2017-04-13 2018-11-02 腾讯科技(深圳)有限公司 Generate the method, apparatus and relevant device, system of artificial intelligence serviced component
CN111258555A (en) * 2020-01-15 2020-06-09 上海知白智能科技有限公司 Software implementation device
CN112148342A (en) * 2019-06-27 2020-12-29 北京达佳互联信息技术有限公司 Component configuration method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6915511B2 (en) * 2001-05-22 2005-07-05 Sun Microsystems, Inc. Dynamic class reloading mechanism
CN101989203A (en) * 2010-01-05 2011-03-23 深圳中兴网信科技有限公司 Software component management system
CN102999352A (en) * 2012-11-15 2013-03-27 中国科学院声学研究所 Embedded system assembly loading method
CN103294457A (en) * 2012-02-27 2013-09-11 百度在线网络技术(北京)有限公司 Method and device for dynamically substituting C/C + + function in main program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6915511B2 (en) * 2001-05-22 2005-07-05 Sun Microsystems, Inc. Dynamic class reloading mechanism
CN101989203A (en) * 2010-01-05 2011-03-23 深圳中兴网信科技有限公司 Software component management system
CN103294457A (en) * 2012-02-27 2013-09-11 百度在线网络技术(北京)有限公司 Method and device for dynamically substituting C/C + + function in main program
CN102999352A (en) * 2012-11-15 2013-03-27 中国科学院声学研究所 Embedded system assembly loading method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132844A (en) * 2016-12-01 2018-06-08 腾讯科技(深圳)有限公司 Plug-in download method and device
CN108132844B (en) * 2016-12-01 2020-11-10 腾讯科技(深圳)有限公司 Plug-in downloading method and device
CN108737324A (en) * 2017-04-13 2018-11-02 腾讯科技(深圳)有限公司 Generate the method, apparatus and relevant device, system of artificial intelligence serviced component
CN108737324B (en) * 2017-04-13 2021-03-02 腾讯科技(深圳)有限公司 Method and device for generating artificial intelligence service assembly and related equipment and system
CN112148342A (en) * 2019-06-27 2020-12-29 北京达佳互联信息技术有限公司 Component configuration method and device, electronic equipment and storage medium
CN111258555A (en) * 2020-01-15 2020-06-09 上海知白智能科技有限公司 Software implementation device

Also Published As

Publication number Publication date
CN105278942B (en) 2020-11-06

Similar Documents

Publication Publication Date Title
CN107276789B (en) Log uploading method and device and computer readable storage medium
CN104134034B (en) Control the method and apparatus that application runs
CN103544033B (en) Method, device and associated equipment for rolling back application program
CN105320598A (en) Software testing method and device
CN104780164A (en) Method and device for operating game client
CN105278937A (en) Method and device for displaying pop-up box messages
CN103473163A (en) Application program detection method and device
CN104571787A (en) Message display method and communication terminal
CN104252341A (en) Method and device for resurfacing application program and client side device of application program
CN104065693A (en) Method, device and system for accessing network data in webpage applications
CN104850406A (en) Page switching method and device
CN104965722A (en) Method and apparatus for displaying information
CN103810004A (en) Method and device for upgrading embedded system as well as equipment
CN104778055A (en) Method and device for displaying progress bar
CN104572046A (en) Method for restoring stacks and computer system
CN105389259A (en) Method, apparatus and system for performing application testing
CN105094501A (en) Display method, device and system for messages in mobile terminal
CN103631625A (en) Data acquisition method, user terminal, server and system
CN104133752B (en) The method for supervising of operating platform and device
CN104699501A (en) Method and device for running application program
CN105278942A (en) Component management method and apparatus
CN104133693B (en) Installment state detection method, device and terminal
CN104243394A (en) Multimedia file playing method and device
CN106919458B (en) Method and device for Hook target kernel function
CN105278925A (en) Method and device for refuse cleaning of uninstalled software

Legal Events

Date Code Title Description
C06 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