WO2015192608A1 - Method for updating app in android system, terminal and storage medium - Google Patents

Method for updating app in android system, terminal and storage medium Download PDF

Info

Publication number
WO2015192608A1
WO2015192608A1 PCT/CN2014/092819 CN2014092819W WO2015192608A1 WO 2015192608 A1 WO2015192608 A1 WO 2015192608A1 CN 2014092819 W CN2014092819 W CN 2014092819W WO 2015192608 A1 WO2015192608 A1 WO 2015192608A1
Authority
WO
WIPO (PCT)
Prior art keywords
app
plug
osgi
updated
architecture model
Prior art date
Application number
PCT/CN2014/092819
Other languages
French (fr)
Chinese (zh)
Inventor
葛全民
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015192608A1 publication Critical patent/WO2015192608A1/en

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets

Definitions

  • the present invention relates to an application update method, and in particular to an update method, a terminal, and a computer storage medium for an application (APP, Application) in an Android system.
  • APP Application
  • the current APP update is an overall update to the APP application software; in the Android operating system platform, the overall update of the APP has the following problems:
  • an embodiment of the present invention provides an APP update method, a terminal, and a computer storage medium in an Android system, which can update a plug-in that needs to be updated by an APP, and shorten an update response period of the terminal to the APP. It reflects the convenience of APP update and enhances user experience.
  • An embodiment of the present invention provides an update method of an application APP in an Android system, where the method is applied to a terminal, where the terminal runs an Android Android operating system, and the Android At least one application APP is run in the operating system; an Open Service Gateway Protocol OSGI architecture model for managing the plug-in of the APP is configured for each APP, and the method further includes:
  • the acquiring the context information of the plug-in to be updated of the APP by using the OSGI architecture model corresponding to the APP includes:
  • the context information of the latest version plug-in is determined as the context information of the plug-in to be updated.
  • the acquiring, by the OSGI architecture model, the to-be-updated plug-in of the APP, according to the plug-in context information includes:
  • the configuring the to-be-updated plug-in to the APP to update the APP includes:
  • the layout file and the UI class are configured to the APP to update the APP.
  • the method further includes:
  • the server is notified by the OSGI architecture model to log out of the registered OSGI service.
  • the embodiment of the present invention further provides a terminal, where the terminal runs an Android Android operating system, and the Android operating system runs at least one application APP; the terminal includes:
  • a first configuration unit configured to configure, for each APP, an Open Service Gateway Protocol OSGI architecture model for managing a plug-in of the APP;
  • a first acquiring unit configured to acquire context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP;
  • a second obtaining unit configured to acquire an to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information
  • a second configuration unit configured to configure the to-be-updated plug-in to the APP to update the APP.
  • the first obtaining unit is further configured to acquire, by using the OSGI architecture model, a plug-in version of the APP on the server side;
  • the context information of the latest version plug-in is determined as the context information of the plug-in to be updated.
  • the second obtaining unit is further configured to send the context information to a server by using an OSGI service of the OSGI architecture model;
  • the second configuration unit is configured to configure the layout file and the UI class to the APP to update the APP.
  • the terminal further includes:
  • the first notification unit is configured to notify the server to log out the registered OSGI service by using the OSGI architecture model.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing update method of the application APP in the Android system.
  • the method for updating an APP, the terminal, and the computer storage medium in the Android system provided by the embodiment of the present invention, the method is applied to a terminal, where the terminal runs an Android Android operating system, and at least one of the Android operating system runs.
  • the OSGI architecture model acquires a plug-in to be updated of the APP according to the plug-in context information, and configures the plug-in to be updated to the APP to update the APP.
  • the OSGI architecture model can be used to update the plug-in that needs to be updated by the APP, shorten the update response period of the terminal to the APP, reflect the convenience of the APP update, and improve the user experience.
  • FIG. 1 is a flowchart of implementing an APP update method in an Android system according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an application scenario of an APP update method in an Android system according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of application scenario 2 of an APP update method in an Android system according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the Open Services Gateway Initiative is a standard for Java dynamic component systems. It provides a modular architecture for large distributed systems and embedded systems.
  • the function points of the APP can be regarded as plug-ins and implemented. Modular management of the APP plug-in; therefore, in the embodiment of the present invention, an OSGI architecture model for managing the plug-in of the APP is configured for each APP in the terminal, and the plug-in of the APP is performed by the OSGI service provided by the OSGI framework model. Update to complete the update to the app.
  • each APP in the terminal is configured with an OSGI architecture model corresponding thereto, for example, an OSGI architecture model is configured for the QQ application, the model is used to manage the plug-in of the QQ application; and an OSGI architecture model is configured for the WeChat application, This model is used to manage plugins for WeChat applications.
  • the method for updating an APP in an Android system is applied to a terminal, where the terminal runs an Android Android operating system, and at least one application APP runs in the Android operating system;
  • FIG. 1 is a flowchart of implementing an update method of an APP in an Android system according to an embodiment of the present invention; as shown in FIG. 1 , the method includes:
  • Step 11 Obtain context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP.
  • FIG. 2 is a schematic diagram of an application scenario according to an embodiment of the present invention; this step is illustrated in conjunction with FIG. 2.
  • an APP has at least one function point.
  • a predetermined number of function points of the APP are usually set to the OSGI architecture of the plug-in for managing the APP.
  • the function point is called a plug-in of the APP.
  • the execution function of the OSGI architecture model is used as part of the APP application function, wherein the OSGI architecture model is used to manage the plug-in of the APP application (update the plug-in), and when the terminal and the server side are required to perform plug-ins for the APP application
  • the OSGI architecture model that needs to be set for the APP interacts with the server side through the OSGI service.
  • the step may be: the OSGI architecture model acquires a plug-in version of the APP on the server side; compares the obtained plug-in version of the APP with a plug-in version of the APP managed by itself; When the obtained plug-in version of the APP is the latest, it is determined that the context information of the latest version plug-in is the context information of the plug-in to be updated.
  • the OSGI architecture model corresponding to the APP initiates a version request of the plug-in of the APP to the server through the OSGI service, and Upon receiving the version information of the plug-in of the APP returned by the server, the OSGI architecture model obtains version information of the plug-in of the APP that it manages, compares the plug-in of the APP managed by itself, and the received The version information of the plug-in of the APP is compared when the plug-in version of the received APP is the latest, that is, when the APP needs to be updated, the context information of the plug-in to be updated (the plug-in pre-upgraded to the new version plug-in) is obtained.
  • the context information is a plugin package content bundle context.
  • the first period may be set according to the specific use of the application of the terminal.
  • Step 12 Obtain an to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information.
  • the OSGI architecture model sends the plugin context information to the server side through an OSGI service;
  • the server searches the OSGI service according to the plugin context information, searches for the OSGI service, and sends a registration notification when found Message to the OSGI architecture model;
  • the OSGI architecture model registers the OSGI service to the server after receiving the registration notification message;
  • the server acquires an updated service interface (service portal) through the The service interface acquires a layout file and a user interface UI class of the plug-in to be updated for the registered OSGI service, and returns a layout file and a UI class of the plug-in to be updated to the terminal.
  • service portal The service interface acquires a layout file and a user interface UI class of the plug-in to be updated for the registered OSGI service, and returns a layout file and a UI class of the plug-in to be updated to the terminal.
  • Step 13 Configure the to-be-updated plug-in to the APP to update the APP.
  • the OSGI architecture model receives a layout file and a UI class of the to-be-updated plug-in returned by the server, and configures the layout file and the UI class to the APP to complete an APP corresponding to the OSGI architecture model.
  • Update After completing the update of the APP by updating the plugin of the APP, the server is notified by the OSGI architecture model to log out of the OSGI service.
  • the OSGI architecture model can monitor the installation and uninstallation status of the plug-in of the APP by using the event monitoring mode, and record the status in the plug-in list to facilitate the update of the plug-in of the App (partial update of the APP).
  • the method further includes:
  • the plug-in of the APP is started, and the plug-in menu of the APP is obtained through the OSGI architecture model configured for the APP, and displayed in the toolbar of the APP.
  • FIG. 3 is a schematic diagram of an application scenario 2 according to an embodiment of the present invention; as shown in FIG. 3, in addition to the plug-in update for managing the APP application, the OSGI architecture model may also be obtained by using an OSGI architecture model when starting an APP.
  • the OSGI architecture model configured for the APP starts the activity of the plugin of the APP by launching the Bundle Activator of the model, acquires context information of the launched plugin, and passes the OSGI service.
  • the server searches the OSGI service according to the context information, searches for the OSGI service, and when sent, sends a registration notification message to the OSGI architecture model;
  • the OSGI architecture model After receiving the registration notification message, registering the OSGI service to the office a server that obtains an updated service interface, obtains plug-in menu information of the plug-in to be launched for the registered OSGI service through the service interface, and returns the plug-in menu information to the terminal;
  • the plug-in menu information is displayed to the APP, and the obtained plug-in menu is displayed as a tool of the toolbar for convenient viewing.
  • the plug-in is implemented for the APP by configuring the OSGI architecture model for each APP, and the plug-in of the APP is modularized, and the plug-in is updated by the OSGI service, thereby updating the APP;
  • the overall update only needs to update the plug-in of the APP to be updated, shortening the update response period of the terminal to the APP, and embodies the convenience of the APP update.
  • the overall update is not required, so after updating the APP, it is not necessary Restart the app to improve the user experience.
  • the OSGI architecture model provided by the embodiment of the present invention achieves the purpose of updating the APP by updating the plug-in of the APP; wherein the plug-in supports Java Native Interface (JNI), and the compatibility is strong, except for compatibility with Java. It is also compatible with other programming languages such as C and C++.
  • JNI Java Native Interface
  • the embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing APP update method in the Android system.
  • the embodiment of the present invention further describes a terminal; the terminal runs an Android operating system, and at least one application APP runs in the Android operating system.
  • FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention; as shown in FIG. 4, the terminal includes: a first configuration unit 201, a first obtaining unit 202, a second obtaining unit 203, and a second configuration unit. 204; among them,
  • the first configuration unit 201 is configured to configure, for each APP, an Open Service Gateway Protocol OSGI architecture model for managing a plug-in of the APP;
  • the first obtaining unit 202 is configured to acquire context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP;
  • the first obtaining unit 202 acquires a plug-in version of the APP on the server side by using the OSGI architecture model; compares the obtained plug-in version of the APP with the APP managed by itself The plug-in version is compared to when the obtained plug-in version of the APP is the latest, determining that the context information of the latest version plug-in is the context information of the plug-in to be updated.
  • the terminal specifically the first obtaining unit 202, uses the OSGI of the OSGI architecture model corresponding to the APP.
  • the service initiates a version request of the plug-in of the APP to the server, and when receiving the version information of the plug-in of the APP returned by the server, the first obtaining unit 202 acquires the management that is managed by the OSGI architecture model.
  • the first obtaining unit 202 Obtain context information of a plug-in to be updated (a plug-in pre-upgraded to the new version plug-in); in the OSGI architecture model, the context information is a plug-in package content bundle context.
  • the first period may be set according to the specific use of the application of the terminal.
  • the second obtaining unit 203 is configured to acquire the to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information;
  • the terminal specifically the second obtaining unit 203, sends the plug-in context information to the server side by using an OSGI service of the OSGI architecture model; the server searches for the OSGI service according to the plug-in context information. Find the OSGI service, when it is found, Sending a registration notification message to the terminal, specifically the second obtaining unit 203; the second obtaining unit 203, after receiving the registration notification message by using the OSGI architecture model, registering the OSGI service to the server Obtaining, by the server, an updated service interface (service portal), obtaining, by the service interface, a layout file and a user interface UI class of the plug-in to be updated for the registered OSGI service, and returning a layout file of the new plug-in and The UI class is to the terminal, specifically the second acquiring unit 203.
  • an updated service interface service portal
  • the second configuration unit 204 is configured to configure the to-be-updated plug-in to the APP to update the APP.
  • the second obtaining unit 203 transmits the layout file and the UI class to the second configuration unit 204, and the second configuration unit 204 configures the layout file and the UI class to the APP to complete the APP. Update.
  • the terminal further includes: a first notification unit 205;
  • the first notification unit 205 is configured to notify the server to log out of the OSGI service by using the OSGI architecture model.
  • the terminal further includes: a third obtaining unit 206, a first display unit 207;
  • the third obtaining unit 206 is configured to start a plug-in of the APP when the APP is started, and obtain a plug-in menu of the APP by using an OSGI architecture model configured for the APP;
  • the first display unit 207 is configured to display the plug-in menu in a toolbar of the APP.
  • the third obtaining unit 206 starts the Bundle Activator of the model by using the OSGI architecture model configured for the APP, and then starts the activity of the plugin of the APP, and obtains the launched plugin.
  • the third obtaining unit 206 configures the plug-in menu information to the APP; the first display unit 207 displays the plug-in menu as part of the
  • the plug-in is implemented for the APP by configuring the OSGI architecture model for each APP, and the plug-in of the APP is modularized, and the plug-in is updated by the OSGI service, thereby updating the APP;
  • the overall update only needs to update the plug-in of the APP to be updated, shortening the update response period of the terminal to the APP, and embodies the convenience of the APP update.
  • the overall update is not required, so after updating the APP, it is not necessary Restart the app to improve the user experience.
  • the implementation functions of the processing units in the terminal shown in FIG. 4 can be understood by referring to the related description of the update method of the APP in the aforementioned Android system. It should be understood by those skilled in the art that the functions of the processing units in the terminal shown in FIG. 4 can be implemented by a program running on a processor, or can be implemented by a specific logic circuit.
  • the first configuration unit 201, the first obtaining unit 202, the second obtaining unit 203, the second configuration unit 204, the first notification unit 205, the third obtaining unit 206, and the first display unit 207 may each be configured by Central processing unit (CPU, Central Processing Unit), or digital signal processing (DSP, Digital Signal Processor), or microprocessor (MPU, Micro Processor Unit), or Field Programmable Gate Array (FPGA) To achieve; the CPU, DSP, MPU, FPGA can be built into the terminal.
  • CPU Central processing unit
  • DSP Digital Signal Processor
  • MPU Micro Processor Unit
  • FPGA Field Programmable Gate Array
  • the terminal includes but is not limited to: a tablet computer, a mobile phone, and an electronic reading. Reader, etc.
  • the preferred terminal of the embodiment of the present invention is a mobile phone.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the method for updating an APP, the terminal, and the computer storage medium in the Android system provided by the embodiment of the present invention, the method is applied to a terminal, the terminal runs an Android Android operating system, and at least one application APP runs in the Android operating system; Each APP configures an OSGI architecture model for managing the APP plug-in.
  • the method further includes: acquiring, by using an OSGI architecture model corresponding to the APP, context information of the plug-in to be updated of the APP; and using the OSGI according to the plug-in context information.
  • the architecture model acquires the plug-in to be updated of the APP; and configures the plug-in to be updated to the APP to update the APP.
  • the OSGI architecture model can be used to update the plug-ins that need to be updated by the APP, shorten the update response period of the terminal to the APP, reflect the convenience of the APP update, and improve the user experience.

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)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed is a method for updating an APP in an Android system. The method is applied in a terminal that runs an Android operating system, at least one APP is run in the Android operating system, and for each APP, an Open Services Gateway Initiative (OSGI) architecture model used for managing a plug-in of the APP is configured. The method further comprises: acquiring, through an OSGI architecture model corresponding to an APP, context information of a plug-in to be updated of the APP; acquiring the plug-in to be updated of the APP by using the OSGI architecture model according to the context information of the plug-in; and configuring the plug-in to be updated in the APP to update the APP. Also disclosed are a terminal and a computer storage medium.

