CN105302586A - Software upgrade processing method and device, terminal and server - Google Patents

Software upgrade processing method and device, terminal and server Download PDF

Info

Publication number
CN105302586A
CN105302586A CN201410289413.6A CN201410289413A CN105302586A CN 105302586 A CN105302586 A CN 105302586A CN 201410289413 A CN201410289413 A CN 201410289413A CN 105302586 A CN105302586 A CN 105302586A
Authority
CN
China
Prior art keywords
service unit
software
class
unit
strategy
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.)
Pending
Application number
CN201410289413.6A
Other languages
Chinese (zh)
Inventor
詹云桥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201410289413.6A priority Critical patent/CN105302586A/en
Priority to PCT/CN2014/082769 priority patent/WO2015196524A1/en
Publication of CN105302586A publication Critical patent/CN105302586A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention provides a software upgrade processing method and device, a terminal and a server. The method comprises: partitioning to-be-upgraded software into one or more software service units; extracting one or more adaption elements used for enriching the one or more software service units; and according to a predetermined injection policy, injecting the one or more adaption elements into the corresponding software service units. By using the software upgrade processing method and device, the terminal and the server which are provided by the present invention, problems of high complexity and low upgrading efficiency in software upgrade in the prior art are solved, so that the effects of greatly reducing software upgrading complexity and improving software upgrading efficiency are achieved.

Description

