CN109697076A - A kind of dynamic updating method of application software resources, device and equipment - Google Patents

A kind of dynamic updating method of application software resources, device and equipment Download PDF

Info

Publication number
CN109697076A
CN109697076A CN201710998252.1A CN201710998252A CN109697076A CN 109697076 A CN109697076 A CN 109697076A CN 201710998252 A CN201710998252 A CN 201710998252A CN 109697076 A CN109697076 A CN 109697076A
Authority
CN
China
Prior art keywords
bundle
file
version number
bundle file
resource
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
CN201710998252.1A
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.)
TCL Corp
Original Assignee
TCL 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 TCL Corp filed Critical TCL Corp
Priority to CN201710998252.1A priority Critical patent/CN109697076A/en
Publication of CN109697076A publication Critical patent/CN109697076A/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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

A kind of dynamic updating method of application software resources includes: the version number for the cloud configuration file that acquisition is applied, and local profile version number is compared with the version number of cloud configuration file;If the version number of the local profile is lower than the version number of the cloud configuration file, the version number of the local profile is updated, and download Bundle file corresponding to the version number of the cloud configuration file;According to the mark of the Bundle file of downloading, Bundle document data bank is updated in systems;According to preset protocol interface, the Bundle file is called.Due to not needing in addition to create installation package file and creation agency, be conducive to mitigate system burden, and improve the update efficiency of application software resources.

Description

