CN107220074A - To the access of supporting layer software function, upgrade method and device - Google Patents
To the access of supporting layer software function, upgrade method and device Download PDFInfo
- Publication number
- CN107220074A CN107220074A CN201610162733.4A CN201610162733A CN107220074A CN 107220074 A CN107220074 A CN 107220074A CN 201610162733 A CN201610162733 A CN 201610162733A CN 107220074 A CN107220074 A CN 107220074A
- Authority
- CN
- China
- Prior art keywords
- supporting layer
- programe
- dynamic updating
- dynamic
- function
- 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 OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/62—Uninstallation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
This application discloses a kind of access method and device to supporting layer software function, a kind of upgrade method and device to supporting layer software function, and a kind of management method and device to supporting layer dynamic updating programe are also disclosed.The access method to supporting layer software function includes:Receive access request of the application program to supporting layer functional interface;Perform the upgrade code corresponding to the functional interface;Wherein, the dynamic updating programe comprising the upgrade code merges mechanism by process and is previously implanted into supporting layer service processes, and the function of the functional interface realizes that code is arranged to the upgrade code.The above method, after access request of the application program to functional interface is received, perform the upgrade code for merging mechanism injection using process, i.e., in the case where no use tradition OTA modes are upgraded, the supporting layer software function that application program can be still had access to after upgrading, so as to provide the user more perfect function in time.
Description
Technical field
The application is related to systems software technology, and in particular to a kind of access method to supporting layer software function and
Device.The application is related to a kind of upgrade method and device to supporting layer software function simultaneously, and a kind of right
The management method and device of supporting layer dynamic updating programe.
Background technology
The system software upgrading of operation on the mobile apparatus generally uses OTA (Over-The-Air) online updating
Mode, in this way, mobile-device software development side usually require maintenance release change history, be
Mobile device makes the full dose and increment AKU between each version and is pushed to the use for using mobile device
Family.Wherein, increment AKU requires that software development side safeguards the difference between all versions, and is each version
Difference AKU is provided, rapid yet with the system software development and change on mobile device, user is using
After a period of time, the issued multiple versions of system software are generally difficult to match latest edition and current version
This difference bag, can only update the upgrading of full dose bag.Therefore obtain full dose AKU carry out system software upgrading into
To be a kind of commonplace by the way of.
The system software of mobile device is generally using the structure of layering, wherein generally comprising application program offer
The supporting layer software of service, there is provided be due to assume responsibility for as application builds running environment for supporting layer software
The important duty of system service, with stronger upgrade requirement.With Mobile operating system Android or YunOS
Exemplified by, the supporting layer for providing service for application program typically refers to ccf layer (framework), and ccf layer is included
A series of components needed for development and application program, each component can realize one group of function (for example:With dialling
The function etc. for correlation of making a phone call) and corresponding functional interface (i.e. API) is externally provided.Application program needs reality
The functional interface of ccf layer offer can be accessed during existing a certain function according to demand, then basis is received ccf layer
Request, perform current mounted ccf layer functional interface realizes code.
Based on the above-mentioned conventional access mode to supporting layer functional interface, in order that application program is able to access that
Supporting layer software function after upgrading, it usually needs the full dose AKU of download system software is installed.
There is situations below in practical application:
1) volume of full dose AKU is generally larger, is arrived hundreds of million between a few GB bytes, often occur because
Cause to download the situation for updating failure for mobile device memory space inadequate;
2) there is larger difference in modification of the different mobile-device software development sides to ccf layer software, for example:Work(
Energy interface quantity and internal realize all may be different, and therefore, it is difficult to use unified system software update version
The supporting layer software function of this different train to different or identical producer is upgraded.
As can be seen here, because traditional OTA modes have above mentioned problem, supporting layer software function can not generally be obtained
To upgrading in time, the supporting layer software function that application program can not have access to after upgrading in time naturally causes
The function that application program can be realized is restricted, and influences the usage experience of user.
The content of the invention
The embodiment of the present application provides a kind of access method and device to supporting layer software function, to solve OTA
Under upgrading mode, the supporting layer software function that application program can not have access to after upgrading in time causes to apply journey
The problem of sequence realizes function limitation.The embodiment of the present application also provides a kind of upgrading side to supporting layer software function
Method and device, and a kind of management method and device to supporting layer dynamic updating programe.
The application provides a kind of access method to supporting layer software function, including:
Receive access request of the application program to supporting layer functional interface;
Perform the upgrade code corresponding to the functional interface;
Wherein, dynamic updating programe comprising the upgrade code by process merge mechanism be previously implanted to
In supporting layer service processes, and the function of the functional interface realizes that code is arranged to the upgrade code.
Optionally, methods described also includes:
The implementing result of the upgrade code is returned into the application program.
Optionally, the supporting layer includes:Ccf layer;The supporting layer functional interface includes:The framework
The functional interface that component in layer is provided.
Optionally, the dynamic updating programe comprising the upgrade code merges mechanism by process and is injected into branch
Support in layer service processes, including:
In the configuration file of the dynamic updating programe, the process name of the operation dynamic updating programe is specified
Claim consistent with the supporting layer service processes;
The dynamic updating programe is run, to be injected into the supporting layer service processes.
Optionally, the function of the functional interface realizes that code is arranged to the upgrade code, is to use Hook
What mode was realized.
Optionally, during the upgrade code corresponding to the functional interface is performed, in addition to:Call
The Function Extension interface that the Function Extension program run outside the supporting layer service processes is provided.
Optionally, to the call operation of the Function Extension interface, realized by inter-process communication mechanisms.
Optionally, the dynamic updating programe, is to install obtain, be used for from service end in host system
The executable program generated after the dynamic update software kit for supporting layer software function of upgrading.
Optionally, during the upgrade code corresponding to the functional interface is performed, in addition to:Call
The Function Extension that the Function Extension program of dynamic load operating is provided outside the supporting layer service processes connects
Mouthful;
The Function Extension program, is generated in host system after installation function extended software bag executable
Program, the Function Extension software kit is obtained in the lump when being and obtaining the dynamic update software kit from the service end
Take.
Accordingly, the application also provides a kind of access mechanism to supporting layer software function, including:
Access request receiving unit, for receiving access request of the application program to supporting layer functional interface;
Upgrade code execution unit, for performing the upgrade code corresponding to the functional interface, wherein, bag
Dynamic updating programe containing the upgrade code by process merge mechanism be previously implanted to supporting layer service into
Cheng Zhong, and the function of the functional interface realizes that code is arranged to the upgrade code.
Optionally, described device also includes:
Implementing result returning unit, it is described for the implementing result of the upgrade code execution unit to be returned to
Application program.
Optionally, the upgrade code execution unit, specifically for performing the liter corresponding to the functional interface
Level code, and the work(run outside supporting layer service processes is invoked at during the upgrade code is performed
The Function Extension interface that energy extender is provided.
Optionally, the upgrade code execution unit, specifically for being realized by inter-process communication mechanisms to institute
State calling for Function Extension interface.
In addition, the application also provides a kind of upgrade method to supporting layer software function, including:
Operation includes the dynamic updating programe of upgrade code, and merges mechanism by the dynamic update by process
Program is injected into supporting layer service processes;
The function of supporting layer functional interface to be upgraded is realized that code is set to corresponding upgrade code.
Optionally, the supporting layer includes:Ccf layer.
Optionally, it is described to run the dynamic updating programe for including upgrade code, and will by process merging mechanism
The dynamic updating programe is injected into supporting layer service processes, is realized in the following way:
In the configuration file of the dynamic updating programe, preassign and run entering for the dynamic updating programe
Journey title is consistent with the supporting layer service processes;
The dynamic updating programe is run, to be injected into the supporting layer service processes.
Optionally, the function of supporting layer functional interface to be upgraded is realized that code is set to corresponding upgrade code
The step of, realized using Hook modes.
Optionally, methods described is triggered in system initialisation phase by the supporting layer service processes and performed.
Optionally, the supporting layer service processes trigger this method in the following way in system initialisation phase
Perform:
The dynamic updating programe is in advance to the following demand of system registry:Reception system initial phase it is default
Message;
The supporting layer service processes broadcast the presetting message in system initialisation phase, and according to described dynamic
The state ROMPaq demand registered in advance, triggering this method are performed.
Optionally, the presetting message of the system initialisation phase includes:Start completion message.
Optionally, methods described also includes:
Start it is being run outside the supporting layer service processes, function be provided for the dynamic updating programe expanded
Open up the Function Extension program of service.
Optionally, before triggering this method is performed, including:
Software kit, which is sent, to service end obtains request, software of the acquisition request for supporting layer software function of upgrading
Bag;
The acquisition of information software kit provided according to service end, wherein at least includes dynamic update software kit;
By installing the software kit obtained, generation at least includes the executable program of the dynamic updating programe.
Optionally, in the step of acquisition of information software kit provided according to service end described, acquisition is not only
Including the dynamic update software kit, in addition to Function Extension software kit;
The executable program that the installation kit obtained by installing is generated, not only including the dynamic update
Program, in addition to provide the Function Extension program that Function Extension is serviced for the dynamic updating programe.
Accordingly, the application also provides a kind of update device to supporting layer software function, including:
Upgrade code injection unit, for running the dynamic updating programe for including upgrade code, and passes through process
The dynamic updating programe is injected into supporting layer service processes by merging mechanism;
Upgrade code replacement unit, for the function of supporting layer functional interface to be upgraded to be realized into code is set to
Corresponding upgrade code.
Optionally, the upgrade code injection unit is specifically in the configuration text of the dynamic updating programe
In part, the process title for preassigning the operation dynamic updating programe is consistent with supporting layer service processes;Fortune
The row dynamic updating programe, to be injected into the supporting layer service processes.
Optionally, the upgrade code replacement unit, is treated supporting layer specifically for being realized using Hook modes
The function of upgrade function interface realizes that code is set to corresponding upgrade code.
Optionally, described device includes:
Working cell is triggered, the upgrading is triggered in system initialisation phase for the supporting layer service processes
Code injection cell operation.
Optionally, the triggering working cell includes:
Message registration subelement is received, for the dynamic updating programe in advance to the following demand of system registry:
The presetting message of reception system initial phase;
Message broadcasts subelement, broadcasts described pre- in system initialisation phase for the supporting layer service processes
If message, and noted according to the dynamic updating programe demand registered in advance, the triggering upgrade code
Enter cell operation.
Optionally, described device also includes:
Function Extension program start unit, for start it is being run outside the supporting layer service processes, be
The dynamic updating programe provides the Function Extension program of Function Extension service.
Optionally, described device also includes executable program generation unit;The unit includes:
Software kit asks subelement, obtains request for sending software kit to service end, acquisition request is used to rise
The software kit of level supporting layer software function;
Software kit obtains subelement, for the acquisition of information software kit provided according to service end, wherein at least bag
Include dynamic update software kit;
Software kit installs subelement, for by installing the software kit obtained, generation at least to include described dynamic
The executable program of state ROMPaq.
Optionally, the software kit obtains subelement, is moved specifically for the acquisition of information provided according to service end
State upgrading software kit and Function Extension software kit;
The software kit installs subelement, specifically for by installing the software kit obtained, generating described dynamic
State ROMPaq and Function Extension program.
In addition, the application also provides a kind of management method to supporting layer dynamic updating programe, including:
Judge whether the dynamic updating programe for supporting layer software function of upgrading is compatible with host system;
If incompatible, the dynamic updating programe is unloaded.
Optionally, it is described judge for supporting layer software function of upgrading dynamic updating programe whether with host be
System is compatible, including:
Judge that the upgrade code included with the dynamic updating programe performs whether dynamic replacement operation returns to sign
Successful result is operated, if it is not, then judging that the dynamic updating programe and host system are incompatible.
Optionally, it is described judge for supporting layer software function of upgrading dynamic updating programe whether with host be
System is compatible, including:
Information is started according to the history of the dynamic updating programe, judged due to the dynamic updating programe bag
The upgrade code contained performs dynamic replacement operation, causes whether the situation of system reboot meets preparatory condition, if
Meet, then judge that the dynamic updating programe and host system are incompatible.
Optionally, the preparatory condition, including:Number of times is restarted more than predetermined threshold value.
Optionally, after the judgement dynamic updating programe and host system are incompatible, in unloading institute
Before stating dynamic updating programe, including:
Cancel the dynamic replacement operation.
Optionally, the unloading dynamic updating programe, including:
Point out dynamic updating programe and host system described in user incompatible;
And the dynamic updating programe is unloaded according to the instruction of user.
Optionally, the dynamic updating programe, is to install the dynamic obtained from service end in host system to rise
The executable program generated after level software kit;
When whether the dynamic updating programe judged for supporting layer software function of upgrading is compatible with host system
Result for it is incompatible when, in addition to:
Collect and generate the dynamic updating programe and the incompatible correlation log information of host system, and by institute
State log information and upload to the service end.
Optionally, when it is described judge for supporting layer software function of upgrading dynamic updating programe whether with host
When the result of system compatible is incompatible, in addition to:
Unload the Function Extension program that Function Extension service is provided for the dynamic updating programe.
Accordingly, the application also provides a kind of managing device to supporting layer dynamic updating programe, including:
Compatibility determination unit, for judge be used for upgrade supporting layer software function dynamic updating programe whether
It is compatible with host system;
Dynamic updating programe unloading unit, for when the compatibility determination unit is output as incompatible,
Unload the dynamic updating programe.
Optionally, the compatibility determination unit, specifically for judging what is included with the dynamic updating programe
Upgrade code performs whether dynamic replacement operation returns to the successful result of sign operation, if it is not, then judging described
Dynamic updating programe is incompatible with host system.
Optionally, the compatibility determination unit, specifically for being opened according to the history of the dynamic updating programe
Dynamic information, judges to operate because the upgrade code included with the dynamic updating programe performs dynamic replacement, leads
Cause whether the situation of system reboot meets preparatory condition, if meeting, judge the dynamic updating programe and place
Main system is incompatible.
Optionally, the dynamic updating programe unloading unit, including:
Unloading prompting subelement, for pointing out dynamic updating programe described in user and host system incompatible;
Unloading performs subelement, for unloading the dynamic updating programe according to the instruction of user.
Optionally, described device also includes:
Incompatible information uploading unit, for when the compatibility determination unit is output as incompatible, receiving
Collect and generate the dynamic updating programe and the incompatible correlation log information of host system, and by the daily record
Information uploads to service end;The dynamic update that the service end is to provide corresponding to the dynamic updating programe is soft
The service end of part bag.
Optionally, described device also includes:
Function Extension program unloading unit, for when the compatibility determination unit is output as incompatible,
Unload the Function Extension program that Function Extension service is provided for the dynamic updating programe.
Compared with prior art, the application has advantages below:
The access method to supporting layer software function that the application is provided, is receiving application program to supporting layer work(
After the access request of energy interface, the upgrade code corresponding to the functional interface is performed comprising described
The dynamic updating programe of upgrade code merges mechanism by process and is previously implanted into supporting layer service processes,
And the function of the functional interface realizes that code is arranged to the upgrade code.
Using the above method, after access request of the application program to supporting layer functional interface is received, do not press
The original that more solito mode performs the functional interface realizes code, but performs and merge mechanism injection using process
Upgrade code, i.e. it is no system software upgrading is carried out using tradition OTA modes in the case of, apply
The supporting layer software function that program can be still had access to after upgrading, so as to provide the user in time more
For perfect function, the usage experience of user can also be accordingly lifted.
Brief description of the drawings
Fig. 1 is a kind of flow chart of the embodiment of upgrade method to supporting layer software function of the application;
Fig. 2 is a kind of schematic diagram of the embodiment of update device to supporting layer software function of the application;
Fig. 3 is a kind of flow chart of the embodiment of access method to supporting layer software function of the application;
Fig. 4 is that the supporting layer service processes that the embodiment of the present application is provided receive the place after application program access request
Manage process schematic;
Fig. 5 is a kind of schematic diagram of the embodiment of access mechanism to supporting layer software function of the application;
Fig. 6 is a kind of flow chart of the embodiment of management method to supporting layer dynamic updating programe of the application;
Fig. 7 is a kind of schematic diagram of the embodiment of managing device to supporting layer dynamic updating programe of the application.
Embodiment
Many details are elaborated in the following description to fully understand the application.But, this Shen
It is able to please be implemented with being much different from other manner described here, those skilled in the art can not disobey
Similar popularization is done in the case of back of the body the application intension, therefore, the application is not by following public specific implementation
Limitation.
In this application, a kind of access method and device to supporting layer software work(is each provided, it is a kind of right
The upgrade method and device of supporting layer software function, and a kind of manager to supporting layer dynamic updating programe
Method and device.It is described in detail one by one in the following embodiments.
In order to make it easy to understand, describing a kind of upgrade method to supporting layer software function of the application offer first
Embodiment.Before the specific steps of description the present embodiment, first to the technical program and dynamic update journey
The generating process of sequence does brief description.
The core of the technical program is:Mechanism is merged by process, by the dynamic update comprising upgrade code
Program is injected into supporting layer service processes, and on this basis that the function of supporting layer corresponding function interface is real
Modern code is set to the upgrade code, it is achieved thereby that light weight, dynamic update to supporting layer software function
Mode, application program can then access the supporting layer software function after upgrading.With using tradition OTA modes pair
System software upgrading compares, and this method only needs to merge by process and by the work(of corresponding function interface
It can realize that code is set to upgrade code, you can realize the dynamic load of upgrade code, realize soft to supporting layer
The upgrading of part function, thus in the case of the OTA performance difficulties there is provided it is a kind of efficiently, lightweight
Supporting layer software function upgrade method.
Supporting layer described in the present embodiment, typically refers to provide for application program in system software layer architecture
The software layer of service, wherein a series of set of storehouses, function or component is included, and by externally providing
The mode of functional interface provides service to application program., can when application program needs to realize a certain systemic-function
To access the corresponding function interface of supporting layer offer.By taking Mobile operating system Android or YunOS as an example,
The supporting layer that service is provided for application program can be ccf layer (framework), and supporting layer functional interface can be with
It is the functional interface that the component in ccf layer is provided.
In order to realize the upgrading to supporting layer software function, in specific implementation, first it can be obtained from service end
Dynamic update software kit and the dynamic updating programe executable by installing generation.Implementing to be:
Software kit, which is sent, to service end obtains request, software kit of the acquisition request for supporting layer software function of upgrading;
The acquisition of information dynamic update software kit provided according to service end;Can by installing the software kit obtained generation
The dynamic updating programe of execution.Wherein, the service end can be high in the clouds.
Exemplified by implementing in Android operation system, service end can connect for ccf layer function to be upgraded
The corresponding upgrade code of mouth generation, and dynamic update software kit is made, typically suffix is apk software kit;
Implement the mobile device of this method (for example:Smart mobile phone) can according to certain strategy, such as periodically,
The request for obtaining the software kit for being used for upgrade framework layer software function is sent to service end, can be with the request
The information such as carried terminal type, original software kit version number;Service end is received after request, and inquiry is believed with terminal
Breath matching, the dynamic update software kit that is available for mobile device update, and mobile device is pointed out from corresponding
Website download;The information that mobile device is provided according to service end is downloaded and installs dynamic update software kit, this
Sample just generates executable dynamic updating programe, contained in the program for realize ccf layer some or
The upgrade code of the upgrade function of some functional interfaces.
Preferably, Function Extension software kit can also be obtained from service end and is installed and is generated as dynamic update journey
Sequence provides the Function Extension program of Function Extension service.In order to realize the technical program, it is necessary to by dynamic update
Program is injected into supporting layer service processes, and supporting layer service processes generally play maintenance in an operating system
The effect of application execution environment, in order to ensure the stable operation of supporting layer service processes, dynamic update journey
The minimal set for the upgrade code for needing to perform dynamic replacement can be only included in sequence, and branch need not be operated in
Function in support layer service processes transfers to the Function Extension program run outside supporting layer service processes to realize,
And the upgrade code that dynamic updating programe is provided, then the function expansion that can be provided by calling function extender
Open up interface, using the expansion service that it is provided, required function can be both realized, while also protecting to greatest extent
The stable operation of supporting layer is demonstrate,proved.
Based on above-mentioned consideration, host equipment can be obtained in the lump while above-mentioned acquisition dynamic update software kit
Function Extension software kit is taken, and by installing the software kit obtained, generation dynamic updating programe, Yi Jiwei
Dynamic updating programe provides the Function Extension program of Function Extension service.
So far, the generating process to the technical program and dynamic updating programe (and Function Extension program) is entered
Explanation is gone.In the specific implementation, when installing first and generating dynamic updating programe, Ke Yisui
The step 101 and 102 in examples provided below is performed afterwards, for updating the in the case of of installation, then can be carried
Show user's restarting systems, and the step 101 and 102 is performed in system initialization process, so that real
The upgrading of existing supporting layer software function.Below exemplified by implementing this method in system initialisation phase, to this Shen
A kind of embodiment for the upgrade method to supporting layer software function that please be provided is described in detail.
With reference to Fig. 1, it is a kind of flow of the embodiment of upgrade method to supporting layer software function of the application
Figure, methods described comprises the following steps:
Step 101, operation include the dynamic updating programe of upgrade code, and merge mechanism by described in by process
Dynamic updating programe is injected into supporting layer service processes.
In the specific implementation, generally can be initial in the system (hereinafter referred to as host system) for implementing this method
Implement this method during change, for example, in initial phase can trigger this method by supporting layer service processes
Perform, so as in the initial phase of host system, just complete the dynamic update of supporting layer software function,
The access request to supporting layer functional interface that application program is then initiated, it is possible to the reality having access to after upgrading
Modern code.Illustrated below exemplified by implementing on the mobile device using android system.
Dynamic updating programe can be by accessing the modes such as configuration file in advance to the following demand of system registry:Connect
Receive the presetting message of system initialisation phase;After mobile device startup, android system performs standard boot
Flow, successively Bootloader (bootloader), kernel and ccf layer service processes, ccf layer service into
Journey can broadcast the presetting message in initial phase, be connect because dynamic updating programe is registered in advance
The demand of the presetting message is received, therefore ccf layer service processes will trigger the execution of this method, operation is dynamic
State ROMPaq, so that dynamic updating programe can just receive the presetting message.Described here preset disappears
Breath typically refers to the message that ccf layer service processes are broadcasted in system start-up phase, for example, can be that start is completed
Message or other message.
This method is triggered after execution, and this step is first carried out:Operation includes the dynamic update journey of upgrade code
Sequence, and the dynamic updating programe is injected into supporting layer service processes by process merging mechanism.It is described
Process merges mechanism and referred to, multiple independent programs or application component is operated according to configuration rule same
The Task Scheduling Mechanism of operating system process.At present, main flow Mobile operating system generally can to program or
The process title of application component is specified, so as to allow different program or application component to operate in together
In one process.
Can (be usually AndroidManifest.xml in configuration file by taking Android Mobile operating systems as an example
File, also referred to as describes file) in the process title that program or application component are run is specified.In order to
Readily appreciate, the configuration file fragment of two independent system components is set forth below:
The configuration file fragment of system component 1:
The configuration file fragment of system component 2:
Wherein, com.android.comp1 and com.android.comp2 is two independent system components, is referred to
Fixed process title is identical, is com.android.merged, then when running the two system components,
System can lookup names for com.android.merged process (if creating entering for the title without if
Journey), and the two system components are all operated in the process.
Based on above-mentioned principle, operation institute can be specified in advance in the configuration file of the dynamic updating programe
The process title for stating dynamic updating programe is consistent with supporting layer service processes, then running the dynamic update
During program, it is possible to merge mechanism by process so that dynamic updating programe is run with supporting layer service processes
In the same process space, i.e.,:Dynamic updating programe comprising upgrade code is injected into supporting layer service
It is that the progress dynamic replacement of subsequent step 102 is ready in process.
It should be noted that being abused in order to avoid above-mentioned process merges mechanism, some Mobile operating systems lead to
The implementation that Chang Huiwei processes merge mechanism sets some constraintss, therefore in the specific implementation, except with
Document is put calmly and outside supporting layer service processes identical process title, can also carry out extra operation expires
The constraints of sufficient Mobile operating system, for example:Dynamic updating programe is consistent with the digital signature of supporting layer,
The operating system user identifier (ID) specified for dynamic updating programe is mutually equal with supporting layer.
This step merges mechanism by process, the dynamic updating programe comprising upgrade code is injected into supporting layer
In service processes, not only subsequent execution dynamic replacement ready for operation, and moving operation will not be broken
The original integrality of system, can provide powerful guarantee for the safe operation of whole system.
Step 102, the function of supporting layer functional interface to be upgraded realized that code is set to upgrade generation accordingly
Code.
Perform after step 101, the dynamic updating programe comprising upgrade code has been injected into supporting layer service
In process, it is corresponding that the function of supporting layer corresponding function interface is then realized that code is set to have been injected into by this step
Upgrade code.
The upgrading generation of several functional interfaces to be upgraded in supporting layer is generally comprised in the dynamic updating programe
Code, the upgrade code is to realize code to what corresponding function interface realization of functions was upgraded, is typically
Executable code, is referred to as object code., will for supporting layer for some functional interface to be upgraded
Its function realizes that code is set to after the corresponding upgrade code in dynamic updating programe, when application program initiation pair
After the access request of the functional interface, supporting layer carries out upgrade code, so that application program can just be visited
The supporting layer software function after upgrading is asked, i.e.,:Realize and supporting layer software function is redefined.
The function of supporting layer functional interface is realized that code is set to upgrade code, the angle realized from technology can
So that two ways is replaced or redirected using code, in the present embodiment and subsequent embodiment, it will use
Code substitute mode or redirection mode, the function of functional interface realized that code is set to accordingly upgrade generation
The process of code is referred to as dynamic replacement.Both modes are illustrated separately below.
(1) code is replaced, i.e.,:The original of functional interface to be upgraded is realized that code is directly replaced with accordingly
Upgrade code.For example, realizing that the code of the functional interface, for A, was included in dynamic updating programe originally
Corresponding upgrade code is A ', then this step can use A ' replacement A, if hereafter receiving application program to institute
The access of functional interface is stated, actual execution is then A '.
(2) redirect, i.e.,:Do not perform code replacement operation, but the visit that upgrade function interface will be treated
Ask and be redirected to corresponding upgrade code.For example, the function reality for storing the functional interface can be changed
The pointer value of modern code first address so that the pointer points to the corresponding upgrade code in dynamic updating programe, from
And if receive access of the application program to the functional interface, will be performed according to the sensing of the pointer corresponding
Upgrade code.
In the specific implementation, above-mentioned redirecting technique can be realized in different ways, in the present embodiment
Realized, exemplified by implementing in android system, can used based on Java aspects using Hook modes
Hook modes, are realized and are redirected using the characteristic of virtual machine and Java reflex mechanism, it would however also be possible to employ base
In the Hook modes of primary aspect (Native), by parsing ELF (Executable and Linkable Format
- can perform linking format) file realization redirection.
It should be noted that the operation of this step can be performed by supporting layer service processes, can also be by dynamic
ROMPaq is completed.In the latter case, dynamic updating programe not only includes upgrade code, also comprising holding
The code of Mobile state replacement function, exemplified by implementing this method in system initialisation phase, supporting layer service into
Journey operation state ROMPaq, and dynamic updating programe merging is run in supporting layer service processes, dynamic
ROMPaq is after its presetting message registered in advance is received, it is possible to perform dynamic replacement operation:Search
The upgrade code of which functional interface is included in dynamic updating programe, and is entered one by one for these functional interfaces
Mobile state is replaced, and function is realized into code is set to corresponding upgrade code.
So far, by above-mentioned steps 101-102, the upgrading to supporting layer software function provided the present embodiment
The embodiment of method is described in detail.
If it should be noted that the upgrade code that dynamic updating programe is included needs access function upon execution
The Function Extension service that extender is provided, and installed before this method is implemented in triggering and generate work(
Energy extender, then the Function Extension program run outside supporting layer service processes, example can also be started
Such as:Start the Function Extension program in the independent process different from supporting layer service processes.
In the specific implementation, the opportunity of startup function extender is that comparison is flexible, as long as can be dynamic
ROMPaq provides Function Extension service and is just all possible.For example:Function Extension program can also be noted in advance
Volume needs to receive the presetting message of initial phase, then supporting layer service processes can be in initial phase
Startup function extender;Or the upgrade code included in dynamic updating programe needs access function extension clothes
In the case of business, call and open by IPC (Inter-Process Communication-inter-process communication mechanisms)
Dynamic Function Extension program;Or Function Extension program according to timer, network state change etc. trigger condition from
Row startup optimization is also possible.
In summary, the upgrade method to supporting layer software function that the present embodiment is provided, not using tradition
OTA modes are upgraded to supporting layer software function, but by the upgrading of the functional interface to be upgraded of supporting layer
Code is included in dynamic updating programe, and then merge mechanism by process is injected into supporting layer by upgrade code
The upgrading of supporting layer software function is realized in service processes and by dynamic replacement, in OTA performance difficulties
In the case of there is provided a kind of supporting layer software function upgrade method of lightweight, so as to timely, fast
Upgrade promptly supporting layer software function, meet the requirements for access of application program.
In the above-described embodiment there is provided a kind of upgrade method to supporting layer software function, in contrast
Answer, the application also provides a kind of update device to supporting layer software function.Fig. 2 is refer to, it is this Shen
A kind of schematic diagram of the embodiment of update device to supporting layer software function please.Due to device embodiment base
This is similar in appearance to embodiment of the method, so describing fairly simple, referring to the part of embodiment of the method in place of correlation
Explanation.Device embodiment described below is only schematical.
A kind of update device to supporting layer software function of the present embodiment, including:Upgrade code injection unit
201, merge mechanism by the dynamic for running the dynamic updating programe for including upgrade code, and by process
ROMPaq is injected into supporting layer service processes;Upgrade code replacement unit 202, for treating supporting layer to rise
The function of level functional interface realizes that code is set to corresponding upgrade code.
Optionally, the upgrade code injection unit is specifically in the configuration text of the dynamic updating programe
In part, the process title for preassigning the operation dynamic updating programe is consistent with supporting layer service processes;Fortune
The row dynamic updating programe, to be injected into the supporting layer service processes.
Optionally, the upgrade code replacement unit, is treated supporting layer specifically for being realized using Hook modes
The function of upgrade function interface realizes that code is set to corresponding upgrade code.
Optionally, described device includes:
Working cell is triggered, the upgrading is triggered in system initialisation phase for the supporting layer service processes
Code injection cell operation.
Optionally, the triggering working cell includes:
Message registration subelement is received, for the dynamic updating programe in advance to the following demand of system registry:
The presetting message of reception system initial phase;
Message broadcasts subelement, broadcasts described pre- in system initialisation phase for the supporting layer service processes
If message, and noted according to the dynamic updating programe demand registered in advance, the triggering upgrade code
Enter cell operation.
Optionally, described device also includes:
Function Extension program start unit, for start it is being run outside the supporting layer service processes, be
The dynamic updating programe provides the Function Extension program of Function Extension service.
Optionally, described device also includes executable program generation unit;The unit includes:
Software kit asks subelement, obtains request for sending software kit to service end, acquisition request is used to rise
The software kit of level supporting layer software function;
Software kit obtains subelement, for the acquisition of information software kit provided according to service end, wherein at least bag
Include dynamic update software kit;
Software kit installs subelement, for by installing the software kit obtained, generation at least to include described dynamic
The executable program of state ROMPaq.
Optionally, the software kit obtains subelement, is moved specifically for the acquisition of information provided according to service end
State upgrading software kit and Function Extension software kit;
The software kit installs subelement, specifically for by installing the software kit obtained, generating described dynamic
State ROMPaq and Function Extension program.
In addition, the application also provides a kind of access method to supporting layer software function, implement this method it
Before, the upgrade method to supporting layer software function of the application offer can be in advance provided, realized to supporting layer
The upgrading of software function, i.e.,:Merge mechanism by process to inject the dynamic updating programe comprising upgrade code
Realize that code is set to the upgrade code into supporting layer service processes, and by the function of corresponding function interface.
Wherein, the dynamic updating programe, is to install to obtain from service end, for branch of upgrading in host system
The executable program generated after the dynamic update software kit for supportting layer software function.
After the upgrading to supporting layer software function is completed, when application program accesses the function that supporting layer has been upgraded
During interface, you can the access method to supporting layer software function provided by the application, perform and correspond to institute
State the upgrade code of functional interface.
Fig. 3 is refer to, it is a kind of stream of the embodiment of access method to supporting layer software function of the application
Cheng Tu, this method is implemented generally in supporting layer service processes.The present embodiment and above method embodiment step
Identical part is repeated no more, below emphasis difference is described.The present embodiment it is a kind of to supporting layer software
The access method of function comprises the following steps:
The access request of step 301, reception application program to supporting layer functional interface.
The supporting layer functional interface refers to the supporting layer functional interface being upgraded in the present embodiment, i.e.,:
Its function realizes that code has been arranged to the corresponding upgrade code that dynamic updating programe is included.When application program hair
After rising to the access request of the functional interface, this step can just receive the access request.
By taking android system as an example, each component in ccf layer can externally provide one or more work(
Energy interface, when application program needs the Functional Capability of access some component offer (for example:Call, obtain
Take international mobile equipment identity number etc.) when, the access request to corresponding function interface can be initiated, ccf layer service processes are just
The access request can be received.
Step 302, execution correspond to the upgrade code of the functional interface.
Because the function of the functional interface realizes that code is already set as corresponding upgrade code, therefore this
The upgrade code for corresponding to the functional interface that step is performed, so as to provide upgrading for application program
Supporting layer software function afterwards.In the specific implementation, can also be by the upgrading after this step has been performed
The implementing result of code returns to the application program.
Preferably, during the upgrade code corresponding to the functional interface is performed, in addition to:Call
The Function Extension interface that the Function Extension program run outside the supporting layer service processes is provided.Wherein,
The Function Extension program, is the executable program generated in host system after installation function extended software bag,
The Function Extension software kit is obtained in the lump when obtaining the dynamic update software kit from the service end.
For example, the upgrade code of the functional interface, which is realized, obtains mobile device international mobile equipment identity number (mobile device state
Border identification code) function, in order to provide security guarantee, in addition it is also necessary to whether there is corresponding acquisition to requesting party
Authority checked, and scope check function is by the Function Extension program run outside supporting layer service processes
Realize, in such a case, it is possible to include the authority provided Function Extension program in the upgrade code
Check interface calls code, then this step is when performing the upgrade code, it is possible to correspondingly perform
To the call operation of scope check interface, and inside Function Extension program, corresponding Function Extension code is carried out
Scope check, the result that upgrade code is then returned according to Function Extension program decides whether can be to application program
International mobile equipment identity number is provided and handled accordingly.
In order to make it easy to understand, diagrammatically providing a specific example herein, Fig. 4 is referred to, it is
Supporting layer service processes receive the processing procedure schematic diagram after application program access request, the reality provided in Fig. 4
Apply in mode, the function of functional interface 1 is realized that code is set to corresponding liter using redirection mode in advance
Level code.Wherein operation 1 represents access of the supporting layer service processes reception application program to functional interface 1 and asked
Ask, operation 2 represents the upgrade code of supporting layer service processes perform function interface 1, operation 3 represents described
The Function Extension interface 1 that upgrade code calling function extender is provided realizes required function.
It is above-mentioned to give the example that upgrade code calls One function expansion interface, in the specific implementation, if
The need for a certain Function Extension interface that Function Extension program is provided can not meet upgrade code, upgrade code is also
Other the multiple Function Extension interfaces that can be provided with calling function extender, i.e. access function extender is carried
The multiple functions of supplying are realized, can also call the API of other processes or component offer.
In the specific implementation, the call operation for the Function Extension interface that upgrade code is provided Function Extension program,
It can be realized using IPC mechanism.If Function Extension program not yet starts, it can be called and opened by IPC
Dynamic Function Extension program, then visits again required Function Extension interface.
, can some are complicated or nothing using the preferred embodiment of above-mentioned access function expansion interface
The function that method makes accurate evaluation to operation stability transfers to Function Extension program to complete, due to Function Extension journey
Sequence is run outside supporting layer service processes, therefore supporting layer can both use the clothes that Function Extension program is provided
Business, can ensure the stable operation of its own again.
So far, access being provided by above-mentioned steps 301-302 the present embodiment, to supporting layer software function
The embodiment of method is described in detail.By foregoing description as can be seen that using the above method, by
In after access request of the application program to supporting layer functional interface is received, work(is not performed in a conventional manner
The original of energy interface realizes code, but performs and merge the upgrading generation that mechanism is injected after simultaneously dynamic replacement using process
Code, i.e. in the case where no use tradition OTA modes carry out system software upgrading, application program is still
The supporting layer software function that can be had access to after upgrading is more perfect so as to provide the user in time
Function, can also accordingly lift the usage experience of user.
In the above-described embodiment there is provided a kind of access method to supporting layer software function, in contrast
Answer, the application also provides a kind of access mechanism to supporting layer software function.Fig. 5 is refer to, it is this Shen
A kind of schematic diagram of the embodiment of access mechanism to supporting layer software function please.Due to device embodiment base
This is similar in appearance to embodiment of the method, so describing fairly simple, referring to the part of embodiment of the method in place of correlation
Explanation.Device embodiment described below is only schematical.
A kind of access mechanism to supporting layer software function of the present embodiment, including:Access request receiving unit
501, for receiving access request of the application program to supporting layer functional interface;Upgrade code execution unit 502,
For performing the upgrade code corresponding to the functional interface comprising the dynamic of the upgrade code rises
Level program merges mechanism by process and is previously implanted into supporting layer service processes, and the functional interface
Function realize that code is arranged to the upgrade code.
Optionally, described device also includes:
Implementing result returning unit, it is described for the implementing result of the upgrade code execution unit to be returned to
Application program.
Optionally, the upgrade code execution unit, specifically for performing the liter corresponding to the functional interface
Level code, and the work(run outside supporting layer service processes is invoked at during the upgrade code is performed
The Function Extension interface that energy extender is provided.
Optionally, the upgrade code execution unit, specifically for being realized by inter-process communication mechanisms to institute
State calling for Function Extension interface.
In addition, the application also provides a kind of management method to supporting layer dynamic updating programe.Because movement is set
Standby software version, which is realized, to differ greatly, and the dynamic updating programe for supporting layer software function of upgrading there may be
With host system it is incompatible the problem of, then operation state ROMPaq simultaneously perform dynamic replacement operation after, can
Host system can be caused normal work or even can not start normally.For this problem, the application is proposed
The management method to supporting layer dynamic updating programe, compatibility can be detected and detected not
Dynamic updating programe is unloaded when compatible, so that the supporting layer software function light weight upgrade technique proposed to the application
Scheme, there is provided a kind of fault detect and Restoration Mechanism, is the useful supplement to the technical scheme.
Fig. 6 is refer to, a kind of reality of its management method to supporting layer dynamic updating programe provided for the application
Apply the flow chart of example.The present embodiment is repeated no more with above method embodiment step identical part, below weight
Point description difference.A kind of management method to supporting layer dynamic updating programe of the present embodiment includes as follows
Step:
Step 601, judge whether the dynamic updating programe for supporting layer software function of upgrading is simultaneous with host system
Hold, if compatible, perform step 603, otherwise, perform step 602.
The dynamic updating programe and host system are incompatible can the different forms of expression, thus judge be
It is no it is incompatible can also in different ways, the present embodiment enumerates two kinds:
1) judge the upgrade code that is included with the dynamic updating programe perform dynamic replacement operation whether return table
The successful result of operation is levied, if it is not, then judging that the dynamic updating programe and host system are incompatible.
For example:Functional interface corresponding with upgrade code is not present in supporting layer, or, upgrade code is related to
And suction parameter realize that the suction parameter that code is related to is mismatched with original, lead to not carry out dynamic replacement,
Now dynamic replacement operation can all return to failure result, in this case, although without result in system reboot,
It can also judge that the dynamic updating programe is mismatched with host system.
2) information is started according to the history of the dynamic updating programe, judged due to using the dynamic updating programe
Comprising upgrade code perform dynamic replacement operation, cause whether the situation of system reboot meets preparatory condition,
If so, then judging that the dynamic updating programe and host system are incompatible.
In the specific implementation, can be in the start-up course of dynamic updating programe, the record number of starts simultaneously will
The starting state of dynamic updating programe is set to start;Dynamic replacement operation if successfully completed, then
The starting state of dynamic updating programe can be set to start successfully, and record this time startup successfully related letter
Breath.The history of the dynamic updating programe recorded using aforesaid way starts information, can be risen as dynamic is judged
Level program foundation whether compatible with host system.
Because dynamic updating programe is generally run in the initial phase of host system and performs dynamic replacement behaviour
Make, thus can host system initial phase, have not carried out dynamic replacement operation before to compatibility
Judge, implementing to be:Read from the history startup information recorded on dynamic updating programe
Starting state once, if the starting state is " starting ", illustrates to move because the last time performs
State replacement operation result in host system this restart.If causing system due to performing dynamic replacement operation
The situation restarted meets preparatory condition, then can be determined that dynamic updating programe is incompatible with host system.For example:
If causing the number of times of system reboot to be more than predetermined threshold value (for example due to performing dynamic replacement operation:3 times),
It then can be determined that dynamic updating programe is incompatible with host system.
In the specific implementation, when performing above-mentioned judgement, above-mentioned history can also be considered and started in information
Startup total degree, the successful history relevant information of startup of the dynamic updating programe of record etc., and can set
Put different preparatory conditions.
If it is judged that being:Dynamic updating programe is incompatible with host system, can cancel dynamic and replace
Change operation, it is ensured that host system normally can start and run;Otherwise, dynamic replacement behaviour can normally be performed
Make to realize the upgrading to supporting layer software function.
The compatible two ways for judging dynamic updating programe and host system is presented above, specific real
Other judgment modes different from aforesaid way can also be used by applying.If it is determined that dynamic updating programe and host
System is incompatible, then goes to step 602 and perform.
Step 602, the unloading dynamic updating programe.
Go to this step and illustrate that dynamic updating programe is incompatible with host system, in such a case, it is possible to
Unload dynamic updating programe.Implementing to be:Point out dynamic updating programe and host system described in user
It is incompatible, and the dynamic updating programe is unloaded according to the instruction of user.
If being mounted with to provide the Function Extension journey of expanded function service for dynamic updating programe in host system
Sequence, then, can be with offloading functions extender while dynamic updating programe is unloaded.
In addition, in the specific implementation, if the judgement dynamic updating programe of step 601 and host system be not simultaneous
Hold, can also collect and generate the correlation log information for recording incompatible state, and by the log information
Pass to the service end that dynamic update software kit (installation kit of dynamic updating programe) is provided.The log information
It can include:Dynamic replacement failure cause, the dynamic updating programe number of starts, the context letter at failure scene
Breath etc..Service end can be analyzed according to the log information received, position failure cause, and eliminate failure
The dynamic update software kit of redaction is made afterwards and mobile device is supplied to, so that mobile device can successfully rise
Level supporting layer software function.
Step 603, the reservation dynamic updating programe.
Go to this step and illustrate that dynamic updating programe is compatible with host system, therefore the dynamic can be retained
ROMPaq, without performing unloading operation.
So far, the manager to supporting layer dynamic updating programe provided by step 601-603 the present embodiment
The embodiment of method is described in detail.By foregoing description as can be seen that the management method is provided
A kind of Failure detection and recovery method for dynamic updating programe, is detecting dynamic updating programe and host
It when system is incompatible, can be retracted by unloading dynamic updating programe, ensure the normal fortune of host system
OK.
In the above-described embodiment there is provided a kind of management method to supporting layer dynamic updating programe, therewith
Corresponding, the application also provides a kind of managing device to supporting layer dynamic updating programe.It refer to Fig. 7,
It is a kind of schematic diagram of the embodiment of managing device to supporting layer dynamic updating programe of the application.Due to
Device embodiment is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to method
The part explanation of embodiment.Device embodiment described below is only schematical.
A kind of managing device to supporting layer dynamic updating programe of the present embodiment, including:Compatibility determination list
Member 701, for judging whether the dynamic updating programe for being used to upgrade supporting layer software function is simultaneous with host system
Hold;Dynamic updating programe unloading unit 702, for when the compatibility determination unit is output as incompatible,
Unload the dynamic updating programe;Dynamic updating programe stick unit 703, for when the compatibility determination list
When member is output as compatibility, retain the dynamic updating programe.
Optionally, the compatibility determination unit, specifically for judging what is included with the dynamic updating programe
Upgrade code performs whether dynamic replacement operation returns to the successful result of sign operation, if it is not, then judging described
Dynamic updating programe is incompatible with host system.
Optionally, the compatibility determination unit, specifically for being opened according to the history of the dynamic updating programe
Dynamic information, judges to operate because the upgrade code included with the dynamic updating programe performs dynamic replacement, leads
Cause whether the situation of system reboot meets preparatory condition, if meeting, judge the dynamic updating programe and place
Main system is incompatible.
Optionally, the dynamic updating programe unloading unit, including:
Unloading prompting subelement, for pointing out dynamic updating programe described in user and host system incompatible;
Unloading performs subelement, for unloading the dynamic updating programe according to the instruction of user.
Optionally, described device also includes:
Incompatible information uploading unit, for when the compatibility determination unit is output as incompatible, receiving
Collect and generate the dynamic updating programe and the incompatible correlation log information of host system, and by the daily record
Information uploads to service end;The dynamic update that the service end is to provide corresponding to the dynamic updating programe is soft
The service end of part bag.
Optionally, described device also includes:
Function Extension program unloading unit, for when the compatibility determination unit is output as incompatible,
Unload the Function Extension program that Function Extension service is provided for the dynamic updating programe.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, Ren Heben
Art personnel are not being departed from spirit and scope, can make possible variation and modification,
Therefore the scope that the protection domain of the application should be defined by the application claim is defined.
In a typical configuration, computing device includes one or more processors (CPU), input/output
Interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory
And/or the form, such as read-only storage (ROM) or flash memory (flash RAM) such as Nonvolatile memory (RAM).
Internal memory is the example of computer-readable medium.
1st, computer-readable medium include permanent and non-permanent, removable and non-removable media can be by
Any method or technique come realize information store.Information can be computer-readable instruction, data structure, journey
The module of sequence or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory
(PRAM), static RAM (SRAM), dynamic random access memory (DRAM), its
The random access memory (RAM) of his type, read-only storage (ROM), electrically erasable is read-only deposits
Reservoir (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage
(CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic magnetic
Disk storage or other magnetic storage apparatus or any other non-transmission medium, can be set available for storage by calculating
The standby information accessed.Defined according to herein, computer-readable medium does not include non-temporary computer-readable matchmaker
The data-signal and carrier wave of body (transitory media), such as modulation.
2nd, it will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer
Program product.Therefore, the application can use complete hardware embodiment, complete software embodiment or combine software
With the form of the embodiment of hardware aspect.Moreover, the application can be used wherein includes meter one or more
Calculation machine usable program code computer-usable storage medium (include but is not limited to magnetic disk storage,
CD-ROM, optical memory etc.) on the form of computer program product implemented.
Claims (45)
1. a kind of access method to supporting layer software function, it is characterised in that including:
Receive access request of the application program to supporting layer functional interface;
Perform the upgrade code corresponding to the functional interface;
Wherein, dynamic updating programe comprising the upgrade code by process merge mechanism be previously implanted to
In supporting layer service processes, and the function of the functional interface realizes that code is arranged to the upgrade code.
2. the access method according to claim 1 to supporting layer software function, it is characterised in that also
Including:
The implementing result of the upgrade code is returned into the application program.
3. the access method according to claim 1 to supporting layer software function, it is characterised in that institute
Stating supporting layer includes:Ccf layer;The supporting layer functional interface includes:Component in the ccf layer is provided
Functional interface.
4. the access method according to claim 1 to supporting layer software function, it is characterised in that bag
Dynamic updating programe containing the upgrade code merges mechanism by process and is injected into supporting layer service processes
In, including:
In the configuration file of the dynamic updating programe, the process name of the operation dynamic updating programe is specified
Claim consistent with the supporting layer service processes;
The dynamic updating programe is run, to be injected into the supporting layer service processes.
5. the access method according to claim 1 to supporting layer software function, it is characterised in that institute
The function of stating functional interface realizes that code is arranged to the upgrade code, is realized using Hook modes.
6. the access method according to claim 1 to supporting layer software function, it is characterised in that
During performing the upgrade code corresponding to the functional interface, in addition to:It is invoked at the supporting layer clothes
The Function Extension interface that the Function Extension program run outside business process is provided.
7. the access method according to claim 6 to supporting layer software function, it is characterised in that right
The call operation of the Function Extension interface, is realized by inter-process communication mechanisms.
8. the access method according to claim 1 to supporting layer software function, it is characterised in that institute
Dynamic updating programe is stated, is to install to obtain, for supporting layer software of upgrading from service end in host system
The executable program generated after the dynamic update software kit of function.
9. the access method according to claim 8 to supporting layer software function, it is characterised in that
During performing the upgrade code corresponding to the functional interface, in addition to:It is invoked at the supporting layer clothes
The Function Extension interface that the Function Extension program of dynamic load operating is provided outside business process;
The Function Extension program, is generated in host system after installation function extended software bag executable
Program, the Function Extension software kit is obtained in the lump when being and obtaining the dynamic update software kit from the service end
Take.
10. a kind of access mechanism to supporting layer software function, it is characterised in that including:
Access request receiving unit, for receiving access request of the application program to supporting layer functional interface;
Upgrade code execution unit, for performing the upgrade code corresponding to the functional interface, wherein, bag
Dynamic updating programe containing the upgrade code by process merge mechanism be previously implanted to supporting layer service into
Cheng Zhong, and the function of the functional interface realizes that code is arranged to the upgrade code.
11. the access mechanism according to claim 10 to supporting layer software function, it is characterised in that
Also include:
Implementing result returning unit, it is described for the implementing result of the upgrade code execution unit to be returned to
Application program.
12. the access mechanism according to claim 10 to supporting layer software function, it is characterised in that
The upgrade code execution unit, specifically for upgrade code of the execution corresponding to the functional interface, and
The Function Extension program run outside supporting layer service processes is invoked at during performing the upgrade code to carry
The Function Extension interface of confession.
13. the access mechanism according to claim 12 to supporting layer software function, it is characterised in that
The upgrade code execution unit, connects specifically for being realized by inter-process communication mechanisms to the Function Extension
Mouthful call.
14. a kind of upgrade method to supporting layer software function, it is characterised in that including:
Operation includes the dynamic updating programe of upgrade code, and merges mechanism by the dynamic update by process
Program is injected into supporting layer service processes;
The function of supporting layer functional interface to be upgraded is realized that code is set to corresponding upgrade code.
15. the upgrade method according to claim 14 to supporting layer software function, it is characterised in that
The supporting layer includes:Ccf layer.
16. the upgrade method according to claim 14 to supporting layer software function, it is characterised in that
It is described to run the dynamic updating programe for including upgrade code, and mechanism is merged by the dynamic update by process
Program is injected into supporting layer service processes, is realized in the following way:
In the configuration file of the dynamic updating programe, preassign and run entering for the dynamic updating programe
Journey title is consistent with the supporting layer service processes;
The dynamic updating programe is run, to be injected into the supporting layer service processes.
17. the upgrade method according to claim 14 to supporting layer software function, it is characterised in that
The function of supporting layer functional interface to be upgraded is realized into the step of code is set to corresponding upgrade code, used
Hook modes are realized.
18. the upgrade method according to claim 14 to supporting layer software function, it is characterised in that
Methods described is triggered in system initialisation phase by the supporting layer service processes and performed.
19. the upgrade method according to claim 18 to supporting layer software function, it is characterised in that
The supporting layer service processes trigger this method in system initialisation phase and performed in the following way:
The dynamic updating programe is in advance to the following demand of system registry:Reception system initial phase it is default
Message;
The supporting layer service processes broadcast the presetting message in system initialisation phase, and according to described dynamic
The state ROMPaq demand registered in advance, triggering this method are performed.
20. the upgrade method according to claim 19 to supporting layer software function, it is characterised in that
The presetting message of the system initialisation phase includes:Start completion message.
21. the upgrade method according to claim 14 to supporting layer software function, it is characterised in that
Also include:
Start it is being run outside the supporting layer service processes, function be provided for the dynamic updating programe expanded
Open up the Function Extension program of service.
22. the upgrade method to supporting layer software function according to claim any one of 14-21, it is special
Levy and be, before triggering this method is performed, including:
Software kit, which is sent, to service end obtains request, software of the acquisition request for supporting layer software function of upgrading
Bag;
The acquisition of information software kit provided according to service end, wherein at least includes dynamic update software kit;
By installing the software kit obtained, generation at least includes the executable program of the dynamic updating programe.
23. the upgrade method according to claim 22 to supporting layer software function, it is characterised in that
In the step of acquisition of information software kit provided according to service end described, acquisition not only includes the dynamic
Upgrading software kit, in addition to Function Extension software kit;
The executable program that the installation kit obtained by installing is generated, not only including the dynamic update
Program, in addition to provide the Function Extension program that Function Extension is serviced for the dynamic updating programe.
24. a kind of update device to supporting layer software function, it is characterised in that including:
Upgrade code injection unit, for running the dynamic updating programe for including upgrade code, and passes through process
The dynamic updating programe is injected into supporting layer service processes by merging mechanism;
Upgrade code replacement unit, for the function of supporting layer functional interface to be upgraded to be realized into code is set to
Corresponding upgrade code.
25. the update device according to claim 24 to supporting layer software function, it is characterised in that
The upgrade code injection unit specifically in the configuration file of the dynamic updating programe, referring in advance
Surely the process title for running the dynamic updating programe is consistent with supporting layer service processes;The operation dynamic rises
Level program, to be injected into the supporting layer service processes.
26. the update device according to claim 24 to supporting layer software function, it is characterised in that
The upgrade code replacement unit, specifically for being realized using Hook modes by supporting layer functional interface to be upgraded
Function realize that code is set to corresponding upgrade code.
27. the update device according to claim 24 to supporting layer software function, it is characterised in that
Including:
Working cell is triggered, the upgrading is triggered in system initialisation phase for the supporting layer service processes
Code injection cell operation.
28. the update device according to claim 27 to supporting layer software function, it is characterised in that
The triggering working cell includes:
Message registration subelement is received, for the dynamic updating programe in advance to the following demand of system registry:
The presetting message of reception system initial phase;
Message broadcasts subelement, broadcasts described pre- in system initialisation phase for the supporting layer service processes
If message, and noted according to the dynamic updating programe demand registered in advance, the triggering upgrade code
Enter cell operation.
29. the update device according to claim 24 to supporting layer software function, it is characterised in that
Also include:
Function Extension program start unit, for start it is being run outside the supporting layer service processes, be
The dynamic updating programe provides the Function Extension program of Function Extension service.
30. the update device to supporting layer software function according to claim any one of 24-29, it is special
Levy and be, in addition to executable program generation unit;The unit includes:
Software kit asks subelement, obtains request for sending software kit to service end, acquisition request is used to rise
The software kit of level supporting layer software function;
Software kit obtains subelement, for the acquisition of information software kit provided according to service end, wherein at least bag
Include dynamic update software kit;
Software kit installs subelement, for by installing the software kit obtained, generation at least to include described dynamic
The executable program of state ROMPaq.
31. the update device according to claim 30 to supporting layer software function, it is characterised in that
The software kit obtains subelement, specifically for the acquisition of information dynamic update software kit provided according to service end
With Function Extension software kit;
The software kit installs subelement, specifically for by installing the software kit obtained, generating described dynamic
State ROMPaq and Function Extension program.
32. a kind of management method to supporting layer dynamic updating programe, it is characterised in that including:
Judge whether the dynamic updating programe for supporting layer software function of upgrading is compatible with host system;
If incompatible, the dynamic updating programe is unloaded.
33. the management method according to claim 32 to supporting layer dynamic updating programe, its feature exists
In, whether the dynamic updating programe judged for supporting layer software function of upgrading is compatible with host system,
Including:
Judge that the upgrade code included with the dynamic updating programe performs whether dynamic replacement operation returns to sign
Successful result is operated, if it is not, then judging that the dynamic updating programe and host system are incompatible.
34. the management method according to claim 32 to supporting layer dynamic updating programe, its feature exists
In, whether the dynamic updating programe judged for supporting layer software function of upgrading is compatible with host system,
Including:
Information is started according to the history of the dynamic updating programe, judged due to the dynamic updating programe bag
The upgrade code contained performs dynamic replacement operation, causes whether the situation of system reboot meets preparatory condition, if
Meet, then judge that the dynamic updating programe and host system are incompatible.
35. the management method according to claim 34 to supporting layer dynamic updating programe, its feature exists
In, the preparatory condition, including:Number of times is restarted more than predetermined threshold value.
36. the management method according to claim 34 to supporting layer dynamic updating programe, its feature exists
In after the judgement dynamic updating programe and host system are incompatible, in the unloading dynamic liter
Before level program, including:
Cancel the dynamic replacement operation.
37. the management method according to claim 32 to supporting layer dynamic updating programe, its feature exists
In, the unloading dynamic updating programe, including:
Point out dynamic updating programe and host system described in user incompatible;
And the dynamic updating programe is unloaded according to the instruction of user.
38. the management method according to claim 32 to supporting layer dynamic updating programe, its feature exists
In the dynamic updating programe is that the dynamic update software kit obtained from service end is installed in host system
The executable program generated afterwards;
When whether the dynamic updating programe judged for supporting layer software function of upgrading is compatible with host system
Result for it is incompatible when, in addition to:
Collect and generate the dynamic updating programe and the incompatible correlation log information of host system, and by institute
State log information and upload to the service end.
39. the management method according to claim 32 to supporting layer dynamic updating programe, its feature exists
In when whether the dynamic updating programe judged for supporting layer software function of upgrading is compatible with host system
Result for it is incompatible when, in addition to:
Unload the Function Extension program that Function Extension service is provided for the dynamic updating programe.
40. a kind of managing device to supporting layer dynamic updating programe, it is characterised in that including:
Compatibility determination unit, for judge be used for upgrade supporting layer software function dynamic updating programe whether
It is compatible with host system;
Dynamic updating programe unloading unit, for when the compatibility determination unit is output as incompatible,
Unload the dynamic updating programe.
41. the managing device according to claim 40 to supporting layer dynamic updating programe, its feature exists
In the compatibility determination unit, specifically for the upgrade code for judging to be included with the dynamic updating programe
Perform whether dynamic replacement operation returns to the successful result of sign operation, if it is not, then judging the dynamic update
Program is incompatible with host system.
42. the managing device according to claim 40 to supporting layer dynamic updating programe, its feature exists
In, the compatibility determination unit, specifically for starting information according to the history of the dynamic updating programe,
Judge to operate because the upgrade code included with the dynamic updating programe performs dynamic replacement, cause system weight
Whether the situation opened meets preparatory condition, if meeting, and judges the dynamic updating programe with host system not
It is compatible.
43. the managing device according to claim 40 to supporting layer dynamic updating programe, its feature exists
In, the dynamic updating programe unloading unit, including:
Unloading prompting subelement, for pointing out dynamic updating programe described in user and host system incompatible;
Unloading performs subelement, for unloading the dynamic updating programe according to the instruction of user.
44. the managing device according to claim 40 to supporting layer dynamic updating programe, its feature exists
In, in addition to:
Incompatible information uploading unit, for when the compatibility determination unit is output as incompatible, receiving
Collect and generate the dynamic updating programe and the incompatible correlation log information of host system, and by the daily record
Information uploads to service end;The dynamic update that the service end is to provide corresponding to the dynamic updating programe is soft
The service end of part bag.
45. the managing device according to claim 40 to supporting layer dynamic updating programe, its feature exists
In, in addition to:
Function Extension program unloading unit, for when the compatibility determination unit is output as incompatible,
Unload the Function Extension program that Function Extension service is provided for the dynamic updating programe.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610162733.4A CN107220074B (en) | 2016-03-21 | 2016-03-21 | Method and device for accessing and upgrading supporting layer software function |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610162733.4A CN107220074B (en) | 2016-03-21 | 2016-03-21 | Method and device for accessing and upgrading supporting layer software function |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107220074A true CN107220074A (en) | 2017-09-29 |
| CN107220074B CN107220074B (en) | 2020-10-20 |
Family
ID=59928338
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610162733.4A Active CN107220074B (en) | 2016-03-21 | 2016-03-21 | Method and device for accessing and upgrading supporting layer software function |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107220074B (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109101271A (en) * | 2018-07-27 | 2018-12-28 | 郑州云海信息技术有限公司 | A kind of program extended method and relevant apparatus |
| TWI649694B (en) * | 2017-10-30 | 2019-02-01 | 國立臺灣大學 | Android dynamic framework and method thereof |
| CN109408197A (en) * | 2018-09-29 | 2019-03-01 | 上海理想信息产业(集团)有限公司 | A kind of implementation method and device of edge calculations engine |
| CN110007935A (en) * | 2019-03-29 | 2019-07-12 | 阿里巴巴集团控股有限公司 | A kind of processing method, device and the equipment of program upgrading |
| CN110377312A (en) * | 2019-07-19 | 2019-10-25 | 北京小米移动软件有限公司 | A kind of method for upgrading software, device and medium |
| CN111124444A (en) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | Code injection method and device, computer program product and storage medium |
| CN112416381A (en) * | 2019-08-22 | 2021-02-26 | 中兴通讯股份有限公司 | Differential upgrade method, device, server and readable storage medium |
| CN113050962A (en) * | 2019-12-27 | 2021-06-29 | 华为技术有限公司 | Mobile service upgrading method, device and terminal |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6266681B1 (en) * | 1997-04-08 | 2001-07-24 | Network Commerce Inc. | Method and system for inserting code to conditionally incorporate a user interface component in an HTML document |
| CN101136012A (en) * | 2006-08-30 | 2008-03-05 | 中兴通讯股份有限公司 | Realization method of built-in browsers page quick-speed refreshing mechanism |
| US20120131571A1 (en) * | 2010-11-18 | 2012-05-24 | International Business Machines Corporation | Performance in a nested virtualized environment |
| CN106251195A (en) * | 2016-07-25 | 2016-12-21 | 四川易想电子商务有限公司 | E-commerce system based on B/S structure |
-
2016
- 2016-03-21 CN CN201610162733.4A patent/CN107220074B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6266681B1 (en) * | 1997-04-08 | 2001-07-24 | Network Commerce Inc. | Method and system for inserting code to conditionally incorporate a user interface component in an HTML document |
| CN101136012A (en) * | 2006-08-30 | 2008-03-05 | 中兴通讯股份有限公司 | Realization method of built-in browsers page quick-speed refreshing mechanism |
| US20120131571A1 (en) * | 2010-11-18 | 2012-05-24 | International Business Machines Corporation | Performance in a nested virtualized environment |
| CN106251195A (en) * | 2016-07-25 | 2016-12-21 | 四川易想电子商务有限公司 | E-commerce system based on B/S structure |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI649694B (en) * | 2017-10-30 | 2019-02-01 | 國立臺灣大學 | Android dynamic framework and method thereof |
| CN109101271A (en) * | 2018-07-27 | 2018-12-28 | 郑州云海信息技术有限公司 | A kind of program extended method and relevant apparatus |
| CN109408197A (en) * | 2018-09-29 | 2019-03-01 | 上海理想信息产业(集团)有限公司 | A kind of implementation method and device of edge calculations engine |
| CN111124444A (en) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | Code injection method and device, computer program product and storage medium |
| CN111124444B (en) * | 2018-11-01 | 2023-12-19 | 百度在线网络技术(北京)有限公司 | Method of code injection, apparatus therefor, computer program product, and storage medium |
| CN110007935B (en) * | 2019-03-29 | 2022-09-16 | 创新先进技术有限公司 | Processing method, device and equipment for program upgrading |
| CN110007935A (en) * | 2019-03-29 | 2019-07-12 | 阿里巴巴集团控股有限公司 | A kind of processing method, device and the equipment of program upgrading |
| CN110377312A (en) * | 2019-07-19 | 2019-10-25 | 北京小米移动软件有限公司 | A kind of method for upgrading software, device and medium |
| CN110377312B (en) * | 2019-07-19 | 2024-02-06 | 北京小米移动软件有限公司 | A software upgrade method, device and medium |
| CN112416381A (en) * | 2019-08-22 | 2021-02-26 | 中兴通讯股份有限公司 | Differential upgrade method, device, server and readable storage medium |
| CN113050962A (en) * | 2019-12-27 | 2021-06-29 | 华为技术有限公司 | Mobile service upgrading method, device and terminal |
| WO2021129853A1 (en) * | 2019-12-27 | 2021-07-01 | 华为技术有限公司 | Mobile service upgrade method and apparatus, and terminal |
| CN113050962B (en) * | 2019-12-27 | 2024-04-26 | 华为技术有限公司 | Mobile service upgrade method, device and terminal |
| US12056479B2 (en) | 2019-12-27 | 2024-08-06 | Huawei Technologies Co., Ltd. | Mobile service upgrade method and apparatus, and terminal |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107220074B (en) | 2020-10-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107220074A (en) | To the access of supporting layer software function, upgrade method and device | |
| KR100915564B1 (en) | Method, software and apparatus for application upgrade during execution | |
| CN105373396B (en) | Update of plug-in loading method and device in plug-platform | |
| US6996818B2 (en) | Update system for facilitating software update and data conversion in an electronic device | |
| US10447814B2 (en) | Joint servicing of software packages | |
| CN101931944B (en) | Method, device and system for updating terminal patches on line | |
| CN102411506B (en) | Java-system business-unit plug-in type managing system and dynamic business-function changing method | |
| CN107391104B (en) | Client and reactive native code update dependence management method, device and system | |
| CN101192937B (en) | A hot deployable method and its system | |
| CN102073526B (en) | Software transfer installation method and system for mobile terminal | |
| CN102622241A (en) | Software upgrading method and software upgrading device | |
| CN107506221A (en) | Application program updating method, apparatus and equipment | |
| CN105786538A (en) | Software upgrading method and device based on Android system | |
| CN105335187A (en) | Application processing method and apparatus | |
| CN112596771A (en) | Method and system for uninterrupted service upgrade | |
| CN106909409A (en) | A kind of method and device of the APK plug-in units for running application program | |
| CN118170431B (en) | Cross-operating system service migration method and device and electronic equipment | |
| CN113419766A (en) | Method, device, equipment and storage medium for intelligently updating program logic | |
| WO2020199543A1 (en) | Method and apparatus applicable to release and upgrade of hybrid application, and intelligent device | |
| JP6560824B2 (en) | How to manage packages in secure elements | |
| CN112256351B (en) | Method for realizing Feign component, method and device for calling micro-service | |
| CN110045998A (en) | Load the method and device of dynamic base | |
| CN119376755A (en) | Application optimization method and electronic device | |
| CN111090442B (en) | Application updating method, device and storage medium | |
| RU2339076C2 (en) | Execution of non-verified programs in radio communication device |
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 | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20201120 Address after: Room 603, 6 / F, Roche Plaza, 788 Cheung Sha Wan Road, Kowloon, China Patentee after: Zebra smart travel network (Hong Kong) Limited Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands Patentee before: Alibaba Group Holding Ltd. |
|
| TR01 | Transfer of patent right |