Software upgrading disposal route, device, terminal and server
Technical field
The present invention relates to the communications field, in particular to a kind of software upgrading disposal route, device, terminal and server.
Background technology
Along with the expansion of software size, its maintainability also decreases, and causes the complexity of software upgrading to increase the most at last.Such as, in software, a certain service needs to upgrade upgrading, and so these needs involved by service are all replaced by the content after renewal.The renewal of complex services causes escalation process--and the inefficiency of download, replace, restart, ressembling, complicated software size is also like this.
In order to promote download, replace speed, online difference upgrade function decreases download to a certain extent, reduces the complexity of upgrading.The problem thereupon brought be improve difference pack work and user upgrade across AKU, reason of searching to the bottom is: at no point in the update process, all the elements involved by update module all need to be updated software systems, upgrade granularity high.
Therefore, in the related, it is high to there is complexity in software upgrading, the problem of upgrading inefficiency.
Summary of the invention
The invention provides a kind of software upgrading disposal route, device, terminal and server, at least to solve in correlation technique, it is high to there is complexity in software upgrading, the problem of upgrading inefficiency.
According to an aspect of the present invention, provide a kind of software upgrading disposal route, comprising: be one or more software service unit by software demarcation to be upgraded; Extract the one or more adaptation element for enriching described one or more software service unit; According to predetermined injecting strategy, described one or more adaptation element is injected in corresponding software service unit.
Preferably, described predetermined injecting strategy comprise following one of at least: succession strategy, filterableness strategy, obstruction property strategy, deterministic policy, amalgamation strategy, navigational strategy, synchronism strategy.
Preferably, be that described software service unit comprises by described software demarcation to be upgraded: the software content of described software is split according to operation flow and technique direction; To have logical relation in operation flow, the Core Feature that technique direction is single is divided into a software service unit.
Preferably, before described one or more adaptation element being injected in corresponding described software service unit according to described predetermined injecting strategy, also comprise: the software operation flow process run is monitored; Whether described one or more adaptation element is injected into corresponding described software service unit by predetermined injecting strategy described in basis for estimation affects described software operation flow process, when judged result is no, be injected in corresponding described software service unit according to described one or more adaptation element.
Preferably, according to described predetermined injecting strategy, described one or more adaptation element is injected into corresponding described software service unit to comprise: the inner structure mapping out described software service unit and described adaptation unit according to predetermined mapping mechanism; According to described predetermined injecting strategy, and the inner structure of described software service unit and described adaptation unit generates agency service unit class source file; Compiling is carried out to described agency service unit class source file and obtains complete agency service unit class.
Preferably, obtain after described complete agency service unit class carrying out compiling to described agency service unit class source file, also comprise: described software service unit, described adaptation unit, described complete agency service unit class that described predetermined injecting strategy is corresponding are stored.
Preferably, after described agency service unit class source file being carried out to compiling and obtaining described complete agency service unit class, also comprise: described complete agency service unit class is verified.
According to a further aspect in the invention, provide a kind of software upgrading treating apparatus, comprising: divide module, for being one or more software service unit by software demarcation to be upgraded; Extraction module, for extracting the one or more adaptation element for enriching described one or more software service unit; Injection module, for being injected into described one or more adaptation element in corresponding software service unit according to predetermined injecting strategy.
Preferably, described division module comprises: cutting unit, for the software content of described software being split according to operation flow and technique direction; Division unit, for having logical relation in operation flow, the Core Feature that technique direction is single will be divided into a software service unit.
Preferably, this device also comprises: monitoring module, for monitoring the software operation flow process run; Judge module, for injecting strategy predetermined described in basis for estimation, described one or more adaptation element is injected into corresponding described software service unit and whether affects described software operation flow process, when judged result is no, be injected in corresponding described software service unit according to described one or more adaptation element.
Preferably, described injection module comprises: map unit, for mapping out the inner structure of described software service unit and described adaptation unit according to predetermined mapping mechanism; Generation unit, for according to described predetermined injecting strategy, and the inner structure of described software service unit and described adaptation unit generates agency service unit class source file; Compilation unit, obtains complete agency service unit class for carrying out compiling to described agency service unit class source file.
Preferably, this device also comprises: storage unit, for storing described software service unit, described adaptation unit, described complete agency service unit class that described predetermined injecting strategy is corresponding.
Preferably, this device also comprises: verify unit, for verifying described complete agency service unit class.。
According to a further aspect in the invention, additionally provide a kind of terminal, comprise the device described in above-mentioned any one.
In accordance with a further aspect of the present invention, provide a kind of server, comprise the device described in above-mentioned any one.
By the present invention, adopting software demarcation to be upgraded is one or more software service unit; Extract the one or more adaptation element for enriching described one or more software service unit; According to predetermined injecting strategy, described one or more adaptation element is injected in corresponding software service unit, solve in correlation technique, it is high to there is complexity in software upgrading, the problem of upgrading inefficiency, and then reach the complexity greatly reducing software upgrading, improve the effect of software updating efficiency.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of the software upgrading disposal route according to the embodiment of the present invention;
Fig. 2 is the structured flowchart of the software upgrading treating apparatus according to the embodiment of the present invention;
Fig. 3 is the preferred structure block diagram dividing module 22 in the software upgrading treating apparatus according to the embodiment of the present invention;
Fig. 4 is the preferred structure block diagram of the software upgrading treating apparatus according to the embodiment of the present invention;
Fig. 5 is the preferred structure block diagram one of injection module 26 in the software upgrading treating apparatus according to the embodiment of the present invention;
Fig. 6 is the preferred structure block diagram two of injection module 26 in the software upgrading treating apparatus according to the embodiment of the present invention;
Fig. 7 is the preferred structure block diagram three of injection module 26 in the software upgrading treating apparatus according to the embodiment of the present invention;
Fig. 8 is the structured flowchart of the terminal according to the embodiment of the present invention;
Fig. 9 is the structured flowchart of the server according to the embodiment of the present invention;
Figure 10 is the quick upgrading a general frame schematic diagram according to the embodiment of the present invention;
Figure 11 is the process flow diagram planned according to the software service unit of the embodiment of the present invention;
Figure 12 is the main modular schematic diagram of the local system according to the embodiment of the present invention;
Figure 13 is the core classes figure of the proxy class factory according to the embodiment of the present invention;
Figure 14 is the process flow diagram dynamically generating proxy class service unit according to the proxy class factory of the embodiment of the present invention;
Figure 15 is the building-block of logic of the dispensing unit according to the embodiment of the present invention;
Figure 16 is the mutual upgrading process flow diagram of terminal according to the embodiment of the present invention and server.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Provide a kind of software upgrading disposal route in the present embodiment, Fig. 1 is the process flow diagram of the software upgrading disposal route according to the embodiment of the present invention, and as shown in Figure 1, this flow process comprises the steps:
Software demarcation to be upgraded is one or more software service unit by step S102;
Step S104, extracts the one or more adaptation element for enriching one or more software service unit;
Step S106, according to predetermined injecting strategy, one or more adaptation element is injected in corresponding software service unit, it should be noted that, this predetermined injecting strategy can comprise multiple, such as, can be following one of at least: succession strategy, filterableness strategy, obstruction property strategy, deterministic policy, amalgamation strategy, navigational strategy, synchronism strategy.
Pass through above-mentioned steps, according to predetermined injecting strategy, by adaptation element, the mode be injected in software service unit realizes software upgrading, relative in correlation technique, to software upgrade requirement to whole software download, it is high to there is complexity in the not only software upgrading of the whole series replace, restart, configured, the problem of upgrading inefficiency, and then reach the complexity greatly reducing software upgrading, improve the effect of software updating efficiency.
When being software service unit by software demarcation to be upgraded, also can adopt various ways, more preferably, following processing mode can be adopted: the software content of software is split according to operation flow and technique direction; To have logical relation in operation flow, the Core Feature that technique direction is single is divided into a software service unit.
In order to ensure that escalation process does not have influence on the normal use of user to software of software, before one or more adaptation element being injected in corresponding software service unit according to predetermined injecting strategy, the software operation flow process run can be monitored; Whether one or more adaptation element is injected into corresponding software service unit by the predetermined injecting strategy of basis for estimation affects software operation flow process, when judged result is no, is injected in corresponding software service unit according to one or more adaptation element.Adopt such process, the problem that the experience can effectively avoiding upgrading flow process to bring reduces.
Preferably, when one or more adaptation element being injected in corresponding software service unit according to predetermined injecting strategy, following processing mode can be adopted: the inner structure mapping out software service unit and adaptation unit according to predetermined mapping mechanism; According to predetermined injecting strategy, and the inner structure of software service unit and adaptation unit generates agency service unit class source file; Compiling is carried out to agency service unit class source file and obtains complete agency service unit class.In order to make to avoid software repeatedly upgrading, obtain after complete agency service unit class carrying out compiling to agency service unit class source file, can also store software service unit, adaptation unit, complete agency service unit class that predetermined injecting strategy is corresponding.Afterwards, if receive the software same to this again, according to same adaptation unit, when adopting same predetermined injecting strategy to upgrade, directly can extract this complete agency service unit class of storage.Adopt such process, substantially increase the efficiency of software upgrading.
On the other hand, in order to ensure the quality of software upgrading, after agency service unit class source file being carried out to compiling and obtaining complete agency service unit class, can also verify complete agency service unit class, such as, type can be carried out to the complete agency service unit class of rear acquisition of having upgraded, grammer, assembling, rule verify respectively.
Additionally provide a kind of software upgrading treating apparatus in the present embodiment, this device is used for realizing above-described embodiment and preferred implementation, has carried out repeating no more of explanation.As used below, term " module " can realize the software of predetermined function and/or the combination of hardware.Although the device described by following examples preferably realizes with software, hardware, or the realization of the combination of software and hardware also may and conceived.
Fig. 2 is the structured flowchart of the software upgrading treating apparatus according to the embodiment of the present invention, and as shown in Figure 2, this device comprises division module 22, extraction module 24 and injection module 26, is described below to this device.
Divide module 22, for being one or more software service unit by software demarcation to be upgraded; Extraction module 24, is connected to above-mentioned division module 22, for extracting the one or more adaptation element for enriching one or more software service unit; Injection module 26, is connected to said extracted module 24, for one or more adaptation element being injected in corresponding software service unit according to predetermined injecting strategy.
Fig. 3 is the preferred structure block diagram dividing module 22 in the software upgrading treating apparatus according to the embodiment of the present invention, and as shown in Figure 3, this division module 22 comprises: cutting unit 32 and division unit 34, is described below to this division module 22.
Cutting unit 32, for splitting the software content of software according to operation flow and technique direction; Division unit 34, is connected to above-mentioned cutting unit 32, and for having logical relation in operation flow, the Core Feature that technique direction is single will be divided into a software service unit.
Fig. 4 is the preferred structure block diagram of the software upgrading treating apparatus according to the embodiment of the present invention, and as shown in Figure 4, this device, except comprising the structure shown in Fig. 2, also comprises: monitoring module 42 and judge module 44, be described this device below.
Monitoring module 42, is connected to said extracted module 24, for monitoring the software operation flow process run; Judge module 44, be connected to above-mentioned monitoring module 42 and injection module 26, for the predetermined injecting strategy of basis for estimation, one or more adaptation element is injected into corresponding software service unit and whether affects software operation flow process, when judged result is no, be injected in corresponding software service unit according to one or more adaptation element.
Fig. 5 is the preferred structure block diagram one of injection module 26 in the software upgrading treating apparatus according to the embodiment of the present invention, and as shown in Figure 5, this injection module 26 comprises: map unit 52, generation unit 54 and compilation unit 56, is described below to this injection module 26.
Map unit 52, for mapping out the inner structure of software service unit and adaptation unit according to predetermined mapping mechanism; Generation unit 54, is connected to above-mentioned map unit 52, and for according to predetermined injecting strategy, and the inner structure of software service unit and adaptation unit generates agency service unit class source file; Compilation unit 56, is connected to above-mentioned generation unit 54, obtains complete agency service unit class for carrying out compiling to agency service unit class source file.
Fig. 6 is the preferred structure block diagram two of injection module 26 in the software upgrading treating apparatus according to the embodiment of the present invention, and as shown in Figure 6, this device, except comprising all modules shown in Fig. 5, also comprises storage unit 62, is described below to this storage unit 62.
Storage unit 62, is connected to above-mentioned compilation unit 56, for storing software service unit, adaptation unit, complete agency service unit class that predetermined injecting strategy is corresponding.
Fig. 7 is the preferred structure block diagram three of injection module 26 in the software upgrading treating apparatus according to the embodiment of the present invention, and as shown in Figure 7, this device, except comprising all modules shown in Fig. 5, also comprises and verifies unit 72, be described below to this verification unit 72.
Verifying unit 72, being connected to above-mentioned compilation unit 56, for verifying complete agency service unit class.。
Fig. 8 is the structured flowchart of the terminal according to the embodiment of the present invention, and as shown in Figure 8, this terminal 80 comprises the software upgrading treating apparatus 82 of above-mentioned any one.
Fig. 9 is the structured flowchart of the server according to the embodiment of the present invention, and as shown in Figure 9, this server 90 comprises the software upgrading treating apparatus 82 of above-mentioned any one.
For in correlation technique, it is high to there is complexity in software upgrading, the problem of upgrading inefficiency, in the present embodiment, provides a kind of a general frame improving upgrading efficiency; Comprise software service dividing elements method, adaptation element extraction, dynamical assemble engine, field control etc.The advantage of this framework is: current service unit can inject different adaptation element to eliminate by bonding from the nuance of the service unit after upgrading, and the complicacy both reducing single service unit decreases the quantity of service.In addition on the one hand, for the demand developing new service unit, can first consider to be assembled into by existing service unit and adaptation element the service meeting user's new demand, to reduce the impact of new demand for software systems.For developer, compared to service unit, the design and development task amount of adaptation element is less, and easy care, simultaneously by dynamical assemble engine, by revising existing adaptation element or increasing new adaptation element to reach the object revising service function, instead of new service unit or amendment service unit can be increased.As can be seen here, by the escalation process of this scheme, download and update complexity will reduce further.To final escalation process from software design stage, the extensibility of planning software, improves the maintainability of software, thus finally promotes software updating efficiency.
For in correlation technique, the expansion of software size, the maintainability of software declines thereupon, update module granularity is caused to raise, software upgrade process complexity is finally made to improve, reduce upgrading efficiency and affect the problem of Consumer's Experience, by above-mentioned bonding method for implanting in the application of software expandable to improve software updating efficiency.Below the method that this bonding is injected is described.
When in software systems operational process, when user's request service unit provides function, service unit, adaptation element and injecting strategy changeable assembling will be supplied to user for " complete service unit " by dynamical assemble engine in real time.The adaptation element of service unit and injecting strategy flexibly changing, can be assembled by dynamical assemble engine " the complete service unit " of providing standby New function, finally, and the version after making software systems be updated to upgrading.
Service unit is the part in the software requirement in current business field with relatively independent function, and it only relates to basic function.Adaptation element is the expanded function part of a certain service unit, and its function of injecting part is injected into service unit interface with it must possess certain compatibility.Adaptation element needs to be injected in respective service unit by injecting strategy, to expand its function.The main contents of injecting strategy are the format description that adaptation element injects service unit, comprising: the method for implanting entrance, adaptation element interface, assembling form etc. of adaptation element.
Dynamical assemble engine major function is the format description according to the inner structure of a certain service unit, the inner structure of its adaptation element and injecting strategy, dynamically generates new service unit.Its core component comprises: reflection part, compilation unit, loading component, instantiation parts and buffer memory parts.The major function of reflection part is by reflex mechanism, maps out the inner structure of service unit and adaptation element.Miscellaneous part completes the compiling of the complete service class file dynamically generated, loading, instantiation, and a series of process of buffer memory.
Under bonding method for implanting instructs, software requirement function need be divided into independently service unit and adaptation element, by dynamical assemble engine, read up-to-date configuration documentation, in real time for user assembled go out to upgrade after software systems.Escalation process does not affect the current process operation of user, and user's current operation be preserved and be processed to These field control modules will, and whole escalation process is to user transparent.Figure 10 is the quick upgrading a general frame schematic diagram according to the embodiment of the present invention, as shown in Figure 10, this framework mainly comprises following parts: field control (EC), service unit class management (SCM), adaptation element class management (CCM), injecting strategy control (PSC), assembling verification (AC), updating and management (UM), dynamical assemble engine (DLE).Be described respectively for all parts below.
Software service unit is planned
Service unit prcgramming ideas is from 2 points; Service content and service granularity.Service content should go definition from concrete business, make service function more suit the actual conditions of operation flow in specific field, and the granularity aspect of service, then should ensure to have on the basis of business atomicity and technology atomicity, keep minimum fine granularity.Figure 11 is the process flow diagram planned according to the software service unit of the embodiment of the present invention, and as shown in figure 11, this flow process comprises the steps:
The first step: comprehensive collection; Knowledge shown in concrete business scope carried out collect, analyze, sum up.Fully understand this business, decomposite the logic dependencies of each key business activity in business scope.
Second step: service unit is split; From business aspect and technical elements, the content of comprehensive collection is split.Business aspect; Be that " minimum " function that business activity comprises by boundary divides out with business purpose.So, ensure that the minimal service function dividing out has legal flow elements meaning in concrete business scope.Technical elements; Go to be partitioned into service unit from the dimension of technology and mainly serve the service unit be partitioned into from operational angle.The service range of technical service unit should be independent with concrete business tine, keeps its minimum atomicity with the reusability of service unit in software systems that develop skill simultaneously.
3rd step: combine and return; First, Core Feature single for the service orientation that operation flow has stronger logic dependencies and technical service unit is incorporated into as single service unit.Dependence comprises forward direction dependence and A->B, backward dependence A<-B, bidirectional dependency A<->B, and wherein the dependence of bidirectional dependency is the strongest.The service unit not high by reusing degree is also classified as a service unit, although cause the service of coarseness to produce, but, this service unit is the service that stability is higher, should avoid dynamically being generated by dynamical assemble engine in software systems, the operational efficiency of raising system, the software systems of being disposed in distributed environment by it.
The definition of service unit interface to note coupling with can injection, reduce coupling and be conducive to independent expansion, raising can suitability, then can adaptation element easily.The specific implementation of service to serve basic object for reference, namely only should be paid close attention to necessary demand in current service definition, and is not paid close attention to the expanded function that may need in the future.
Adaptation element is extracted
Adaptation element leaching process is based upon on the basis of relatively independent service unit, and object is the function enriching service unit aspect.The function of complete service unit comprises: basic service function and expanded function part.Basic service function relates in the software service unit planning stage.Expanded function part is completed by adaptation element.The object of element definition; The first, enrich current service unit, to meet active user's demand.The second, between coordination service, interelement and service and interelement logical relation, to meet current business flow process.As long as it is more reasonable that the interface between service and element defines--especially extensibility aspect, so, the expanded function of service unit can infinitely increase.So far the stage, operational mode is injected in the bonding that software systems become " the many assembling elements of single Service Instance ".Table 1 be according to the embodiment of the present invention through software service unit planning and the adaptation element extraction stage after, the service unit expansion table completed, as shown in table 1.
Table 1
By this form, independent service unit in current whole software systems and can the combined situation of adaptation element can be fullyed understand.After this, as service a certain in system need upgrade time, in being served by more new element Dynamic injection by dynamical assemble engine, " complete " service unit example after assembling provides service function for user, and the whole process of the new service unit class dynamically produced is completely transparent for client and operating software operation system.
So far, software systems can according to being stored in local service extension structure, completed a series of processes such as startup, operation, upgrading by local systems such as dynamical assemble engine, field controls, Figure 12 is the main modular schematic diagram of the local system according to the embodiment of the present invention, as shown in figure 12.
Proxy class factory
Proxy class factory module comprises reflection part, compilation unit, loading component, instantiation parts, buffer memory parts.
Reflection part; Pass through reflex mechanism, obtain the inside one-piece construction being injected into service unit class, wherein mainly comprise: the parameter list of method name, method, modification device (such as public, private, static etc.), superclass (as Object), realize interfaces (as Serializable), fields.Most importantly obtain being assembled the method collection in service unit class inside by reflection part.Method integrates the injection object as adaptation element class.The main flow development language with reflex mechanism has Java and C#.
Compilation unit; Needed through on-the-flier compiler by the source file of agency service class, after generating run file, could run in software systems.The location mode of operating file mainly contains two kinds; The first, stored in a hard disk by the file after compiling, this situation can not account for a large amount of internal memories, but needs the process through being loaded into internal memory, inefficiency, and, a large amount of compiling files can be produced.The second, is stored in internal memory, and the efficiency of this situation is higher, if but the dynamic agency service unit class that generates will take a large amount of internal memories, may memory overflow be caused.In Java development language, main flow compilation tool has JavaCompiler, CGLIB, ASM.In C# development language, a CSharpCodeProvider class in Microsoft.Csharp NameSpace, is had to provide instance access to C# code generator and compiler.
Loading component; The operating file of agency service unit class needs to generate corresponding class by loading component.The load mode of class file should be varied, should not be confined to the file under loading classpath path.
Instantiation parts; The object being produced this type of by instantiation parts is returned to operation layer logic by the class generated.
Buffer memory parts; In order to improve the formation efficiency of agency service unit class, by cache entries; Service unit class ID, adaptation element class ID, injecting strategy class ID, be stored in buffer memory parts, when the real-time interface obtaining agency service unit class is called, to first retrieve buffer memory parts, being assembled by same adaptation element class and injecting strategy as having identical service unit class, will directly the object of the agency service unit class be stored in buffer memory parts be returned.The primary reference point of the escape mechanism of buffer memory parts comprises: the number of times etc. of the object generation of memory size, agency service unit class.
Figure 13 is the core classes figure of the proxy class factory according to the embodiment of the present invention, and as shown in figure 13, service unit class Service and agency service unit class ProxyService realizes interface Serviced, and adaptation element class Logger realizes interface Component.In Policy interface, GetSMethodName method obtains being assembled the method name be assembled in service class; SetSMethodName method is for arranging the method name being assembled and being assembled in service class; GetPMethodName method obtains trailing name in decoration adaptation element class; SetPMethodName method is used for arranging trailing name in decoration adaptation element class; Injecting strategy class Vertical realizes interface Policy, and dissimilar injecting strategy class all realizes same policy interface Policy.Service unit administrative class ServicedMgr and adaptation element administrative class ComponentMgr controls the registration of service unit class Serviced and adaptation element class Component, loading and pool separately.In order to obtain service unit class and adaptation element class source file by service unit class ID and adaptation element class ID, acting on behalf of factory class ProxyFactory aggregate packet and containing a service unit administrative class object and an adaptation element administrative class object.The newInstance () method in factory class acted on behalf of, by sequence call buffer memory unit interface, reflection part interface, compilation unit interface, loading component interface, instantiation unit interface, finally generates agency service class object.Wherein, agency service class and service unit class all realize same service interface Serviced, and agency service is birdsed of the same feather flock together, and unification is individual is assembled service unit class object and adaptation element object.
Figure 14 is the process flow diagram dynamically generating proxy class service unit according to the proxy class factory of the embodiment of the present invention, and as shown in figure 14, in bonding injected system, the public flow process of all clients is: 1. 2.-> is 3. for->.First, client provides service unit ID, adaptation element ID, injecting strategy ID to obtain agency service class object to proxy class factory.Then, proxy class factory uses in " service unit ID+ adaptation element ID+ injecting strategy ID " unitized construction to buffer memory parts and retrieves corresponding agency service class object.If have found corresponding object, then directly perform 10., by proxy class, object is returned to client by factory.Otherwise, if find not corresponding object in buffer memory parts, then perform 4.-> 5.-> 6.-> 7.-> 8.-> 9. a series of flow process.
Injecting strategy controls
When reflection part in proxy class factory generates agency service class source file, need by injecting strategy class, adaptation element to be injected in the middle of corresponding service unit class.According to the service unit of different qualities, dissimilar strategy is used to be supplied to adaptation element, effectively to assemble service unit.In order to make up the contradiction between the public attribute of service unit and the new-type attribute of existing customer, adaptation element class functionally can make up service unit in provided deficiency functionally, and injecting strategy is then making up in form for adaptation element injection service provides injection standard.Injecting strategy type is a class adaptation element class form service, and in order to make up the deficiency of every service, one or more adaptation element can inject service unit class by one or more policing types.
Type projects comprises succession strategy, filterableness strategy, obstruction property strategy, deterministic policy, amalgamation strategy, navigational strategy, synchro control strategy.
Succession strategy; Service unit class and injection adaptation element have logic context and dependence is poor.Assembling form: service.execute ()->plug.execute () otherwise or.Application scenarios: there is vertical relation, as unaffected in operation flow in daily record, affairs or authority, Agent Service.
Filterableness strategy; The complete result of service unit class need to be injected into adaptation element again through filtration obtain end product and between dependence high.Assembling form is as plug.execute (service.execute ()).Application scenarios: query composition.
Obstruction property strategy; The reception information of service unit class needs to be injected into adaptation element and stops partial content, after service unit class is complete, is needed to be combined with the returned content of service unit class to pass to next treatment scheme by the content of stopping.Assembling form: plug.intercept ()->service.execute ()->plug.giveBack ().Application scenarios: the current authority calling the user of service class unit changes, sensitive content needs this user transparent.
Deterministic policy; The function injecting adaptation element is have invoked in the whole implementation of service unit class, before agency service unit class is generated, uncertain concrete adaptation element class object.Assembling form: service.execute (plug).Application scenarios: allocating object or the processed object of current service unit class change, this object should be born by injection adaptation element.
Amalgamation strategy; The reception information of the information after the process of last service unit class and a rear service unit class is incompatible, cause them in current operation flow process, do not have logical relation, now, needing by injecting adaptation element, their graftings to be merged, eliminating the incompatibility between them.Assembling form: serviceA.execute ()->plug.execute ()->serviceB.execute ().Application scenarios: the number of current whole operation flow does not change, but the logical order of flow process needs to change.
Navigational strategy; Result after the process of current service unit class completes, under concrete this result of reception, once service unit class oneself is indefinite, and is determined by injection adaptation element.Assembling form: service.execute ()->plug.navigate ().Application scenarios: next operation flow needs current treatment scheme transparent.
Synchro control strategy; Service unit class, before process current process, needs to take concrete treatment scheme according to current flow state.Judge that the state of current process is not only relevant with the state of current service unit class own, and and other voice and packet data concurrent service flow processs or general element, as relevant in time etc., concrete injection adaptation element class points out the current state of flow process.Assembling form: status=plug.evaluate (affairs)->service.execute (affairs, status).Application scenarios: need between voice and packet data concurrent service flow process to coordinate.
Assembling management and control; Simulate the injecting strategy that current developer selects for adaptation element class and generate the service unit logic of class, help developer prevent illegal or do not meet the generation of business need service unit class.
Assembling is verified
Type filter; Verify in the character string of agency service unit class the mistake whether occurring inheriting type, the standard examined or check is whether the parent of agency service unit class is identical with by the parent of agency service unit class, otherwise, turn back in the code of operation layer logic and will there will be the inconsistent mistake of type.
Grammer filtrator; Verify the basic syntax mistake in the character string of the agency service unit class generated.The compilation unit in proxy class factory is avoided generation to be quoted imperfect mistake or other non-causing property mistakes.
Assembling filtrator; Main inspection also revises some adaptation element when assembling service, the mistake of institute's generated statement.Generated statement does not mate with a upper statement or next statement.
Regular filters; This filtrator refers to providing increase verification entry to provide interface in the future for developer.The unnecessary illegal mistake of perfect regular filters guarantee is only had constantly to appear at the compilation phase, because be irreversible in the mistake of compilation phase, so, only have and find mistake in the assembling verification stage as much as possible, and revise grammar mistake.
Usually, when assembling verification module check and going out incompatible mistake, the mistake revised in time in configuration documentation is needed.And returning to server, the adaptation element in current upgraded version is illegal with the injecting strategy chosen.
Field control
When client receives the renewal version command of server, need protection user when pre-treatment scene, carry out with the upgrading of the flow process and redaction that ensure legacy version simultaneously and be independent of each other, to reach upgrading of mourning in silence, really to user transparent.
Tracker; Track record user current business operation process, for judging whether the service unit after upgrading can affect the current and follow-up operation flow of user.Usually, before operation flow starts or terminate after, each service unit class can be fully updated upgrading.
Responsor; The upgrade service unit class of reception server end, adaptation element class, injecting strategy class and corresponding configuration documentation, and increase, replace, delete respective type file, in this course, retouching operation needs to carry out alternately with register, as having influence on current business flow process, needing document involved by buffer memory, and set up observer in tracker, with box lunch affect behavior do not exist time, then continue retouching operation.
Controller; Load cached configuration document; The first, when software systems start, first, the service unit class in whole system and its configuration information such as additional adaptation element class and injecting strategy class are loaded on internal memory, so that during system cloud gray model, dynamically generate agency service unit class.The second, when responsor renewal local file process completes, heavy duty loads configuration documentation to replace the copy in buffer memory.
Server end is disposed and client configuration document
At server end, Figure 15 is the building-block of logic of the dispensing unit according to the embodiment of the present invention, and as shown in figure 15, this service unit class, adaptation element class, injecting strategy class (hereinafter referred to as dispensing unit) information are stored in the logical organization of database.Service unit class and its additional information are all to be stored in a database by serializing.
Service end ROMPaq mainly contains two parts composition; The first, colophon device: record which dispensing unit of current version and last version modify.Second, pusher: the version information that the version information of client and needs are upgraded is issued colophon device and contrasts, obtain the dispensing unit list that client needs amendment, according to this list, from database, find the serializing item of dispensing unit, and generate the respond module that configuration documentation modification item is pushed to the field control parts in client-side program in the lump.Table 2 pushes form signal table according to the AKU JSON of the embodiment of the present invention, as shown in table 2:
Table 2
Wherein, the dispensing unit sequence needed for upgrading mainly comprises the filename of unit, and the serializing result key-value pair of source file.Configuration documentation mainly contains each agency service unit class numbering, and needs the dispensing unit upgraded to combine key-value pair.
Client configuration document storage format can adopt following language expression:
<itemID=”1”service=”com.flexible.service.Register”plug=”com.flexible.component.Checker”policy=”com.flexible.policy.Intercept”/>
<itemID=”2”service=”com.flexible.service.Saver”plug=”com.flexible.component.Log”policy=”com.flexible.policy.Order”/>
……
<itemID=”N”service=”com.flexible.service.Index”plug=”com.flexible.component.Enhance”policy=”com.flexible.policy.Filter”/>
Wherein, each agency service unit item is made up of numbering, service unit class name, adaptation element class name, injecting strategy class name, and numbering is the entrance of dynamical assemble engine and responsor amendment configuration documentation.
Figure 16 is the mutual upgrading process flow diagram of terminal according to the embodiment of the present invention and server, and as shown in figure 16, this flow process comprises the steps:
S1, in client, in field control, responsor sends active client software version information to server end ROMPaq.
S2, server end ROMPaq is by the version information of client and currently need the version of upgrading to give colophon device to be analyzed.
S3, colophon device returns service unit class, adaptation element class, the injecting strategy class that client is updated to the required amendment of upgraded version.
S4, gives pusher to inquire about database by the list of dispensing unit details.
S5, generates corresponding configuration documentation adjustment item according to database query result, and it is converted into JSON data with the serializing of amendment dispensing unit returns to client end response device.
S6, resolve JSON data, configuration documentation is adjusted item number according to the impact analysis of giving tracker and carrying out real time business flow process, and the observer's audiomonitor in responsor is registered in tracker, while operation flow changes, responsor can adjust update process process.
S7, affects result to real time business flow process return to responsor by revising dispensing unit needed for current upgraded version.Operation flow affects result and mainly comprises: whether affect current business flow process, which dispensing unit affects current business flow process etc.
S8, affects result according to operation flow and starts Reconfigurations unit process.As on current business flow process without impact, then directly update all replaces dispensing unit, and as dispensing unit out of the ordinary exists impact to current business flow process, then waiting for that observer monitors to return affects operation flow and complete message and continue update process again.
S9, after responsor completes whole upgrading renewal process, sends message to controller.
S10, adjusts the data in the configuration documentation buffer memory in item update controller by configuration documentation.
S11, after dispensing unit and configuration documentation buffer update complete, Business Logic generates " complete " agency service unit class to controller request.
S12, searches class name just, and they is passed to dynamical assemble engine for No. ID according to the dispensing unit in the request of Business Logic in configuration documentation buffer memory.
S13, passes to reverberator by service unit class name, adaptation element class name, injecting strategy class name.
S14, generates complete agency service unit class source file and passes to compiler by reverberator.
S15, passes to loader by the source file result class file through process of compilation.
S16, is loaded on the class file after compiling in internal memory, and the class file loading in internal memory is passed to instantiation device, generates the object of " complete " agency service unit class.
S17, passes to buffer memory parts by the agency service unit class object after instantiation and service unit class ID, adaptation element class ID, injecting strategy class ID, sets up respective cache entry.
S18, returns agency service unit class instance object to dynamical assemble engine.
S19, dynamical assemble engine will assemble " complete " object and return to controller.
S20, finally, " complete " agency service unit class object is returned to corresponding service logical layer by controller.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, and in some cases, step shown or described by can performing with the order be different from herein, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (15)