A kind of dynamic updating method of application software resources, device and equipment
Technical field
The invention belongs to software upgrading field more particularly to a kind of dynamic updating method of application software resources, device and Equipment.
Background technique
For the application program under Android system, after the completion of application development, if necessary to application program updating, For example the resource file in application program is updated, interface, modification interface, function optimization etc. is added, generally requires again The installation kit of application software is packaged, application program could be made to complete to update.
In order to improve the convenience of application program update, update method at this stage includes rebuilding comprising money to be updated The Android Android software installation kit APK in source, and create and act on behalf of Activity load, it is redirected newly by acting on behalf of Activity The Android software installation kit APK comprising resource to be updated of building.Since there is still a need for building software installation packets for renewal process With act on behalf of Activity so that update is inefficient, and increase system burden.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of dynamic updating method of application software resources, device and equipment, To solve software resource dynamic update mode in the prior art, there is still a need for building software installation packet and agencies for renewal process Activity, so that update is inefficient, and the problem of increase system burden.
The first aspect of the embodiment of the present invention provides a kind of dynamic updating method of application software resources, and the application is soft The dynamic updating method of part resource includes:
The version number for obtaining the cloud configuration file of application, by the version of local profile version number and cloud configuration file This number is compared;
If the version number of the local profile is lower than the version number of the cloud configuration file, described is updated The version number of ground configuration file, and download Bundle file corresponding to the version number of the cloud configuration file;
According to the mark of the Bundle file of downloading, Bundle document data bank is updated in systems;
According to preset protocol interface, the Bundle file is called.
With reference to first aspect, in the first possible implementation of first aspect, the Bundle text according to downloading The mark of part, in systems update Bundle document data bank the step of include:
According to the mark of the Bundle file of downloading, judge to whether there is and the downloading in Bundle document data bank Bundle file the identical Bundle file of mark;
If existed in the Bundle document data bank identical with the mark of Bundle file of the downloading Bundle file, the then Bundle corresponding with the mark of the Bundle file being discharged in the Bundle document data bank File, and downloaded Bundle file is installed;
If there is no identical with the mark of Bundle file of the downloading in the Bundle document data bank Bundle file then installs downloaded Bundle file.
The possible implementation of with reference to first aspect the first, in second of possible implementation of first aspect, institute Stating the step of installing downloaded Bundle file includes:
Obtain the contextual information of the Bundle file by being embedded in open service gateway initiative agreement OSGI frame, it is described on Context information includes the storage path of the Bundle file;
The Bundle file is installed according to the contextual information, and obtains the Bundle file being installed Information, Bundle document data bank described in the information update by the Bundle file.
With reference to first aspect, in the third possible implementation of first aspect, the Bundle file includes resource Bundle file and non-resource Bundle file, described according to preset protocol interface, the step of calling the Bundle file Include:
Non-resource Bundle file sends preset resource parameters to resource Bundle file according to preset protocol interface;
Resource Bundle file resource parameters based on the received, return to corresponding resource.
With reference to first aspect, in the 4th kind of possible implementation of first aspect, the downloading cloud configuration text Corresponding to the version number of part the step of Bundle file before, the method also includes:
The corresponding java file compiling of resource is generated into JAR resource file;
According to the JAR resource file and corresponding metadata, Bundle file is generated, the metadata includes following One or more of information: readable information, Bundle file identification information and the Bundle document code of Bundle file Visibility information.
With reference to first aspect, in the 5th kind of possible implementation of first aspect, the method also includes:
The service of starting insertion open service gateway initiative agreement OSGI frame, obtains insertion open service net in the service Close agreement OSGI framework instance.
The second aspect of the embodiment of the present invention provides a kind of dynamic updating device of application software resources, and the application is soft The dynamic updating device of part resource includes:
Version number's comparing unit, the version number of the cloud configuration file for obtaining application, by local profile version It number is compared with the version number of cloud configuration file;
Version updating download unit, if the version number for the local profile is lower than the cloud configuration file Version number, then update the version number of the local profile, and download corresponding to the version number of the cloud configuration file Bundle file;
Database update unit updates Bundle file for the mark according to the Bundle file of downloading in systems Database;
File call unit, for calling the Bundle file according to preset protocol interface.
In conjunction with second aspect, in the first possible implementation of second aspect, the database update unit includes:
File judgment sub-unit judges for the mark according to the Bundle file of downloading in Bundle document data bank In whether there is Bundle file identical with the mark of Bundle file of the downloading;
First installation subelement, if for existing in the Bundle document data bank and the Bundle of downloading text The identical Bundle file of the mark of part, the then mark with the Bundle file being discharged in the Bundle document data bank Know corresponding Bundle file, and downloaded Bundle file is installed;
Second installation subelement, if for there is no the Bundle with the downloading in the Bundle document data bank The identical Bundle file of the mark of file then installs downloaded Bundle file.
The third aspect of the embodiment of the present invention provides a kind of dynamic more new equipment of application software resources, including storage Device, processor and storage in the memory and the computer program that can run on the processor, the processor It is realized when executing the computer program as described in any one of first aspect the step of the dynamic updating method of application software resources.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, realizes when the computer program is executed by processor and applies as described in any one of first aspect The step of dynamic updating method of software resource.
Existing beneficial effect is the embodiment of the present invention compared with prior art: by the comparison of configuration file, in local When the version number of configuration file is lower than the version number of the cloud configuration file, it is local that cloud configuration file, which is updated, and root According to the version number of cloud configuration file, corresponding Bundle file is downloaded, and Bundle is updated according to the Bundle file of downloading Document data bank calls the Bundle file according to preset interface.Due to not needing in addition to create installation package file and wound Agency is built, is conducive to mitigate system burden, and improve the update efficiency of application software resources.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram of the dynamic updating method of application software resources provided in an embodiment of the present invention;
Fig. 2 is the mark of the Bundle file provided in an embodiment of the present invention according to downloading, updates Bundle in systems The implementation process schematic diagram of document data bank method;
Fig. 3 is the implementation process schematic diagram of the downloaded Bundle document method of installation provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of the dynamic updating device of application software resources provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram of the dynamic more new equipment of application software resources provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
It is as shown in Figure 1 a kind of realization stream of the dynamic updating method of application software resources provided by the embodiments of the present application Journey, details are as follows:
In step s101, the version number for obtaining the cloud configuration file of application, by local profile version number and cloud The version number of end configuration file is compared.
Specifically, the application is used to obtain the terminal of the version number of the cloud configuration file of application, it may include intelligent hand Machine, tablet computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 player (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4), pocket computer on knee and desktop computer etc. Deng.
Open service gateway initiative agreement (English abbreviation OSGI, full name in English Open are embedded in herein described terminal Service Gateway Initiative) service.The OSGI service includes two parts: OSGI frame and OSGI standard clothes Business.
The OSGI frame for realizing and the running environment of OSGI function is provided, the OSGI standards service defines more A reusable application programming interfaces API for being used to execute usual task.The OSGI frame is when creating the application based on OSGI Central role is played, is the performing environment of application.
Three conceptual levels design of the OSGI frame according to OSGI specification definition, the conceptual level include:
Module layer: packing and shared code are focused on.
Life cycle layer: module management and the access to bottom OSGI frame when focusing on providing execution.
Service layer: the interaction and communication of the inter-module in module, especially module are focused on.
The module layer defines the concept of OSGI module, and the OSGI module is known as a bundle file.? That is: the described Bundle file is the jar file comprising metadata (data about data), including class file and related money Source.The Bundle file is the multiple logic modules for constituting an application-specific.
It is how dynamically to install and manage that the life cycle layer, which defines in OSGI frame,.Life cycle layer defines The operation of the life cycle of bundle file, including such as install, update, starting, stopping and unload.The life cycle layer is fixed The operation of justice allows to dynamically provide, manage and improve application program with a kind of well-defined mode.
The service layer supports and facilitates a flexible application programming model.Relate generally to service-oriented publication, It searches and service is published to service register center by binding interactive mode, i.e. ISP, then service client is by searching Rope service register center searches available service.
Bundle file is the modular model in OSGI.Include class class file in the jar packet of standard Java platform with And corresponding resource file, bundle file can simply be not understood as increasing the jar packet of metadata.One bundle text Java class file and some other data resources are contained in part, these data can be html file, help document and Icon etc..
The module of the module layer is it is to be understood that one logically encapsulates the set for realizing class, and one based on realization The optional common application interface API of class subset and a set to external code dependence.
In addition, from client layer can bundle document understanding be a functional module.Bundle file can be from project In import and export, and can be with the bundle file-sharing jar file of other in project.Bundle file is that OSGI frame mentions It is the entity for needing to dispose in OSGI service framework for service.Bundle file will pass through OSGI frame once operation Into frame, other bundle files provide function and service.
For ease of description, the application can also be by bundle is defined as: a modular physical unit, with jar text Part form, include code, resource and metadata, wherein the boundary of jar file also as execution when logical modular encapsulation side Boundary.
In OSGI service platform, life cycle layer is by Bundle file, Bundle context BundleContext It is constituted with Bundle these three core interfaces of file catalyzer contact agent BundleActivator.Android platform module dynamically load frame Life cycle layer core is still made of these three interfaces in frame, but the method in interface is deleted and expanded. The reason of being deleted is that these methods use less than in the frame of Android platform, and extra method deletion is made frame More lightweight.Also needing to add new method simultaneously enables interface to obtain the distinctive some categories of Android platform module Property, such as: icon, main Activity, package informatin.
Bundle interface represents the bundle file being installed in frame, allows to execute it state operation. Each Bundle entity corresponds to a Bundle object in OSGI frame, and Bundle object is the pumping to Bundle entity As.Each Bundle file corresponding one ID identification number that is unique and being remained unchanged in life cycle, ID mark Know number to be allocated by frame.The acquisition methods of the essential information of Bundle file are defined in Bundle interface, comprising: shape The acquisition of state, the acquisition of version, acquisition of ID etc., also define the management method of Bundle file, comprising: update, unload, open Dynamic, stopping etc..
BundleContext interface provides the method for operating OSGI frame when execution for application.BundleContext refers to Context when module is run in the frame, the method which provides module and frame interacts.When starting module, Frame creates a corresponding BundleContext object.
For ease of description, the application will be embedded in OSGI frame in android system and be known as OSGIFramework.It will The OSGIFramework is embodied as android system service, includes the following steps:
1. realizing the service of operation OSGI frame, the service that GetFramework is inherited from Android is such as established (Service)。
Convenient for description, which is known as GetFrameworkService, service is realized and finished, and Android can be passed through The service is added in system service by the service managerZ-HU ServiceManager in system.In this way, when every subsystem starts As system service starts up, GetFrameworkService service is also started up.
2. obtaining OSGI framework instance in the service, obtained by FrameWorkFactory.newFrameWork () Framework instance.When getting framework instance, and start framework instance, such as passes through Framework.start () method.
More than, just start GetFrameworkService service in android system, passes through android system Binder mechanism provides the GetFrameworkService agency serviced to application layer, such as GetFrameworkServiceProxy is acted on behalf of, so that it may be accessed by the OSGI framework services Relevant interface in GetFrameworkService service, such as obtains framework instance interface.
Therefore, the configuration file of the Bundle file can be obtained by the corresponding Bundle interface of Bundle file And the version number of configuration file.
In step s 102, if the version number of the local profile is lower than the version of the cloud configuration file Number, then the version number of the local profile is updated, and download corresponding to the version number of the cloud configuration file Bundle file.
After the version number for getting cloud configuration file, by the version number of cloud configuration file and local profile Version number is compared, if the version number of the local profile is higher than or is equal to the version number of cloud configuration file, It can be then compared again according to the mode of setting in next time.
If the version number of the local profile is lower than the version number of the cloud configuration file, described is updated The version number of ground configuration file, and Bundle file corresponding to new version number is downloaded, the new version number, that is, cloud configuration text Version number corresponding to part.
In addition, preparation before implementing as the application, further includes the process for generating Bundle file, specifically can wrap It includes:
A1. the corresponding java file compiling of resource is generated into JAR resource file.
OSGI frame is run on a java virtual machine, and Bundle file can be understood as executing the application on OSGI frame Program, and service layer provides importing, export interface for Bundle file.Bundle file can be with after the completion of server downloading Automatically the service installed and executed on OSGI frame, and service and provide required for registering it to OSGI platform.
A2. according to the JAR resource file and corresponding metadata, Bundle file is generated, the metadata includes One or more of following information: readable information, Bundle file identification information and the Bundle file of Bundle file Code visibility information.
The bundle file is jar (Java Archive) file for being added to certain metadata.Jar file is turned Be melted into bundle, need to increase for jar file corresponding metadata, metadata include readable information, bundle identification information and Code visibility information.
The Bundle file readable information is used to provide the dependent help information of the bundle for user, comprising:
Bundle-Name a: abbreviated name as bundle file;
Bundle-Description: the function of description bundle file;
Bundle-DocURL: for providing the document in relation to bundle file;
Bundle-Category: for defining one group of systematic name separated by comma;
Bundle-Vendor: the information in relation to bundle file provider;
Bundle-ContactAddress: the information in relation to bundle provider;
Bundle-Copyright: the information in relation to bundle file provider.
The Bundle file identification information, for identification necessary information of bundle.It is installed to every in OSGI frame A bundle file must all have a unique identification, this mark is by bundle designation and bundle version number two parts Composition.
Bundle-SymbolicName:bundle designation, it is consistent with packet naming method in java.It can directly adopt Use packet name as designation.
Bundle-Version:bundle version number, version number's format of the bundle of OSGI specification agreement are as follows: key plate sheet Number micro- version number qualifier of secondary version number.
Bundle-ManifestVersion:OSGI frame determines the OSGI for using which version according to this metadata information Specification is to handle bundle file.
The bundle document code visibility information: it is externally visible to define visible inside which code and which code Necessary information, comprising:
Export-Package: export internal code, one in order to other bundle file-sharings and it is disclosed, by teasing Number separate inside bundle packet.
Import-Package: importing external code, that internal bundle document code needs, literary from other bundle Part and the one group of packet separated by comma.
In step s 103, according to the mark of the Bundle file of downloading, Bundle document data bank is updated in systems.
The mark of the Bundle file according to downloading, the step of updating Bundle document data bank in systems, can be with As shown in Figure 2, comprising:
In step s 201, according to the mark of the Bundle file of downloading, judge in Bundle document data bank whether In the presence of Bundle file identical with the mark of Bundle file of the downloading.
The Bundle file can be according to the download address in configuration file, the downloading pair in Bundle file server Bundle file is answered, and the Bundle file of downloading is stored in local, is relatively installed so as to subsequent.
In step S202, if there is the mark with the Bundle file of the downloading in the Bundle document data bank Know identical Bundle file, is then discharged in corresponding with the mark of the Bundle file in the Bundle document data bank Bundle file, and downloaded Bundle file is installed.
If there is the downloaded corresponding mark of Bundle file in document data bank, current document data bank is indicated In include the corresponding Bundle file of the mark, therefore, unloading operation first can be carried out to local Bundle file, unloaded After the completion, newly downloaded Bundle file is installed, and returns to the relevant information of installed Bundle file, is facilitated other Bundle file is called.
In step S203, if be not present and the Bundle file of the downloading in the Bundle document data bank Identical Bundle file is identified, then downloaded Bundle file is installed.
If being mounted directly the Bundle of downloading there is no the corresponding Bundle file of the mark in document data bank File, to be updated to resource file.
Wherein, to the downloading process of the Bundle file, may include:
B1. the contextual information of the Bundle file, institute are obtained by being embedded in open service gateway initiative agreement OSGI frame State the storage path that contextual information includes the Bundle file.
B2. the Bundle file is installed according to the contextual information, and obtains the Bundle text being installed The information of part, Bundle document data bank described in the information update by the Bundle file.
Wherein, the process that the Bundle file is installed in OSGI frame may include:
1. getting OSGI framework instance.The agency that can be serviced by GetFrameworkService GetFrameworkServiceProxy is obtained, such as getFrameworkInstance () method.
2. obtaining BundleContext (Bundle contextual information), calling can be passed through Framework.getBundleContext () method is realized.
3. bundle file is installed, it can be by calling the side BundleContext.install (String location) Method, until all bundle files install.Wherein parameter location is bundle file storage path.When being mounted to After function, the Bundle ID (Bundle Identifier) of mounted Bundle file can be returned.Bundle ID is the runtime Most common identifier.It is the long number distributed automatically by OSGI frame, in Bundle whole life cycle (including Bundle updates, after unloading) will not all change, or even can remain after OSGI frame is restarted.Bundle ID is the precedence in Bundle installation process by OSGI frame according to the Bundle set-up time, ascending to be allocated 's.The ID of current Bundle can be obtained by getBundleId () method of Bundle interface.
4. obtaining the mark ID of current Bundle, it can install the Bundle's successfully returned by calling GetBundleId () method obtains, can also by call Bundle getSymbolicName () method and GetVersion () gets designation and the version number of the bundle respectively
5. establishing the designation version of each bundle of database purchase mark ID, bundle file packet name and bunlde This number attribute, wherein bundle file packet name refers to using packet name, and convenient for description, which is known as system bundle file Database, wherein bundle file includes non-resource bundle file and resource bundle file.
6. starting bundle file, can be started by BundleContext.start () method.Wherein, bundle text Part includes non-resource bundle file and resource bundle file.
7. when resource bundle file start, establishing Bundle number of files according to the resource for including in resource bundle file According to library, including resource bundleID, resource bundle file packet name, resource ID, resource name, resource type.Wherein, resource BundleID can be obtained by the getBundleId () interface of Bundle interface, and resource ID, resource name and resource type can Acquisition when by obtaining resource bundle file above.
In step S104, according to preset protocol interface, the Bundle file is called.
After application and development, it can will apply by resource module and non-resource module is logically divided into, by resource module It is compiled as jar file respectively with non-resource module, then converts bundle file for jar file.As shown in figure 3, the basis Preset protocol interface, the step of calling the Bundle file may include:
In step S301, non-resource Bundle file sends according to preset protocol interface to resource Bundle file pre- If resource parameters.
Non-resource bundle inputs parameter preset to resource bundle, and resource bundle obtains phase according to input parameter preset Resource is simultaneously returned to non-resource bundle by the resource answered.It herein, include importation and output par, c in interface protocol.Its In, importation defines the parameter that non-resource bundle will be inputted to resource bundle module, including resource bundle collected works Packet name, resource ID, resource name and resource type.Output par, c defines the money that resource bundle is returned according to input parameter Source.
In step s 302, resource Bundle file resource parameters based on the received, return to corresponding resource.
Non-resource bundle parses configuration file, to obtain defeated by the configuration file of reading resource bundle file Enter parameter, wherein configuration file format may is that
Configuration file version number, bundle file url download address, bundle file packet name, resource ID _ 1, resource name Title, resource type, resource ID _ 2, resource name, resource type, resource ID _ n, resource name, resource type.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Fig. 4 is a kind of structural representation of the dynamic updating device of application software resources provided by the embodiments of the present application, is described in detail It is as follows:
The dynamic updating device of herein described application software resources, comprising:
Version number's comparing unit 401, the version number of the cloud configuration file for obtaining application, by local profile version This number is compared with the version number of cloud configuration file;
Version updating download unit 402, if the version number for the local profile configures lower than the cloud The version number of file, then update the version number of the local profile, and downloads the institute, version number of the cloud configuration file Corresponding Bundle file;
Database update unit 403 updates Bundle text for the mark according to the Bundle file of downloading in systems Part database;
File call unit 404, for calling the Bundle file according to preset protocol interface.
Preferably, the database update unit includes:
File judgment sub-unit judges for the mark according to the Bundle file of downloading in Bundle document data bank In whether there is Bundle file identical with the mark of Bundle file of the downloading;
First installation subelement, if for existing in the Bundle document data bank and the Bundle of downloading text The identical Bundle file of the mark of part, the then mark with the Bundle file being discharged in the Bundle document data bank Know corresponding Bundle file, and downloaded Bundle file is installed;
Second installation subelement, if for there is no the Bundle with the downloading in the Bundle document data bank The identical Bundle file of the mark of file then installs downloaded Bundle file.
Preferably, the first installation subelement or the second installation subelement include:
Contextual information obtains module, for obtaining the Bundle by insertion open service gateway initiative agreement OSGI frame The contextual information of file, the contextual information include the storage path of the Bundle file;
Module is installed, for installing the Bundle file according to the contextual information, and obtains the institute being installed The information for stating Bundle file, Bundle document data bank described in the information update by the Bundle file.
Preferably, the Bundle file includes resource Bundle file and non-resource Bundle file, the file tune Include: with unit
Parameter transmission sub-unit, for from the non-resource Bundle file according to preset protocol interface to the resource Bundle file sends preset resource parameters;
Resource returns to subelement, for returning to corresponding resource by resource Bundle file resource parameters based on the received.
Preferably, the dynamic updating device of the application software resources further include:
Compilation unit, for the corresponding java file compiling of resource to be generated JAR resource file;
Bundle file generating unit, for generating Bundle according to the JAR resource file and corresponding metadata File, the metadata include one or more of following information: readable information, the Bundle file of Bundle file are known Other information and Bundle document code visibility information.
Preferably, the dynamic updating device of the application software resources further include:
Start unit is serviced, for starting the service of insertion open service gateway initiative agreement OSGI frame, in the service Obtain insertion open service gateway initiative agreement OSGI framework instance.
The dynamic updating device of application software resources described in Fig. 4, the dynamic updating method with application software resources described in Fig. 1 It is corresponding.
Fig. 5 is the schematic diagram of the dynamic more new equipment for the application software resources that one embodiment of the invention provides.Such as Fig. 5 institute Show, the dynamic of the application software resources of the embodiment more new equipment 5 includes: processor 50, memory 51 and is stored in described In memory 51 and the computer program 52 that can run on the processor 50, such as the dynamic of application software resources update journey Sequence.The processor 50 realizes that the dynamic updating method of above-mentioned each application software resources is real when executing the computer program 52 Apply the step in example, such as step 101 shown in FIG. 1 is to 104.Alternatively, the processor 50 executes the computer program 52 The function of each module/unit in the above-mentioned each Installation practice of Shi Shixian, such as the function of module 401 to 404 shown in Fig. 4.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 51, and are executed by the processor 50, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 52 in the dynamic more new equipment 5 of the application software resources is described.For example, the meter Calculation machine program 52 can be divided into version number's comparing unit, version updating download unit, database update unit and file tune With unit, each unit concrete function is as follows:
Version number's comparing unit, the version number of the cloud configuration file for obtaining application, by local profile version It number is compared with the version number of cloud configuration file;
Version updating download unit, if the version number for the local profile is lower than the cloud configuration file Version number, then update the version number of the local profile, and download corresponding to the version number of the cloud configuration file Bundle file;
Database update unit updates Bundle file for the mark according to the Bundle file of downloading in systems Database;
File call unit, for calling the Bundle file according to preset protocol interface.
The dynamic of the application software resources more new equipment 5 can be desktop PC, notebook, palm PC and cloud Server etc. is held to calculate equipment.The dynamic of the application software resources more new equipment may include, but be not limited only to, processor 50, Memory 51.It will be understood by those skilled in the art that Fig. 5 is only the example of the dynamic more new equipment 5 of application software resources, and The restriction to the dynamic more new equipment 5 of application software resources is not constituted, may include components more more or fewer than diagram, or Certain components or different components are combined, such as the dynamic more new equipment of the application software resources can also include input Output equipment, network access equipment, bus etc..
Alleged processor 50 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 51 can be the internal storage unit of the dynamic more new equipment 5 of the application software resources, such as The hard disk or memory of the dynamic of application software resources more new equipment 5.The memory 51 is also possible to the application software resources Dynamic more new equipment 5 External memory equipment, such as the grafting being equipped on the dynamic more new equipment 5 of the application software resources Formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 51 can also both have been set in the dynamic update including the application software resources Standby 5 internal storage unit also includes External memory equipment.The memory 51 is for storing the computer program and institute Other programs and data needed for stating the dynamic more new equipment of application software resources.The memory 51 can be also used for temporarily Store the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie Matter may include: can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and Telecommunication signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of dynamic updating method of application software resources, which is characterized in that the dynamic update side of the application software resources Method includes:
The version number for obtaining the cloud configuration file of application, by the version number of local profile version number and cloud configuration file It is compared;
If the version number of the local profile is lower than the version number of the cloud configuration file, updates the local and match The version number of file is set, and downloads Bundle file corresponding to the version number of the cloud configuration file;
According to the mark of the Bundle file of downloading, Bundle document data bank is updated in systems;
According to preset protocol interface, the Bundle file is called.
2. the dynamic updating method of application software resources according to claim 1, which is characterized in that described according to downloading The mark of Bundle file, in systems update Bundle document data bank the step of include:
According to the mark of the Bundle file of downloading, judge to whether there is and the downloading in Bundle document data bank The identical Bundle file of the mark of Bundle file;
If there is Bundle text identical with the mark of Bundle file of the downloading in the Bundle document data bank Part, then the Bundle file corresponding with the mark of the Bundle file being discharged in the Bundle document data bank, and Downloaded Bundle file is installed;
If Bundle identical with the mark of Bundle file of the downloading is not present in the Bundle document data bank File then installs downloaded Bundle file.
3. the dynamic updating method of application software resources according to claim 2, which is characterized in that the installation is downloaded Bundle file the step of include:
The contextual information of the Bundle file, the context are obtained by being embedded in open service gateway initiative agreement OSGI frame Information includes the storage path of the Bundle file;
The Bundle file is installed according to the contextual information, and obtains the letter for the Bundle file being installed It ceases, Bundle document data bank described in the information update by the Bundle file.
4. the dynamic updating method of application software resources according to claim 1, which is characterized in that the Bundle file It is described according to preset protocol interface including resource Bundle file and non-resource Bundle file, call the Bundle text The step of part includes:
The non-resource Bundle file sends preset resource to the resource Bundle file according to preset protocol interface Parameter;
Resource Bundle file resource parameters based on the received, return to corresponding resource.
5. application software resources dynamic updating method according to claim 1, which is characterized in that the downloading cloud Corresponding to the version number of configuration file the step of Bundle file before, the method also includes:
The corresponding java file compiling of resource is generated into JAR resource file;
According to the JAR resource file and corresponding metadata, Bundle file is generated, the metadata includes following information One or more of: the readable information of Bundle file, Bundle file identification information and Bundle document code are visible Property information.
6. application software resources dynamic updating method according to claim 1, which is characterized in that the dynamic updating method Further include:
The service of starting insertion open service gateway initiative agreement OSGI frame obtains insertion open service gateway initiative association in the service Discuss OSGI framework instance.
7. a kind of dynamic updating device of application software resources, which is characterized in that the dynamic of the application software resources more new clothes It sets and includes:
Version number's comparing unit, for obtain application cloud configuration file version number, by local profile version number with The version number of cloud configuration file is compared;
Version updating download unit, if being lower than the version of the cloud configuration file for the version number of the local profile This number, then the version number of the local profile is updated, and downloaded corresponding to the version number of the cloud configuration file Bundle file;
Database update unit updates Bundle file data for the mark according to the Bundle file of downloading in systems Library;
File call unit, for calling the Bundle file according to preset protocol interface.
8. the dynamic updating device of application software resources according to claim 7, which is characterized in that the database update Unit includes:
File judgment sub-unit, for the mark according to the Bundle file of downloading, judge be in Bundle document data bank It is no to there is Bundle file identical with the mark of Bundle file of the downloading;
First installation subelement, if for existing and the Bundle file of the downloading in the Bundle document data bank Identical Bundle file is identified, then the mark pair with the Bundle file being discharged in the Bundle document data bank The Bundle file answered, and downloaded Bundle file is installed;
Second installation subelement, if for there is no the Bundle files with the downloading in the Bundle document data bank The identical Bundle file of mark, then downloaded Bundle file is installed.
9. a kind of dynamic of application software resources more new equipment, including memory, processor and storage are in the memory And the computer program that can be run on the processor, which is characterized in that when the processor executes the computer program It realizes as described in any one of claim 1 to 5 the step of the dynamic updating method of application software resources.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the dynamic of realization application software resources as described in any one of claim 1 to 5 when the computer program is executed by processor The step of update method.
CN201710998252.1A 2017-10-24 2017-10-24 A kind of dynamic updating method of application software resources, device and equipment Pending CN109697076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710998252.1A CN109697076A (en) 2017-10-24 2017-10-24 A kind of dynamic updating method of application software resources, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710998252.1A CN109697076A (en) 2017-10-24 2017-10-24 A kind of dynamic updating method of application software resources, device and equipment