Description

安卓系统中APP的更新方法、终端及存储介质APP update method, terminal and storage medium in Android system 技术领域Technical field
本发明涉及应用更新方法,具体涉及一种在安卓(Android)系统中应用(APP,Application)的更新方法、终端及计算机存储介质。The present invention relates to an application update method, and in particular to an update method, a terminal, and a computer storage medium for an application (APP, Application) in an Android system.
背景技术Background technique
使用Android操作系统的手机、平台电脑等终端在实现APP的更新时,需要从服务器侧下载该APP的最新版本,然后安装到手机或平台电脑中。可见,目前APP更新是对APP应用软件的整体更新;在Android操作系统平台中,对APP进行整体更新,存在以下几个问题:When using the Android operating system mobile phone, platform computer and other terminals to implement the APP update, you need to download the latest version of the APP from the server side, and then install it to the mobile phone or platform computer. It can be seen that the current APP update is an overall update to the APP application software; in the Android operating system platform, the overall update of the APP has the following problems:
1)整体更新将占用终端更多的处理资源;1) The overall update will occupy more processing resources of the terminal;
2)整体更新后,被更新的APP应用软件会重新启动,从而加长了终端的APP更新响应周期,降低了用户体验。2) After the overall update, the updated APP application software will be restarted, thereby lengthening the APP update response cycle of the terminal and reducing the user experience.
如何有针对性的对APP需要更新的部分进行更新成为了亟待解决的问题。How to update the part of the APP that needs to be updated has become an urgent problem to be solved.
发明内容Summary of the invention
为解决现有存在的技术问题,本发明实施例提供一种Android系统中APP的更新方法、终端及计算机存储介质,可实现对APP需要更新的插件进行更新,缩短终端对APP的更新响应周期,体现APP更新的便捷性,提升用户体验。In order to solve the existing technical problems, an embodiment of the present invention provides an APP update method, a terminal, and a computer storage medium in an Android system, which can update a plug-in that needs to be updated by an APP, and shorten an update response period of the terminal to the APP. It reflects the convenience of APP update and enhances user experience.
本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is implemented as follows:
本发明实施例提供了一种安卓系统中应用APP的更新方法,所述方法应用于一终端中,所述终端运行有安卓Android操作系统,在所述Android 操作系统中运行有至少一个应用APP;为每一个APP配置一个用于管理所述APP的插件的开放服务网关协议OSGI架构模型,所述方法还包括:An embodiment of the present invention provides an update method of an application APP in an Android system, where the method is applied to a terminal, where the terminal runs an Android Android operating system, and the Android At least one application APP is run in the operating system; an Open Service Gateway Protocol OSGI architecture model for managing the plug-in of the APP is configured for each APP, and the method further includes:
通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;Obtaining context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP;
依据所述插件上下文信息,通过利用所述OSGI架构模型获取所述APP的待更新插件;Obtaining the to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information;
配置所述待更新插件至所述APP,以更新所述APP。Configuring the to-be-updated plug-in to the APP to update the APP.
上述方案中,所述通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息,包括:In the above solution, the acquiring the context information of the plug-in to be updated of the APP by using the OSGI architecture model corresponding to the APP includes:
通过所述OSGI架构模型获取服务器侧的所述APP的插件版本;Obtaining, by using the OSGI architecture model, a plug-in version of the APP on the server side;
比较所获取的所述APP的插件版本与自身所管理的所述APP的插件版本;Comparing the acquired plug-in version of the APP with the plug-in version of the APP managed by itself;
比较为所获取到的所述APP的插件版本为最新时,确定所述最新版本插件的上下文信息为所述待更新插件的上下文信息。When the obtained plug-in version of the APP is the latest, the context information of the latest version plug-in is determined as the context information of the plug-in to be updated.
上述方案中,所述依据所述插件上下文信息,所述OSGI架构模型获取所述APP的待更新插件,包括:In the foregoing solution, the acquiring, by the OSGI architecture model, the to-be-updated plug-in of the APP, according to the plug-in context information, includes:
通过所述OSGI架构模型的OSGI服务将所述上下文信息发送至服务器;Sending the context information to a server through an OSGI service of the OSGI architecture model;
并在接收到所述服务器的注册通知消息后,注册所述OSGI服务;And after receiving the registration notification message of the server, registering the OSGI service;
接收所述服务器为所注册的OSGI服务获取的所述待更新插件的布局文件和用户界面UI类。Receiving a layout file and a user interface UI class of the to-be-updated plug-in obtained by the server for the registered OSGI service.
上述方案中,所述配置所述待更新插件至所述APP,以更新所述APP,包括:In the above solution, the configuring the to-be-updated plug-in to the APP to update the APP includes:
配置所述布局文件和所述UI类至所述APP,以更新所述APP。The layout file and the UI class are configured to the APP to update the APP.
上述方案中,所述方法还包括: In the above solution, the method further includes:
通过所述OSGI架构模型通知服务器注销所注册的OSGI服务。The server is notified by the OSGI architecture model to log out of the registered OSGI service.
本发明实施例还提供了一种终端,所述终端运行有安卓Android操作系统,在所述Android操作系统中运行有至少一个应用APP;所述终端包括:The embodiment of the present invention further provides a terminal, where the terminal runs an Android Android operating system, and the Android operating system runs at least one application APP; the terminal includes:
第一配置单元,配置为为每一个APP配置一个用于管理所述APP的插件的开放服务网关协议OSGI架构模型;a first configuration unit configured to configure, for each APP, an Open Service Gateway Protocol OSGI architecture model for managing a plug-in of the APP;
第一获取单元,配置为通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;a first acquiring unit, configured to acquire context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP;
第二获取单元,配置为依据所述插件上下文信息,通过利用所述OSGI架构模型获取所述APP的待更新插件;a second obtaining unit, configured to acquire an to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information;
第二配置单元,配置为配置所述待更新插件至所述APP,以更新所述APP。And a second configuration unit configured to configure the to-be-updated plug-in to the APP to update the APP.
上述方案中,In the above scheme,
所述第一获取单元,还配置为通过所述OSGI架构模型获取服务器侧的所述APP的插件版本;The first obtaining unit is further configured to acquire, by using the OSGI architecture model, a plug-in version of the APP on the server side;
比较所获取的所述APP的插件版本与自身所管理的所述APP的插件版本;Comparing the acquired plug-in version of the APP with the plug-in version of the APP managed by itself;
比较为所获取到的所述APP的插件版本为最新时,确定所述最新版本插件的上下文信息为所述待更新插件的上下文信息。When the obtained plug-in version of the APP is the latest, the context information of the latest version plug-in is determined as the context information of the plug-in to be updated.
上述方案中,In the above scheme,
所述第二获取单元,还配置为通过利用所述OSGI架构模型的OSGI服务将所述上下文信息发送至服务器;The second obtaining unit is further configured to send the context information to a server by using an OSGI service of the OSGI architecture model;
并在接收到所述服务器的注册通知消息后,注册所述OSGI服务;And after receiving the registration notification message of the server, registering the OSGI service;
接收所述服务器为所注册的OSGI服务获取的所述待更新插件的布局文件和用户界面UI类。Receiving a layout file and a user interface UI class of the to-be-updated plug-in obtained by the server for the registered OSGI service.
上述方案中, In the above scheme,
所述第二配置单元,配置为配置所述布局文件和所述UI类至所述APP,以更新所述APP。The second configuration unit is configured to configure the layout file and the UI class to the APP to update the APP.
上述方案中,所述终端还包括:In the above solution, the terminal further includes:
第一通知单元,配置为通过所述OSGI架构模型通知服务器注销所注册的OSGI服务。The first notification unit is configured to notify the server to log out the registered OSGI service by using the OSGI architecture model.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的安卓系统中应用APP的更新方法。The embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing update method of the application APP in the Android system.
本发明实施例提供的Android系统中APP的更新方法、终端及计算机存储介质,所述方法应用于一终端中,所述终端运行有安卓Android操作系统,在所述Android操作系统中运行有至少一个应用APP;为每一个APP配置一用于管理所述APP的插件的开放服务网关协议OSGI架构模型,所述方法还包括:通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;依据所述插件上下文信息,所述OSGI架构模型获取所述APP的待更新插件;配置所述待更新插件至所述APP,以更新所述APP。利用本发明实施例,利用所述OSGI架构模型可实现对APP需要更新的插件进行更新,缩短了终端对APP的更新响应周期,体现APP更新的便捷性,提升了用户体验。The method for updating an APP, the terminal, and the computer storage medium in the Android system provided by the embodiment of the present invention, the method is applied to a terminal, where the terminal runs an Android Android operating system, and at least one of the Android operating system runs. Applying an APP; configuring an Open Service Gateway Protocol OSGI architecture model for managing the plug-in of the APP for each APP, the method further comprising: acquiring, by the OSGI architecture model corresponding to the APP, the plug-in to be updated of the APP Context information: The OSGI architecture model acquires a plug-in to be updated of the APP according to the plug-in context information, and configures the plug-in to be updated to the APP to update the APP. With the embodiment of the present invention, the OSGI architecture model can be used to update the plug-in that needs to be updated by the APP, shorten the update response period of the terminal to the APP, reflect the convenience of the APP update, and improve the user experience.
附图说明DRAWINGS
图1为本发明实施例提供的Android系统中APP的更新方法的实现流程图;FIG. 1 is a flowchart of implementing an APP update method in an Android system according to an embodiment of the present invention;
图2为本发明实施例提供的Android系统中APP的更新方法的应用场景一示意图;2 is a schematic diagram of an application scenario of an APP update method in an Android system according to an embodiment of the present disclosure;
图3为本发明实施例提供的Android系统中APP的更新方法的应用场景二示意图; FIG. 3 is a schematic diagram of application scenario 2 of an APP update method in an Android system according to an embodiment of the present disclosure;
图4为本发明实施例提供的终端组成示意图。FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
具体实施方式detailed description
以下结合附图对本发明的优选实施例进行详细说明,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
开放服务网关协议(OSGI,Open Services Gateway Initiative)为Java动态化组件系统的标准,能够为大型分布式系统及嵌入式系统提供一种模块化架构;可将APP的功能点视为插件,并实现对APP插件的模块化管理;故本发明实施例中,为终端中的每一个APP配置一个用于管理APP的插件的OSGI架构模型,通过所述OSGI架构模型提供的OSGI服务对APP的插件进行更新,以完成对所述APP的更新。其中,为终端中的每一个APP配置一个与之相对应的OSGI架构模型,例如,为QQ应用配置一个OSGI架构模型,该模型用于管理QQ应用的插件;为微信应用配置一个OSGI架构模型,该模型用于管理微信应用的插件。The Open Services Gateway Initiative (OSGI) is a standard for Java dynamic component systems. It provides a modular architecture for large distributed systems and embedded systems. The function points of the APP can be regarded as plug-ins and implemented. Modular management of the APP plug-in; therefore, in the embodiment of the present invention, an OSGI architecture model for managing the plug-in of the APP is configured for each APP in the terminal, and the plug-in of the APP is performed by the OSGI service provided by the OSGI framework model. Update to complete the update to the app. Wherein, each APP in the terminal is configured with an OSGI architecture model corresponding thereto, for example, an OSGI architecture model is configured for the QQ application, the model is used to manage the plug-in of the QQ application; and an OSGI architecture model is configured for the WeChat application, This model is used to manage plugins for WeChat applications.
本发明实施例提供的Android系统中APP的更新方法,应用于终端中,所述终端运行有安卓Android操作系统,在所述Android操作系统中运行有至少一个应用APP;为每一个APP配置一个用于管理所述APP的插件的开放服务网关协议OSGI架构模型。The method for updating an APP in an Android system provided by the embodiment of the present invention is applied to a terminal, where the terminal runs an Android Android operating system, and at least one application APP runs in the Android operating system; An Open Services Gateway Protocol OSGI architecture model for managing plugins for the APP.
图1为本发明实施例提供的Android系统中APP的更新方法的实现流程图;如图1所示,所述方法包括:FIG. 1 is a flowchart of implementing an update method of an APP in an Android system according to an embodiment of the present invention; as shown in FIG. 1 , the method includes:
步骤11:通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;Step 11: Obtain context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP.
这里,图2为本发明实施例的应用场景一示意图;结合图2所示,对本步骤进行说明。2 is a schematic diagram of an application scenario according to an embodiment of the present invention; this step is illustrated in conjunction with FIG. 2.
通常一个APP具有至少一个功能点,研发人员进行APP研发时,通常将APP的预定数量的功能点设置于用于管理所述APP的插件的OSGI架构 模型中,在所述OSGI架构模型中,称所述功能点为所述APP的插件。也可以理解为,将OSGI架构模型的执行功能作为APP应用功能的一部分,其中OSGI架构模型用于管理该APP应用的插件(对插件进行更新),当需要终端与服务器侧针对该APP应用进行插件更新时,需要为该APP设置的OSGI架构模型通过OSGI服务来与服务器侧进行交互。Usually, an APP has at least one function point. When a developer develops an APP, a predetermined number of function points of the APP are usually set to the OSGI architecture of the plug-in for managing the APP. In the model, in the OSGI architecture model, the function point is called a plug-in of the APP. It can also be understood that the execution function of the OSGI architecture model is used as part of the APP application function, wherein the OSGI architecture model is used to manage the plug-in of the APP application (update the plug-in), and when the terminal and the server side are required to perform plug-ins for the APP application When updating, the OSGI architecture model that needs to be set for the APP interacts with the server side through the OSGI service.
在一个实施例中,本步骤可以为:所述OSGI架构模型获取服务器侧的所述APP的插件版本;比较所获取的所述APP的插件版本与自身所管理的所述APP的插件版本;比较为所获取到的所述APP的插件版本为最新时,确定所述最新版本插件的上下文信息为所述待更新插件的上下文信息。In an embodiment, the step may be: the OSGI architecture model acquires a plug-in version of the APP on the server side; compares the obtained plug-in version of the APP with a plug-in version of the APP managed by itself; When the obtained plug-in version of the APP is the latest, it is determined that the context information of the latest version plug-in is the context information of the plug-in to be updated.
具体的,在预设的第一周期到来时,或者启动APP(启动APP的插件)时,与APP相对应的所述OSGI架构模型通过OSGI服务向服务器发起所述APP的插件的版本请求,并在接收到服务器返回的所述APP的插件的版本信息时,所述OSGI架构模型获取其所管理的所述APP的插件的版本信息,比较自身所管理的APP的插件及所接收到的所述APP的插件的版本信息,比较为所接收到的APP的插件版本为最新时,即确定所述APP需要进行更新时,获取待更新插件(预升级为所述新版本插件的插件)的上下文信息;在OSGI架构模型中,所述上下文信息为插件包内容bundle context。其中,所述第一周期可以根据对终端的应用的具体使用情况而自行设置。Specifically, when the preset first period comes, or when the APP is started (the plug-in of the APP is started), the OSGI architecture model corresponding to the APP initiates a version request of the plug-in of the APP to the server through the OSGI service, and Upon receiving the version information of the plug-in of the APP returned by the server, the OSGI architecture model obtains version information of the plug-in of the APP that it manages, compares the plug-in of the APP managed by itself, and the received The version information of the plug-in of the APP is compared when the plug-in version of the received APP is the latest, that is, when the APP needs to be updated, the context information of the plug-in to be updated (the plug-in pre-upgraded to the new version plug-in) is obtained. In the OSGI architecture model, the context information is a plugin package content bundle context. The first period may be set according to the specific use of the application of the terminal.
步骤12:依据所述插件上下文信息,通过利用所述OSGI架构模型获取所述APP的待更新插件;Step 12: Obtain an to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information.
这里,所述OSGI架构模型通过OSGI服务将所述插件上下文信息发送至服务器侧;所述服务器依据所述插件上下文信息,查找所述OSGI服务,查找所述OSGI服务,查找到时,发送注册通知消息至所述OSGI架构模型;所述OSGI架构模型接收到所述注册通知消息后,注册所述OSGI服务至所述服务器;所述服务器获取存在有更新的服务接口(服务入口),通过所述 服务接口为所注册的OSGI服务获取待更新插件的布局文件和用户界面UI类,并返回所述待更新插件的布局文件和UI类至所述终端。Here, the OSGI architecture model sends the plugin context information to the server side through an OSGI service; the server searches the OSGI service according to the plugin context information, searches for the OSGI service, and sends a registration notification when found Message to the OSGI architecture model; the OSGI architecture model registers the OSGI service to the server after receiving the registration notification message; the server acquires an updated service interface (service portal) through the The service interface acquires a layout file and a user interface UI class of the plug-in to be updated for the registered OSGI service, and returns a layout file and a UI class of the plug-in to be updated to the terminal.
步骤13:配置所述待更新插件至所述APP,以更新所述APP。Step 13: Configure the to-be-updated plug-in to the APP to update the APP.
这里,所述OSGI架构模型接收服务器返回的所述待更新插件的布局文件和UI类,并配置所述布局文件和UI类至所述APP,以完成对与所述OSGI架构模型相对应的APP的更新。在通过更新APP的插件来完成对所述APP的更新之后,通过所述OSGI架构模型通知所述服务器注销所述OSGI服务。Here, the OSGI architecture model receives a layout file and a UI class of the to-be-updated plug-in returned by the server, and configures the layout file and the UI class to the APP to complete an APP corresponding to the OSGI architecture model. Update. After completing the update of the APP by updating the plugin of the APP, the server is notified by the OSGI architecture model to log out of the OSGI service.
上述方案中,OSGI架构模型可通过采用事件监听方式,监听APP的插件的安装、卸载等状态,并将所述状态记录于插件列表中,以方便实现App的插件的更新(APP的局部更新)。In the above solution, the OSGI architecture model can monitor the installation and uninstallation status of the plug-in of the APP by using the event monitoring mode, and record the status in the plug-in list to facilitate the update of the plug-in of the App (partial update of the APP). .
本发明实施例中,所述方法还包括:In the embodiment of the present invention, the method further includes:
当终端启动APP时,启动所述APP的插件,并通过为所述APP配置的OSGI架构模型来获取该APP的插件菜单,并显示于所述APP的工具栏中。When the terminal starts the APP, the plug-in of the APP is started, and the plug-in menu of the APP is obtained through the OSGI architecture model configured for the APP, and displayed in the toolbar of the APP.
图3为本发明实施例的应用场景二示意图;结合图3所示,OSGI架构模型除了用于管理该APP应用的插件更新之外,还可以在启动某个APP时,通过OSGI架构模型来获取随所述APP启动而启动的插件的菜单,并将获取的插件的菜单所对应的功能如工具(从用户角度出发其为一个工具)显示于工具栏中。3 is a schematic diagram of an application scenario 2 according to an embodiment of the present invention; as shown in FIG. 3, in addition to the plug-in update for managing the APP application, the OSGI architecture model may also be obtained by using an OSGI architecture model when starting an APP. The menu of the plug-in launched with the launch of the APP, and the function corresponding to the menu of the acquired plug-in, such as a tool (which is a tool from the user's point of view), is displayed in the toolbar.
在一个实施例中,当终端启动所述APP时,为所述APP配置的OSGI架构模型通过启动模型的Bundle Activator来启动该APP的插件的Activity,获取所启动插件的上下文信息;并通过OSGI服务将该上下文信息发送至服务器侧;所述服务器依据所述上下文信息,查找所述OSGI服务,查找所述OSGI服务,查找到时,发送注册通知消息至所述OSGI架构模型;所述OSGI架构模型接收到所述注册通知消息后,注册所述OSGI服务至所 述服务器;所述服务器获取存在有更新的服务接口,通过所述服务接口为所注册的OSGI服务获取待所启动插件的插件菜单信息,并返回所述插件菜单信息至所述终端;配置所述插件菜单信息至所述APP,将所获取的插件菜单作为工具栏的工具而显示,以方便查看。In an embodiment, when the terminal starts the APP, the OSGI architecture model configured for the APP starts the activity of the plugin of the APP by launching the Bundle Activator of the model, acquires context information of the launched plugin, and passes the OSGI service. Sending the context information to the server side; the server searches the OSGI service according to the context information, searches for the OSGI service, and when sent, sends a registration notification message to the OSGI architecture model; the OSGI architecture model After receiving the registration notification message, registering the OSGI service to the office a server that obtains an updated service interface, obtains plug-in menu information of the plug-in to be launched for the registered OSGI service through the service interface, and returns the plug-in menu information to the terminal; The plug-in menu information is displayed to the APP, and the obtained plug-in menu is displayed as a tool of the toolbar for convenient viewing.
上述方案中,通过为每个APP配置的OSGI架构模型,对APP实现了插件化,对APP的插件实现了模块化,通过OSGI服务对插件进行更新,进而达到对APP的更新;无需对APP进行整体更新,只需要更新APP的待更新插件,缩短了终端对APP的更新响应周期,体现了APP更新的便捷性;同时,由于仅更新APP的插件,无需整体更新,所以在更新APP之后,无需重新启动APP,提升了用户的使用体验。In the above solution, the plug-in is implemented for the APP by configuring the OSGI architecture model for each APP, and the plug-in of the APP is modularized, and the plug-in is updated by the OSGI service, thereby updating the APP; The overall update only needs to update the plug-in of the APP to be updated, shortening the update response period of the terminal to the APP, and embodies the convenience of the APP update. At the same time, since only the plug-in of the APP is updated, the overall update is not required, so after updating the APP, it is not necessary Restart the app to improve the user experience.
上述方案中,所述OSGI架构模型的OSGI服务的查询、注册、注销等具体实现请参见OSGI协议,这里不再赘述。其中,所述OSGI服务的交互过程传递的是java对象,并非是序列化的N进制流(N=2n,n为正整数);与现有Android中的服务进程间通信采用N进制流不同,本发明实施例所提供的OSGI架构模型,通过更新APP的插件的方式来达到更新APP的目的;其中,插件支持Java本地调用(JNI,Java Native Interface),兼容性较强,除了兼容Java,还能够兼容其他编程语言如C、C++。For the specific implementation of the OSGI service query, registration, and logout of the OSGI architecture model, refer to the OSGI protocol, which is not described here. The interaction process of the OSGI service is a Java object, not a serialized N-ary stream (N=2n, n is a positive integer); and the N-stream is used for communication between service processes in the existing Android. Differently, the OSGI architecture model provided by the embodiment of the present invention achieves the purpose of updating the APP by updating the plug-in of the APP; wherein the plug-in supports Java Native Interface (JNI), and the compatibility is strong, except for compatibility with Java. It is also compatible with other programming languages such as C and C++.
本发明实施例还记载了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的Android系统中APP的更新方法。The embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing APP update method in the Android system.
基于上述Android系统中APP的更新方法,本发明实施例还记载了一种终端;所述终端运行Android操作系统,在所述Android操作系统中运行有至少一个应用APP。Based on the update method of the APP in the Android system, the embodiment of the present invention further describes a terminal; the terminal runs an Android operating system, and at least one application APP runs in the Android operating system.
图4为本发明实施例的终端组成示意图;如图4所示,所述终端包括:第一配置单元201、第一获取单元202、第二获取单元203及第二配置单元 204;其中,4 is a schematic structural diagram of a terminal according to an embodiment of the present invention; as shown in FIG. 4, the terminal includes: a first configuration unit 201, a first obtaining unit 202, a second obtaining unit 203, and a second configuration unit. 204; among them,
所述第一配置单元201,配置为为每一个APP配置一用于管理所述APP的插件的开放服务网关协议OSGI架构模型;The first configuration unit 201 is configured to configure, for each APP, an Open Service Gateway Protocol OSGI architecture model for managing a plug-in of the APP;
所述第一获取单元202,配置为通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;The first obtaining unit 202 is configured to acquire context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP;
在一个实施例中,所述第一获取单元202通过所述OSGI架构模型来获取服务器侧的所述APP的插件版本;比较所获取的所述APP的插件版本与自身所管理的所述APP的插件版本;比较为所获取到的所述APP的插件版本为最新时,确定所述最新版本插件的上下文信息为所述待更新插件的上下文信息。In an embodiment, the first obtaining unit 202 acquires a plug-in version of the APP on the server side by using the OSGI architecture model; compares the obtained plug-in version of the APP with the APP managed by itself The plug-in version is compared to when the obtained plug-in version of the APP is the latest, determining that the context information of the latest version plug-in is the context information of the plug-in to be updated.
具体的,在预设的第一周期到来时,或者启动APP(启动APP的插件)时,所述终端、具体是所述第一获取单元202利用与APP相对应的所述OSGI架构模型的OSGI服务向服务器发起所述APP的插件的版本请求,并在接收到服务器返回的所述APP的插件的版本信息时,所述第一获取单元202利用所述OSGI架构模型获取其所管理的所述APP的插件的版本信息,并比较自身所管理的APP的插件及所接收到的所述APP的插件的版本信息;比较为所接收到的APP的插件版本为最新时,所述第一获取单元202获取待更新插件(预升级为所述新版本插件的插件)的上下文信息;在OSGI架构模型中,所述上下文信息为插件包内容bundle context。其中,所述第一周期可以根据对终端的应用的具体使用情况而自行设置。Specifically, when the preset first period comes, or when the APP is started (the plug-in of the APP is started), the terminal, specifically the first obtaining unit 202, uses the OSGI of the OSGI architecture model corresponding to the APP. The service initiates a version request of the plug-in of the APP to the server, and when receiving the version information of the plug-in of the APP returned by the server, the first obtaining unit 202 acquires the management that is managed by the OSGI architecture model. Version information of the plug-in of the APP, and comparing the plug-in of the APP managed by the APP and the version information of the plug-in of the APP received; when the plug-in version of the received APP is the latest, the first obtaining unit 202: Obtain context information of a plug-in to be updated (a plug-in pre-upgraded to the new version plug-in); in the OSGI architecture model, the context information is a plug-in package content bundle context. The first period may be set according to the specific use of the application of the terminal.
所述第二获取单元203,配置为依据所述插件上下文信息,通过利用所述OSGI架构模型获取所述APP的待更新插件;The second obtaining unit 203 is configured to acquire the to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information;
这里,所述终端、具体是所述第二获取单元203利用所述OSGI架构模型的OSGI服务将所述插件上下文信息发送至服务器侧;所述服务器依据所述插件上下文信息,查找所述OSGI服务,查找所述OSGI服务,查找到时, 发送注册通知消息至所述终端、具体是所述第二获取单元203;所述第二获取单元203利用所述OSGI架构模型接收到所述注册通知消息后,注册所述OSGI服务至所述服务器;所述服务器获取存在有更新的服务接口(服务入口),通过所述服务接口为所注册的OSGI服务获取待更新插件的布局文件和用户界面UI类,并返回所述新插件的布局文件和UI类至所述终端、具体是所述第二获取单元203。Here, the terminal, specifically the second obtaining unit 203, sends the plug-in context information to the server side by using an OSGI service of the OSGI architecture model; the server searches for the OSGI service according to the plug-in context information. Find the OSGI service, when it is found, Sending a registration notification message to the terminal, specifically the second obtaining unit 203; the second obtaining unit 203, after receiving the registration notification message by using the OSGI architecture model, registering the OSGI service to the server Obtaining, by the server, an updated service interface (service portal), obtaining, by the service interface, a layout file and a user interface UI class of the plug-in to be updated for the registered OSGI service, and returning a layout file of the new plug-in and The UI class is to the terminal, specifically the second acquiring unit 203.
所述第二配置单元204,配置为配置所述待更新插件至所述APP,以更新所述APP。The second configuration unit 204 is configured to configure the to-be-updated plug-in to the APP to update the APP.
这里,所述第二获取单元203传输所述布局文件和UI类至所述第二配置单元204,所述第二配置单元204配置所述布局文件和UI类至所述APP,以完成对APP的更新。Here, the second obtaining unit 203 transmits the layout file and the UI class to the second configuration unit 204, and the second configuration unit 204 configures the layout file and the UI class to the APP to complete the APP. Update.
本发明实施例中,如图4所示,所述终端还包括:第一通知单元205;In the embodiment of the present invention, as shown in FIG. 4, the terminal further includes: a first notification unit 205;
所述第一通知单元205,配置为通过所述OSGI架构模型通知所述服务器注销所述OSGI服务。The first notification unit 205 is configured to notify the server to log out of the OSGI service by using the OSGI architecture model.
本发明实施例中,如图4所示,所述终端还包括:第三获取单元206、第一显示单元207;其中,In the embodiment of the present invention, as shown in FIG. 4, the terminal further includes: a third obtaining unit 206, a first display unit 207;
所述第三获取单元206,配置为当启动APP时,启动该APP的插件,并通过为该APP配置的OSGI架构模型获取该APP的插件菜单;The third obtaining unit 206 is configured to start a plug-in of the APP when the APP is started, and obtain a plug-in menu of the APP by using an OSGI architecture model configured for the APP;
所述第一显示单元207,配置为显示所述插件菜单于所述APP的工具栏中。The first display unit 207 is configured to display the plug-in menu in a toolbar of the APP.
在一个实施例中,当终端启动所述APP时,所述第三获取单元206利用为所述APP配置的OSGI架构模型启动模型的Bundle Activator,进而启动该APP的插件的Activity,获取所启动插件的上下文信息;并通过OSGI服务将该上下文信息发送至服务器侧;所述服务器依据所述上下文信息,查找所述OSGI服务,查找所述OSGI服务,查找到时,发送注册通知消息 至所述终端、具体是所述第三获取单元206;所述第三获取单元206通过利用所述OSGI架构模型接收到所述注册通知消息后,注册所述OSGI服务至所述服务器;所述服务器获取存在有更新的服务接口,通过所述服务接口为所注册的OSGI服务获取待所启动插件的插件菜单信息,并返回所述插件菜单信息至所述终端、具体是所述第三获取单元206;所述第三获取单元206配置所述插件菜单信息至所述APP;所述第一显示单元207将所述插件菜单作为所述APP工具栏的一部分显示,以方便查看所述APP具有哪些插件。In an embodiment, when the terminal starts the APP, the third obtaining unit 206 starts the Bundle Activator of the model by using the OSGI architecture model configured for the APP, and then starts the activity of the plugin of the APP, and obtains the launched plugin. Context information; and sending the context information to the server side through the OSGI service; the server searches the OSGI service according to the context information, searches for the OSGI service, and sends a registration notification message when found To the terminal, specifically the third obtaining unit 206; the third obtaining unit 206 registers the OSGI service to the server by receiving the registration notification message by using the OSGI architecture model; Obtaining, by the service interface, a service interface that has an update, obtaining, by the service interface, plug-in menu information of the plug-in to be started for the registered OSGI service, and returning the plug-in menu information to the terminal, specifically the third acquiring unit The third obtaining unit 206 configures the plug-in menu information to the APP; the first display unit 207 displays the plug-in menu as part of the APP toolbar to conveniently view which APPs are Plugin.
上述方案中,通过为每个APP配置的OSGI架构模型,对APP实现了插件化,对APP的插件实现了模块化,通过OSGI服务对插件进行更新,进而达到对APP的更新;无需对APP进行整体更新,只需要更新APP的待更新插件,缩短了终端对APP的更新响应周期,体现了APP更新的便捷性;同时,由于仅更新APP的插件,无需整体更新,所以在更新APP之后,无需重新启动APP,提升了用户的使用体验。In the above solution, the plug-in is implemented for the APP by configuring the OSGI architecture model for each APP, and the plug-in of the APP is modularized, and the plug-in is updated by the OSGI service, thereby updating the APP; The overall update only needs to update the plug-in of the APP to be updated, shortening the update response period of the terminal to the APP, and embodies the convenience of the APP update. At the same time, since only the plug-in of the APP is updated, the overall update is not required, so after updating the APP, it is not necessary Restart the app to improve the user experience.
本领域技术人员应当理解,图4中所示的终端中的各处理单元的实现功能可参照前述Android系统中APP的更新方法的相关描述而理解。本领域技术人员应当理解,图4所示的终端中各处理单元的功能可通过运行于处理器上的程序而实现,也可通过具体的逻辑电路而实现。It should be understood by those skilled in the art that the implementation functions of the processing units in the terminal shown in FIG. 4 can be understood by referring to the related description of the update method of the APP in the aforementioned Android system. It should be understood by those skilled in the art that the functions of the processing units in the terminal shown in FIG. 4 can be implemented by a program running on a processor, or can be implemented by a specific logic circuit.
在实际应用中,所述第一配置单元201、第一获取单元202、第二获取单元203、第二配置单元204、第一通知单元205、第三获取单元206、第一显示单元207均可由中央处理单元(CPU,Central Processing Unit)、或数字信号处理(DSP,Digital Signal Processor)、或微处理器(MPU,Micro Processor Unit)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等来实现;所述CPU、DSP、MPU、FPGA均可内置于终端中。In an actual application, the first configuration unit 201, the first obtaining unit 202, the second obtaining unit 203, the second configuration unit 204, the first notification unit 205, the third obtaining unit 206, and the first display unit 207 may each be configured by Central processing unit (CPU, Central Processing Unit), or digital signal processing (DSP, Digital Signal Processor), or microprocessor (MPU, Micro Processor Unit), or Field Programmable Gate Array (FPGA) To achieve; the CPU, DSP, MPU, FPGA can be built into the terminal.
本发明实施例中,所述终端包括但不限于:平板电脑、手机、电子阅 读器等。本发明实施例优选的终端的对象为手机。In the embodiment of the present invention, the terminal includes but is not limited to: a tablet computer, a mobile phone, and an electronic reading. Reader, etc. The preferred terminal of the embodiment of the present invention is a mobile phone.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。 The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
工业实用性Industrial applicability
本发明实施例提供的Android系统中APP的更新方法、终端及计算机存储介质,所述方法应用于一终端中,终端运行有安卓Android操作系统,在Android操作系统中运行有至少一个应用APP;为每一个APP配置一用于管理APP插件的OSGI架构模型,所述方法还包括:通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;依据插件上下文信息,通过利用OSGI架构模型获取所述APP的待更新插件;配置所述待更新插件至所述APP,以更新所述APP。利用OSGI架构模型可实现对APP需要更新的插件进行更新,缩短了终端对APP的更新响应周期,体现APP更新的便捷性,提升了用户体验。 The method for updating an APP, the terminal, and the computer storage medium in the Android system provided by the embodiment of the present invention, the method is applied to a terminal, the terminal runs an Android Android operating system, and at least one application APP runs in the Android operating system; Each APP configures an OSGI architecture model for managing the APP plug-in. The method further includes: acquiring, by using an OSGI architecture model corresponding to the APP, context information of the plug-in to be updated of the APP; and using the OSGI according to the plug-in context information. The architecture model acquires the plug-in to be updated of the APP; and configures the plug-in to be updated to the APP to update the APP. The OSGI architecture model can be used to update the plug-ins that need to be updated by the APP, shorten the update response period of the terminal to the APP, reflect the convenience of the APP update, and improve the user experience.

Claims (11)

  1. 一种安卓系统中应用APP的更新方法,所述方法应用于一终端中,所述终端运行有安卓Android操作系统,在所述Android操作系统中运行有至少一个应用APP;为每一个APP配置一个用于管理所述APP的插件的开放服务网关协议OSGI架构模型,所述方法还包括:An update method of an application APP in an Android system, the method being applied to a terminal, the terminal running an Android Android operating system, running at least one application APP in the Android operating system; configuring one for each APP An Open Service Gateway Protocol OSGI architecture model for managing plugins of the APP, the method further comprising:
    通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;Obtaining context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP;
    依据所述插件上下文信息,通过利用所述OSGI架构模型获取所述APP的待更新插件;Obtaining the to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information;
    配置所述待更新插件至所述APP,以更新所述APP。Configuring the to-be-updated plug-in to the APP to update the APP.
  2. 根据权利要求1所述的方法,其中,所述通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息,包括:The method of claim 1, wherein the acquiring the context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP comprises:
    通过所述OSGI架构模型获取服务器侧的所述APP的插件版本;Obtaining, by using the OSGI architecture model, a plug-in version of the APP on the server side;
    比较所获取的所述APP的插件版本与自身所管理的所述APP的插件版本;Comparing the acquired plug-in version of the APP with the plug-in version of the APP managed by itself;
    比较为所获取到的所述APP的插件版本为最新时,确定所述最新版本插件的上下文信息为所述待更新插件的上下文信息。When the obtained plug-in version of the APP is the latest, the context information of the latest version plug-in is determined as the context information of the plug-in to be updated.
  3. 根据权利要求1所述的方法,其中,所述依据所述插件上下文信息,通过利用所述OSGI架构模型获取所述APP的待更新插件,包括:The method according to claim 1, wherein the acquiring the plug-in to be updated of the APP by using the OSGI architecture model according to the plug-in context information comprises:
    通过所述OSGI架构模型的OSGI服务将所述上下文信息发送至服务器;Sending the context information to a server through an OSGI service of the OSGI architecture model;
    并在接收到所述服务器的注册通知消息后,注册所述OSGI服务;And after receiving the registration notification message of the server, registering the OSGI service;
    接收所述服务器为所注册的OSGI服务获取的所述待更新插件的布局文件和用户界面UI类。 Receiving a layout file and a user interface UI class of the to-be-updated plug-in obtained by the server for the registered OSGI service.
  4. 根据权利要求3所述的方法,其中,所述配置所述待更新插件至所述APP,以更新所述APP,包括:The method of claim 3, wherein the configuring the to-be-updated plug-in to the APP to update the APP comprises:
    配置所述布局文件和所述UI类至所述APP,以更新所述APP。The layout file and the UI class are configured to the APP to update the APP.
  5. 根据权利要求4所述方法,其中,所述方法还包括:The method of claim 4 wherein the method further comprises:
    通过所述OSGI架构模型通知服务器注销所注册的OSGI服务。The server is notified by the OSGI architecture model to log out of the registered OSGI service.
  6. 一种终端,所述终端运行有安卓Android操作系统,在所述Android操作系统中运行有至少一个应用APP;所述终端包括:A terminal running an Android Android operating system, where at least one application APP runs in the Android operating system; the terminal includes:
    第一配置单元,配置为为每一个APP配置一个用于管理所述APP的插件的开放服务网关协议OSGI架构模型;a first configuration unit configured to configure, for each APP, an Open Service Gateway Protocol OSGI architecture model for managing a plug-in of the APP;
    第一获取单元,配置为通过与APP相对应的OSGI架构模型获取所述APP的待更新插件的上下文信息;a first acquiring unit, configured to acquire context information of the plug-in to be updated of the APP by using an OSGI architecture model corresponding to the APP;
    第二获取单元,配置为依据所述插件上下文信息,通过利用所述OSGI架构模型获取所述APP的待更新插件;a second obtaining unit, configured to acquire an to-be-updated plug-in of the APP by using the OSGI architecture model according to the plug-in context information;
    第二配置单元,配置为配置所述待更新插件至所述APP,以更新所述APP。And a second configuration unit configured to configure the to-be-updated plug-in to the APP to update the APP.
  7. 根据权利要求6所述的终端,其中,The terminal according to claim 6, wherein
    所述第一获取单元,还配置为通过所述OSGI架构模型获取服务器侧的所述APP的插件版本;The first obtaining unit is further configured to acquire, by using the OSGI architecture model, a plug-in version of the APP on the server side;
    比较所获取的所述APP的插件版本与自身所管理的所述APP的插件版本;Comparing the acquired plug-in version of the APP with the plug-in version of the APP managed by itself;
    比较为所获取到的所述APP的插件版本为最新时,确定所述最新版本插件的上下文信息为所述待更新插件的上下文信息。When the obtained plug-in version of the APP is the latest, the context information of the latest version plug-in is determined as the context information of the plug-in to be updated.
  8. 根据权利要求6所述的终端,其中,The terminal according to claim 6, wherein
    所述第二获取单元,还配置为通过利用所述OSGI架构模型的OSGI服务将所述上下文信息发送至服务器; The second obtaining unit is further configured to send the context information to a server by using an OSGI service of the OSGI architecture model;
    并在接收到所述服务器的注册通知消息后,注册所述OSGI服务;And after receiving the registration notification message of the server, registering the OSGI service;
    接收所述服务器为所注册的OSGI服务获取的所述待更新插件的布局文件和用户界面UI类。Receiving a layout file and a user interface UI class of the to-be-updated plug-in obtained by the server for the registered OSGI service.
  9. 根据权利要求8所述的终端,其中,The terminal according to claim 8, wherein
    所述第二配置单元,配置为配置所述布局文件和所述UI类至所述APP,以更新所述APP。The second configuration unit is configured to configure the layout file and the UI class to the APP to update the APP.
  10. 根据权利要求9所述的终端,其中,所述终端还包括:The terminal of claim 9, wherein the terminal further comprises:
    第一通知单元,配置为通过所述OSGI架构模型通知服务器注销所注册的OSGI服务。The first notification unit is configured to notify the server to log out the registered OSGI service by using the OSGI architecture model.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述的安卓系统中应用APP的更新方法。 A computer storage medium storing computer executable instructions for executing an update method of an application APP in an Android system according to any one of claims 1 to 5.
PCT/CN2014/092819 2014-06-17 2014-12-02 Method for updating app in android system, terminal and storage medium WO2015192608A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410271733.9A CN105323269A (en) 2014-06-17 2014-06-17 Method for updating APP in Android system, terminal and storage medium
CN201410271733.9 2014-06-17

Publications (1)

Publication Number Publication Date
WO2015192608A1 true WO2015192608A1 (en) 2015-12-23

Family

ID=54934820

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/092819 WO2015192608A1 (en) 2014-06-17 2014-12-02 Method for updating app in android system, terminal and storage medium

Country Status (2)

Country Link
CN (1) CN105323269A (en)
WO (1) WO2015192608A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824623A (en) * 2016-03-14 2016-08-03 广州趣丸网络科技有限公司 Android application hotfix method and device
CN112099830A (en) * 2020-09-25 2020-12-18 努比亚技术有限公司 System updating method, equipment and computer readable storage medium
CN117112065A (en) * 2023-08-30 2023-11-24 北京百度网讯科技有限公司 Large model plug-in calling method, device, equipment and medium

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239350B (en) * 2016-03-28 2020-07-07 中国电信股份有限公司 Method and system for calling gateway capability
CN105657191B (en) * 2016-03-29 2020-03-31 Tcl集团股份有限公司 Application increment upgrading method and system based on Android system
CN105827712B (en) * 2016-04-05 2019-07-23 成都西可科技有限公司 A kind of intelligent mobile phone platform exchange method based on commending contents
CN106331135B (en) * 2016-08-31 2019-09-03 广州品唯软件有限公司 A kind of part interface update method, system, client and server-side
CN106484487B (en) * 2016-10-27 2019-11-12 北京锐安科技有限公司 A kind of processing method and processing device of system mend
CN107273151B (en) * 2017-05-25 2020-11-17 西安理工大学 Safe Android App functional plug-in method
CN107529637A (en) * 2017-08-10 2018-01-02 青岛萨纳斯新能源科技有限公司 Electric business platform base framework
CN108881393B (en) * 2018-05-22 2021-03-23 北京达佳互联信息技术有限公司 Data issuing method, device, computer and storage medium
CN109032651B (en) * 2018-08-24 2022-06-10 深圳创维-Rgb电子有限公司 Application updating method, intelligent terminal and computer readable storage medium
CN112231010B (en) * 2020-09-28 2023-06-06 四川新网银行股份有限公司 Method for managing and dynamically updating application configuration information based on OSGI (open service gateway initiative) specification

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707977A (en) * 2012-05-17 2012-10-03 江苏中科梦兰电子科技有限公司 Increment upgrading method based on Android application software
CN103095838A (en) * 2013-01-16 2013-05-08 福州博远无线网络科技有限公司 Method for upgrading Android smartphone software through downloading incremental upgrade package
CN103399792A (en) * 2013-07-24 2013-11-20 佳都新太科技股份有限公司 Implementation scheme of Android-based plug-in applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707977A (en) * 2012-05-17 2012-10-03 江苏中科梦兰电子科技有限公司 Increment upgrading method based on Android application software
CN103095838A (en) * 2013-01-16 2013-05-08 福州博远无线网络科技有限公司 Method for upgrading Android smartphone software through downloading incremental upgrade package
CN103399792A (en) * 2013-07-24 2013-11-20 佳都新太科技股份有限公司 Implementation scheme of Android-based plug-in applications

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIANG, DASHUAI: "Apklug Plugin Trusteeship Service Development Tutorial", QUERYING A PLUGIN IN THE CLOUD ACCORDING TO A CONDITION-01, 21 May 2014 (2014-05-21), pages 1, Retrieved from the Internet <URL:www.apkplug.com/blog/?post=18> *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824623A (en) * 2016-03-14 2016-08-03 广州趣丸网络科技有限公司 Android application hotfix method and device
CN105824623B (en) * 2016-03-14 2019-03-26 广州趣丸网络科技有限公司 A kind of method and apparatus that Android application hot repair is multiple
CN112099830A (en) * 2020-09-25 2020-12-18 努比亚技术有限公司 System updating method, equipment and computer readable storage medium
CN117112065A (en) * 2023-08-30 2023-11-24 北京百度网讯科技有限公司 Large model plug-in calling method, device, equipment and medium

Also Published As

Publication number Publication date
CN105323269A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
WO2015192608A1 (en) Method for updating app in android system, terminal and storage medium
US10127057B2 (en) Method and apparatus for dynamically implementing application function
CN108566290B (en) Service configuration management method, system, storage medium and server
RU2647625C2 (en) Application program running method and device
CN108830720B (en) Intelligent contract running method, device, system and computer readable storage medium
US20180088935A1 (en) Microservices application configuration based on runtime environment
WO2017166446A1 (en) Vulnerability-fixing method and device
TWI626593B (en) Method and apparatus for upgrading software
WO2019042311A1 (en) Software project setup task configuration method and device using jenkins
EP2912547A1 (en) Configuration file updater
WO2017024085A1 (en) Method and apparatus for facilitating a software update process over a network
CN106911500B (en) Physical machine configuration method and device and physical machine
JP2015018295A (en) Application management device, application management system, and program
WO2018032757A1 (en) Method and device for updating component
US10404568B2 (en) Agent manager for distributed transaction monitoring system
CN107967207B (en) Method and device for testing user interface interaction function
CN108132832B (en) Application program starting method and device
WO2018006884A1 (en) Method, device and user terminal for software installation
CN106293790B (en) application program upgrading method and device based on Firefox operating system
CN108111565B (en) Message transmission method and device
WO2017201936A1 (en) Method and apparatus for replacing icon of application installation package, and electronic device
WO2018121652A1 (en) Method and device for connecting wireless access point through application in user equipment
WO2016061921A1 (en) Method, device, terminal and computer storage medium for combining multiple application operations
WO2016206437A1 (en) Rom package generation method and device
CN109960659B (en) Method and device for detecting application program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14894852

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14894852

Country of ref document: EP

Kind code of ref document: A1