1. a software upgrading disposal route, is characterized in that, comprising:
Be one or more software service unit by software demarcation to be upgraded;
Extract the one or more adaptation element for enriching described one or more software service unit;
According to predetermined injecting strategy, described one or more adaptation element is injected in corresponding software service unit.
2. method according to claim 1, is characterized in that, described predetermined injecting strategy comprise following one of at least:
Succession strategy, filterableness strategy, obstruction property strategy, deterministic policy, amalgamation strategy, navigational strategy, synchronism strategy.
3. method according to claim 1, is characterized in that, is that described software service unit comprises by described software demarcation to be upgraded:
The software content of described software is split according to operation flow and technique direction;
To have logical relation in operation flow, the Core Feature that technique direction is single is divided into a software service unit.
4. method according to claim 1, is characterized in that, before being injected in corresponding described software service unit according to described predetermined injecting strategy by described one or more adaptation element, also comprises:
The software operation flow process run is monitored;
Whether described one or more adaptation element is injected into corresponding described software service unit by predetermined injecting strategy described in basis for estimation affects described software operation flow process, when judged result is no, be injected in corresponding described software service unit according to described one or more adaptation element.
5. method according to any one of claim 1 to 4, is characterized in that, according to described predetermined injecting strategy, described one or more adaptation element is injected into corresponding described software service unit and comprises:
The inner structure of described software service unit and described adaptation unit is mapped out according to predetermined mapping mechanism;
According to described predetermined injecting strategy, and the inner structure of described software service unit and described adaptation unit generates agency service unit class source file;
Compiling is carried out to described agency service unit class source file and obtains complete agency service unit class.
6. method according to claim 5, is characterized in that, after described agency service unit class source file being carried out to compiling and obtaining described complete agency service unit class, also comprises:
Described software service unit, described adaptation unit, described complete agency service unit class that described predetermined injecting strategy is corresponding are stored.
7. method according to claim 5, is characterized in that, after described agency service unit class source file being carried out to compiling and obtaining described complete agency service unit class, also comprises:
Described complete agency service unit class is verified.
8. a software upgrading treating apparatus, is characterized in that, comprising:
Divide module, for being one or more software service unit by software demarcation to be upgraded;
Extraction module, for extracting the one or more adaptation element for enriching described one or more software service unit;
Injection module, for being injected into described one or more adaptation element in corresponding software service unit according to predetermined injecting strategy.
9. device according to claim 8, is characterized in that, described division module comprises:
Cutting unit, for splitting the software content of described software according to operation flow and technique direction;
Division unit, for having logical relation in operation flow, the Core Feature that technique direction is single will be divided into a software service unit.
10. device according to claim 8, is characterized in that, also comprises:
Monitoring module, for monitoring the software operation flow process run;
Judge module, for injecting strategy predetermined described in basis for estimation, described one or more adaptation element is injected into corresponding described software service unit and whether affects described software operation flow process, when judged result is no, be injected in corresponding described software service unit according to described one or more adaptation element.
Device according to any one of 11. according to Claim 8 to 10, is characterized in that, described injection module comprises:
Map unit, for mapping out the inner structure of described software service unit and described adaptation unit according to predetermined mapping mechanism;
Generation unit, for according to described predetermined injecting strategy, and the inner structure of described software service unit and described adaptation unit generates agency service unit class source file;
Compilation unit, obtains complete agency service unit class for carrying out compiling to described agency service unit class source file.
12. devices according to claim 11, is characterized in that, also comprise:
Storage unit, for storing described software service unit, described adaptation unit, described complete agency service unit class that described predetermined injecting strategy is corresponding.
13. devices according to claim 11, is characterized in that, also comprise:
Verify unit, for verifying described complete agency service unit class.
14. 1 kinds of terminals, is characterized in that, comprise the device according to any one of claim 8 to 13.
15. 1 kinds of servers, is characterized in that, comprise the device according to any one of claim 8 to 13.
CN201410289413.6A 2014-06-24 2014-06-24 Software upgrade processing method and device, terminal and server Pending CN105302586A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410289413.6A CN105302586A (en) 2014-06-24 2014-06-24 Software upgrade processing method and device, terminal and server
PCT/CN2014/082769 WO2015196524A1 (en) 2014-06-24 2014-07-22 Software upgrade processing method and device, terminal and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410289413.6A CN105302586A (en) 2014-06-24 2014-06-24 Software upgrade processing method and device, terminal and server