Publications (1)

Publication Number Publication Date
CN109697076A true CN109697076A (en) 2019-04-30

Family

ID=66226219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710998252.1A Pending CN109697076A (en) 2017-10-24 2017-10-24 A kind of dynamic updating method of application software resources, device and equipment

Country Status (1)

Country Link
CN (1) CN109697076A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111399940A (en) * 2020-03-12 2020-07-10 深圳创维-Rgb电子有限公司 Data processing method of intelligent system, storage medium and intelligent terminal
CN113835733A (en) * 2021-09-29 2021-12-24 百度在线网络技术(北京)有限公司 Cloud application updating method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130144955A1 (en) * 2002-01-15 2013-06-06 International Business Machines Corporation Active control of collaborative devices
CN105511902A (en) * 2015-11-09 2016-04-20 Tcl集团股份有限公司 Android platform module dynamic loading method and system
CN105657191A (en) * 2016-03-29 2016-06-08 Tcl集团股份有限公司 Application increment upgrading method and system based on Android system
CN106569880A (en) * 2016-11-07 2017-04-19 Tcl集团股份有限公司 Method and system for dynamically sharing resources between Android applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130144955A1 (en) * 2002-01-15 2013-06-06 International Business Machines Corporation Active control of collaborative devices
CN105511902A (en) * 2015-11-09 2016-04-20 Tcl集团股份有限公司 Android platform module dynamic loading method and system
CN105657191A (en) * 2016-03-29 2016-06-08 Tcl集团股份有限公司 Application increment upgrading method and system based on Android system
CN106569880A (en) * 2016-11-07 2017-04-19 Tcl集团股份有限公司 Method and system for dynamically sharing resources between Android applications

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111399940A (en) * 2020-03-12 2020-07-10 深圳创维-Rgb电子有限公司 Data processing method of intelligent system, storage medium and intelligent terminal
CN113835733A (en) * 2021-09-29 2021-12-24 百度在线网络技术(北京)有限公司 Cloud application updating method and device, electronic equipment and storage medium
CN113835733B (en) * 2021-09-29 2023-06-16 百度在线网络技术(北京)有限公司 Cloud application updating method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109034814B (en) Intelligent contract processing method and device based on Etheng virtual machine
CN105100191B (en) The method, apparatus and system of Java application installations are realized in a kind of cloud compiling
CN103530156B (en) Dynamic load and the method and device of caller
CN102411506B (en) Java-system business-unit plug-in type managing system and dynamic business-function changing method
US9870211B2 (en) High-level language for specifying configurations of cloud-based deployments
CN105657191B (en) Application increment upgrading method and system based on Android system
CN103608773B (en) For the deployment system of multinode application
US9996336B2 (en) Apparatus and method for validating application deployment topology in cloud computing environment
CN106569880B (en) Method and system for dynamically sharing resources between Android applications
CN104750528B (en) A kind of assembly management method and apparatus in Android program
US10594800B2 (en) Platform runtime abstraction
CN102725733A (en) Porting virtual machine images between platforms
US20070282801A1 (en) Dynamically creating and executing an application lifecycle management operation
CN109542459A (en) Application program packaging method and device, computer installation and computer storage medium
CN105373406B (en) Application layout dynamic switching method and system based on Android platform
CN109240733A (en) A kind of method and terminal updating advertisement SDK based on Android system
CN112835975B (en) Method for deploying, updating and calling intelligent contracts in blockchain
CN113688186B (en) Intelligent contract execution method, engine and block link point
CN105516154A (en) Security policy configuration method and device applied to SEAndroid (Security-Enhanced Android) system
CN109840096A (en) The installation method and device of operating system
CN112685020A (en) Method and device for dynamically creating service interface, electronic equipment and storage medium
CN109697076A (en) A kind of dynamic updating method of application software resources, device and equipment
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN106802805B (en) Application service management method and device suitable for server management
CN106778270B (en) Malicious application detection method and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190430