Publications (1)

Publication Number Publication Date
CN105302586A true CN105302586A (en) 2016-02-03

Family

ID=54936542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410289413.6A Pending CN105302586A (en) 2014-06-24 2014-06-24 Software upgrade processing method and device, terminal and server

Country Status (2)

Country Link
CN (1) CN105302586A (en)
WO (1) WO2015196524A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544756A (en) * 2017-08-03 2018-01-05 上海交通大学 Method is locally stored in Key Value log types based on SCM
CN107943502A (en) * 2017-12-01 2018-04-20 天津麒麟信息技术有限公司 A kind of upgrade method based on the detection of fine granularity system mode under linux system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885526A (en) * 2017-11-17 2018-04-06 苏州蜗牛数字科技股份有限公司 A kind of file updating method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106622A1 (en) * 2005-11-10 2007-05-10 International Business Machines Corporation System, method and program to manage software licenses
CN101008901A (en) * 2007-01-31 2007-08-01 华为技术有限公司 Method and system for implementing dynamic upgrade of application system
CN102006332A (en) * 2010-12-03 2011-04-06 杭州华三通信技术有限公司 Method and system for software upgrading
CN102023881A (en) * 2010-12-14 2011-04-20 福建星网锐捷网络有限公司 Method and device for upgrading software as well as embedded device
CN102378055A (en) * 2010-08-16 2012-03-14 康佳集团股份有限公司 Web television (TV) system and upgrading method thereof
CN102833101A (en) * 2012-08-22 2012-12-19 瑞斯康达科技发展股份有限公司 Software upgrading method and equipment of distributed network system
CN103365676A (en) * 2012-04-01 2013-10-23 中兴通讯股份有限公司 Software upgrading method and device for communication equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7379419B2 (en) * 2003-08-13 2008-05-27 Samsung Electronics Co., Ltd. Apparatus and method for performing an online software upgrade of resource servers
CN100339830C (en) * 2005-03-11 2007-09-26 联想(北京)有限公司 Method for updating software
CN102316439B (en) * 2011-09-09 2017-11-24 中兴通讯股份有限公司 A kind of firmware upgrade method and system for realizing user side equipment
CN102436390B (en) * 2012-01-09 2015-06-03 北京华为数字技术有限公司 Method and equipment for upgrading software of multi-core processor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106622A1 (en) * 2005-11-10 2007-05-10 International Business Machines Corporation System, method and program to manage software licenses
CN101008901A (en) * 2007-01-31 2007-08-01 华为技术有限公司 Method and system for implementing dynamic upgrade of application system
CN102378055A (en) * 2010-08-16 2012-03-14 康佳集团股份有限公司 Web television (TV) system and upgrading method thereof
CN102006332A (en) * 2010-12-03 2011-04-06 杭州华三通信技术有限公司 Method and system for software upgrading
CN102023881A (en) * 2010-12-14 2011-04-20 福建星网锐捷网络有限公司 Method and device for upgrading software as well as embedded device
CN103365676A (en) * 2012-04-01 2013-10-23 中兴通讯股份有限公司 Software upgrading method and device for communication equipment
CN102833101A (en) * 2012-08-22 2012-12-19 瑞斯康达科技发展股份有限公司 Software upgrading method and equipment of distributed network system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544756A (en) * 2017-08-03 2018-01-05 上海交通大学 Method is locally stored in Key Value log types based on SCM
CN107544756B (en) * 2017-08-03 2020-11-06 上海交通大学 Key-Value log type local storage method based on SCM
CN107943502A (en) * 2017-12-01 2018-04-20 天津麒麟信息技术有限公司 A kind of upgrade method based on the detection of fine granularity system mode under linux system
CN107943502B (en) * 2017-12-01 2021-04-27 麒麟软件有限公司 Upgrading method based on fine-grained system state detection in Linux system

Also Published As

Publication number Publication date
WO2015196524A1 (en) 2015-12-30

Similar Documents

Publication Publication Date Title
Casati et al. Workflow evolution
US11172022B2 (en) Migrating cloud resources
CN102656557B (en) Automate enterprise-software-development
CN110019215A (en) Key schema management in multiple lease database system
US6539396B1 (en) Multi-object identifier system and method for information service pattern environment
US6477665B1 (en) System, method, and article of manufacture for environment services patterns in a netcentic environment
CN110147369A (en) Data separating and write-in in multiple lease database system redirect
CN109947767A (en) System in multiple lease database system shares type
CN111324571B (en) Container cluster management method, device and system
CN109947773A (en) Change of the deployment to key mode in multi-tenant database system
US20140280484A1 (en) Dynamic Service Extension Infrastructure For Cloud Platforms
CN109087004B (en) Public workflow engine system based on domain model
US10127218B2 (en) Object templates for data-driven applications
US20100005074A1 (en) System and method for accessing data
CN107077388A (en) System and method for providing end-to-end life cycle in multi-tenant application server environment
CN104216912A (en) Method and device for achieving non-intrusive service form workflow
US20150067503A1 (en) System and method for virtual assistants with agent store
US20160219097A1 (en) Providing services as resources for other services
WO2015126411A1 (en) Migrating cloud resources
Shukla et al. Smart contracts for multiagent plan execution in untrusted cyber-physical systems
CN109240670A (en) Modular software development methodology, system, equipment and medium
Song et al. Preserving data flow correctness in process adaptation
Stevens Connecting software build with maintaining consistency between models: towards sound, optimal, and flexible building from megamodels
CN105302586A (en) Software upgrade processing method and device, terminal and server
US20230099501A1 (en) Masking shard operations in distributed database systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160203

RJ01 Rejection of invention patent application after publication