Movatterモバイル変換


[0]ホーム

URL:


CN106775827A - Application program update method and device, and computer equipment - Google Patents

Application program update method and device, and computer equipment
Download PDF

Info

Publication number
CN106775827A
CN106775827ACN201611051646.8ACN201611051646ACN106775827ACN 106775827 ACN106775827 ACN 106775827ACN 201611051646 ACN201611051646 ACN 201611051646ACN 106775827 ACN106775827 ACN 106775827A
Authority
CN
China
Prior art keywords
application program
installation package
application
updated version
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611051646.8A
Other languages
Chinese (zh)
Other versions
CN106775827B (en
Inventor
帅朝春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611051646.8ApriorityCriticalpatent/CN106775827B/en
Publication of CN106775827ApublicationCriticalpatent/CN106775827A/en
Application grantedgrantedCritical
Publication of CN106775827BpublicationCriticalpatent/CN106775827B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供一种应用程序更新方法及装置、计算机设备。该应用程序更新方法包括:检测终端内的应用程序是否存在更新版本;若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。该应用程序更新方法可以预先下载更新版本安装包,同时将第一格式文件生成相应的第二格式文件,当用户需要更新应用程序时,直接使用更新版本安装包和第二格式文件对应用程序进行更新,提高了应用程序的更新速度,节省了用户大量时间,提高用户体验度。

The present invention provides an application updating method and device, and a computer device. The application updating method comprises: detecting whether an updated version of an application in a terminal exists; if the updated version exists in the application, obtaining an updated version installation package of the application; obtaining a first format file in the updated version installation package, and generating a corresponding second format file according to the first format file; and obtaining an update operation of the terminal user on the application, and updating the application according to the update operation, the updated version installation package, and the second format file. The application updating method can pre-download the updated version installation package, and generate a corresponding second format file from the first format file. When the user needs to update the application, the updated version installation package and the second format file are directly used to update the application, which improves the update speed of the application, saves a lot of user time, and improves the user experience.

Description

Translated fromChinese
一种应用程序更新方法及装置、计算机设备Application program update method and device, and computer equipment

技术领域technical field

本发明涉及通信技术领域,特别是涉及一种应用程序更新方法及装置、计算机设备。The invention relates to the field of communication technology, in particular to an application program updating method and device, and computer equipment.

背景技术Background technique

随着应用程序技术的快速发展,应用程序供应方对应用程序的升级更新越来越频繁。在应用程序更新方法中,移动终端会提示用户哪些应用程序可以进行更新。若用户选择需要进行更新的应用程序后,移动终端会根据新的安装包对应用程序进行更新操作。在安装新的安装包的过程中,移动终端需要将新的安装包中的特定格式文件转换成安卓系统可以执行的预设格式文件,该转换过程需要耗费大量时间,甚至占据整个更新时长的80%,严重影响整个应用程序更新速度。With the rapid development of application technology, the application provider upgrades and updates the application more and more frequently. In the application program update method, the mobile terminal will prompt the user which application programs can be updated. After the user selects the application program that needs to be updated, the mobile terminal will update the application program according to the new installation package. During the process of installing the new installation package, the mobile terminal needs to convert the specific format file in the new installation package into a preset format file that can be executed by the Android system. %, seriously affecting the entire application update speed.

发明内容Contents of the invention

本发明提供一种应用程序更新方法及装置、计算机设备;可以提高应用程序的更新效率。The invention provides an application program update method and device, and computer equipment; the update efficiency of the application program can be improved.

本发明提供一种应用程序更新方法,其包括:The present invention provides a method for updating an application program, which includes:

检测终端内的应用程序是否存在更新版本;Detect whether there is an updated version of the application program in the terminal;

若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;If the updated version of the application exists, obtaining an installation package of the updated version of the application;

获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及Obtaining the first format file in the installation package of the updated version, and generating a corresponding second format file according to the first format file; and

获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。An update operation of the application program by the terminal user is obtained, and the application program is updated according to the update operation, the installation package of the updated version, and the second format file.

本发明还提供一种应用程序更新装置,其包括:The present invention also provides an application program updating device, which includes:

检测模块,用于检测终端内的应用程序是否存在更新版本;A detection module, configured to detect whether there is an updated version of the application program in the terminal;

获取模块,用于若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;An obtaining module, configured to obtain an installation package of an updated version of the application if the updated version exists in the application;

生成模块,用于获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及A generating module, configured to obtain a first format file in the installation package of the updated version, and generate a corresponding second format file according to the first format file; and

更新模块,用于获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。The update module is configured to obtain an update operation of the terminal user on the application program, and update the application program according to the update operation, the update version installation package and the second format file.

本发明又提供一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明中任意一种应用程序更新方法。The present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, any one of the present invention can be realized. A method for updating applications.

本发明提供一种应用程序更新方法及装置、计算机设备。该应用程序更新方法通过检测终端内的应用程序是否存在更新版本;若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。该应用程序更新方法可以预先下载更新版本安装包,同时将第一格式文件生成相应的第二格式文件,当用户需要更新应用程序时,直接使用更新版本安装包和第二格式文件对应用程序进行更新,提高了应用程序的更新速度。The invention provides an application program update method and device, and computer equipment. The application program update method detects whether there is an updated version of the application program in the terminal; if the application program has the updated version, then obtains the updated version installation package of the application program; obtains the first one in the updated version installation package. format file, and generate a corresponding second format file according to the first format file; and obtain the update operation of the application program by the end user, and install the package according to the update operation, the updated version, and the second format file Update the application. The application program update method can download the update version installation package in advance, and generate the corresponding second format file from the first format file at the same time, when the user needs to update the application program, directly use the update version installation package and the second format file to update the application program Updates, improved app update speed.

附图说明Description of drawings

图1为本发明优选实施例的应用程序更新方法的流程图。Fig. 1 is a flowchart of an application program updating method in a preferred embodiment of the present invention.

图2为本发明优选实施例的应用程序更新装置的结构示意图。Fig. 2 is a schematic structural diagram of an application program updating device in a preferred embodiment of the present invention.

图3为图2中应用程序更新装置的检测模块的结构示意图。FIG. 3 is a schematic structural diagram of a detection module of the application program updating device in FIG. 2 .

图4为图2中应用程序更新装置的获取模块的结构示意图。FIG. 4 is a schematic structural diagram of an acquisition module of the application program updating device in FIG. 2 .

图5为本发明优选实施例的移动终端的结构示意图。Fig. 5 is a schematic structural diagram of a mobile terminal according to a preferred embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

本发明中的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。例如,在不脱离本发明的范围的情况下,可以将第一控件称为第二控件,且类似地,可将第二控件称为第一控件。第一控件与第二控件两者都是控件,但其不是同一控件。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。The terms 'first', 'second', etc. in the present invention may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first control could be termed a second control, and, similarly, a second control could be termed a first control, without departing from the scope of the present invention. Both the first control and the second control are controls, but they are not the same control. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion.

请参照图1,图1为本发明优选实施例的应用程序更新方法的流程图。该应用程序更新方法可以应用于手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 1 . FIG. 1 is a flowchart of an application program updating method in a preferred embodiment of the present invention. The method for updating an application program can be applied to electronic devices such as handheld or laptop devices, mobile phones, personal digital assistants (PDAs), and is not specifically limited here.

本优选实施例提供的应用程序更新方法包括:The application updating method provided in this preferred embodiment includes:

步骤S101:检测终端内的应用程序是否存在更新版本;Step S101: Detect whether there is an updated version of the application program in the terminal;

当终端内安装应用程序后,终端会定期检测应用程序是否存在更新版本。在一优选实施例中,检测终端内的应用程序是否存在更新版本的步骤包括:间隔预设时间向应用程序服务器发送应用程序的版本号;获取应用程序服务器反馈的配置文件;根据配置文件判断应用程序是否存在更新版本。After the application program is installed in the terminal, the terminal will periodically detect whether there is an updated version of the application program. In a preferred embodiment, the step of detecting whether there is an updated version of the application program in the terminal includes: sending the version number of the application program to the application program server at an interval of preset time; obtaining the configuration file fed back by the application program server; judging the application program according to the configuration file Whether a newer version of the program exists.

具体地,终端间隔预设时间将应用程序的版本号发送至应用程序服务器。应用程序服务器接收到该应用程序的版本号后,将根据该版本号判断该应用程序是否存在更新版本。若应用程序服务器判断出该应用程序存在更新版本,则应用程序服务器将生成一个携带有下载链接的配置文件,并发送该配置文件至终端。终端接收到配置文件后,通过判断该配置文件中是否存在下载链接来判断该应用程序是否存在更新版本,即:若配置文件中存在下载链接,则终端将判断出该应用程序存在更新版本;若配置文件中不存在下载链接,则终端将判断出该应用程序不存在更新版本。Specifically, the terminal sends the version number of the application program to the application program server at preset intervals. After the application program server receives the version number of the application program, it will judge whether there is an updated version of the application program according to the version number. If the application program server determines that there is an updated version of the application program, the application program server will generate a configuration file carrying a download link, and send the configuration file to the terminal. After receiving the configuration file, the terminal judges whether there is an updated version of the application by judging whether there is a download link in the configuration file, that is, if there is a download link in the configuration file, the terminal will determine that there is an updated version of the application; if If there is no download link in the configuration file, the terminal will determine that there is no updated version of the application.

需要说明的是,终端根据配置文件判断应用程序是否存在更新版本的具体方式也可以为其他方式,例如,配置文件中还包括更新指令或未更新指令,当终端判断出配置文件中存在更新指令后,将判定该应用程序存在更新版本;当终端判断出配置文件中存在未更新指令后,将判定该应用程序不存在更新版本,在此不做具体限制。It should be noted that the specific method for the terminal to determine whether there is an updated version of the application program according to the configuration file can also be other methods. For example, the configuration file also includes an update instruction or a non-updated instruction. , it will determine that there is an updated version of the application; when the terminal determines that there is an unupdated instruction in the configuration file, it will determine that there is no updated version of the application, and no specific restrictions are made here.

另外,上述终端检测应用程序是否存在更新版本的方式为主动方式。当然,在其他优选实施例中,终端也可以才用被动的方式检测应用程序是否存在更新版本。例如,当应用程序存在更新版本时,应用程序服务器主动向终端发送应用程序存在更新版本的提示信息,当终端接收到该提示信息时,则判定该应用程序存在更新版本,在此不做具体限定。In addition, the above-mentioned way for the terminal to detect whether an updated version of the application program exists is an active way. Of course, in other preferred embodiments, the terminal can also detect whether there is an updated version of the application program in a passive manner. For example, when the application program has an updated version, the application program server actively sends a reminder message that the application program has an updated version to the terminal, and when the terminal receives the prompt message, it determines that the application program has an updated version, which is not specifically limited here. .

步骤S102:若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;Step S102: If the updated version of the application exists, obtain an installation package of the updated version of the application;

当终端判断出应用程序存在更新版本时,将获取应用程序的更新版本安装包,并保存该更新版本安装包于终端内。When the terminal determines that there is an updated version of the application program, it will obtain the updated version installation package of the application program, and save the updated version installation package in the terminal.

在一优选实施例中,当配置文件中的下载链接为应用程序的更新版本安装包的下载链接时,即为应用程序的整包的下载链接,终端通过该配置文件中的下载链接即可以获取到更新版本安装包,并将该更新版本安装包存储在终端内。In a preferred embodiment, when the download link in the configuration file is the download link of the updated version installation package of the application program, it is the download link of the entire package of the application program, and the terminal can obtain the download link through the download link in the configuration file. to the updated version installation package, and store the updated version installation package in the terminal.

在另一优选实施例中,当配置文件中的下载链接为应用程序的差分包的下载链接时,终端获取该应用程序的更新版本安装包的步骤包括:通过配置文件携带的下载链接获取应用程序的差分包;获取应用程序的旧版本安装包;根据差分包和旧版本安装包生成更新版本安装包。In another preferred embodiment, when the download link in the configuration file is the download link of the differential package of the application program, the step for the terminal to obtain the updated version installation package of the application program includes: obtaining the application program through the download link carried in the configuration file differential package; obtain the old version installation package of the application; generate a newer version installation package according to the difference package and the old version installation package.

具体地,终端通过配置文件携带的下载链接获取该应用程序的差分包,其中,该差分包为更新版本安装包与终端内应用程序当前版本安装包通过差分获得。当终端下载完该差分包后,将从终端内获取应用程序的旧版本安装包。终端通过将差分包和旧版本安装包进行整合形成更新版本安装包。Specifically, the terminal obtains the differential package of the application program through the download link carried in the configuration file, wherein the differential package is obtained by difference between the installation package of the updated version and the installation package of the current version of the application program in the terminal. After the terminal finishes downloading the differential package, it will obtain the installation package of the old version of the application program from the terminal. The terminal forms an updated version installation package by integrating the differential package and the old version installation package.

这样,当用户需要更新该应用程序时,可以直接使用该新版本安装包对应用程序进行更新,节省用户下载新版本安装包的时间,同时缩短应用程序更新所耗时间,提高应用程序更新速度。In this way, when the user needs to update the application program, he can directly use the new version installation package to update the application program, which saves the time for the user to download the new version installation package, shortens the time spent on application program update, and improves the application program update speed.

步骤S103:获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;Step S103: Obtain the first format file in the installation package of the updated version, and generate a corresponding second format file according to the first format file;

在本优选实施例中,第一格式文件为Dex格式文件,第二格式文件为Oat格式文件。其中,Dex格式文件为更新版本安装包中的classes.dex文件;Oat格式文件是包含了Dex格式文件内容以及从Dex格式文件编译而来的本地机器指令。当然,在其他优选实施例中,第一格式文件和第二格式文件还可以为其他文件,在此不做具体限制。In this preferred embodiment, the first format file is a Dex format file, and the second format file is an Oat format file. Among them, the Dex format file is the classes.dex file in the installation package of the updated version; the Oat format file contains the content of the Dex format file and the local machine instructions compiled from the Dex format file. Of course, in other preferred embodiments, the first format file and the second format file may also be other files, which are not specifically limited here.

在获取到新版本安装包后,将获取该更新版本安装包中的Dex格式文件,通过调用dex2oat命令来将Dex格式文件生成相对应的Oat格式文件,并将Oat格式文件保存于终端中。这样,当用户需要更新该应用程序时,终端可以直接使用预先生成好的Oat格式文件,减少了Dex格式文件生成Oat格式文件所耗时间,进一步提高应用程序的更新速度。After the new version installation package is obtained, the Dex format file in the updated version installation package will be obtained, and the Dex format file will be generated into a corresponding Oat format file by calling the dex2oat command, and the Oat format file will be saved in the terminal. In this way, when the user needs to update the application program, the terminal can directly use the pre-generated Oat format file, which reduces the time spent in generating the Oat format file from the Dex format file, and further improves the update speed of the application program.

步骤S104:获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。Step S104: Obtain an update operation of the terminal user on the application program, and update the application program according to the update operation, the update version installation package and the second format file.

当终端保存好第二格式文件,即Oat格式文件后,将向用户发出提示信息,提示用户当前应用程序存在更新版本,并询问用户是否需要更新该应用程序。若用户选择更新该应用程序,则终端将获取到用户选择更新该应用程序的更新操作,并根据该更新操作获取更新版本安装包的本地保存路径和Oat格式文件的本地保存路径。终端系统将根据上述两个本地保存路径加载相应的更新版本安装包和Oat格式文件,并根据该更新版本安装包和Oat格式文件对应用程序进行更新。After the terminal saves the second format file, that is, the Oat format file, it will send a prompt message to the user, reminding the user that there is an updated version of the current application program, and ask the user whether the application program needs to be updated. If the user chooses to update the application, the terminal will obtain the update operation that the user chooses to update the application, and obtain the local storage path of the updated version installation package and the local storage path of the Oat format file according to the update operation. The terminal system will load the corresponding updated version installation package and Oat format file according to the above two local storage paths, and update the application program according to the updated version installation package and Oat format file.

在一优选实施例中,根据更新操作、更新版本安装包和第二格式文件对应用程序进行更新具体包括:根据更新操作卸载旧版本的应用程序;根据更新版本安装包执行安装新版本的应用程序的操作;判断终端内是否存在第二格式文件;若终端内存在第二格式文件,则复制第二格式文件至新版本的应用程序的安装目录下,完成对旧版本的应用程序的更新操作。In a preferred embodiment, updating the application program according to the update operation, the update version installation package and the second format file specifically includes: uninstalling the old version of the application program according to the update operation; executing the installation of the new version of the application program according to the update version installation package operation; determine whether there is a second format file in the terminal; if there is a second format file in the terminal, copy the second format file to the installation directory of the new version of the application, and complete the update operation of the old version of the application.

具体地,当终端检测到用户选择更新应用程序的更新操作后,将根据该更新操作卸载旧版本的应用程序,并获取更新版本安装包的本地保存路径和Oat格式文件的本地保存路径。终端系统将根据更新版本安装包的本地保存路径获取到更新版本安装包,并执行安装更新版本的应用程序的操作。在安装更新版本的应用程序的过程中,当终端系统需要使用到Oat格式文件时,终端将判断终端内是否存在Oat格式文件。具体地,判断该Oat格式文件的本地保存路径内是否存在可用的Oat格式文件,若存在Oat格式文件,则判定该终端内存在Oat格式文件。终端将复制该Oat格式文件至新版本的应用程序的安装目录下,从而完成对旧版本的应用程序的更新操作。Specifically, when the terminal detects that the user chooses to update the application program, it will uninstall the old version of the application program according to the update operation, and obtain the local storage path of the updated version installation package and the local storage path of the Oat format file. The terminal system will obtain the updated version installation package according to the local storage path of the updated version installation package, and perform the operation of installing the updated version of the application program. In the process of installing the application program of the updated version, when the terminal system needs to use the Oat format file, the terminal will judge whether there is an Oat format file in the terminal. Specifically, it is judged whether there is an available Oat format file in the local storage path of the Oat format file, and if there is an Oat format file, it is determined that there is an Oat format file in the terminal. The terminal will copy the Oat format file to the installation directory of the new version of the application, so as to complete the update operation of the old version of the application.

本优选实施例中的应用程序更新方法,其通过检测终端内的应用程序是否存在更新版本;若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。该应用程序更新方法可以预先下载更新版本安装包,同时将第一格式文件生成相应的第二格式文件,当用户需要更新应用程序时,直接使用更新版本安装包和第二格式文件对应用程序进行更新,大大提高了应用程序的更新速度,节省了用户大量时间,提高用户体验度。The application program update method in this preferred embodiment, it detects whether there is an updated version of the application program in the terminal; if the application program has the updated version, then obtain the updated version installation package of the application program; obtain the described update the first format file in the version installation package, and generate a corresponding second format file according to the first format file; and obtain the update operation of the terminal user on the application program, and update the version installation package according to the update operation The application program is updated with the second format file. The application program update method can download the update version installation package in advance, and generate the corresponding second format file from the first format file at the same time, when the user needs to update the application program, directly use the update version installation package and the second format file to update the application program The update greatly improves the update speed of the application, saves a lot of time for the user, and improves the user experience.

请参照图2,图2为本发明优选实施例的应用程序更新装置的结构示意图。该应用程序更新装置200可以应用于手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 2 , which is a schematic structural diagram of an application program updating device in a preferred embodiment of the present invention. The application program updating apparatus 200 can be applied to electronic devices such as handheld or laptop devices, mobile phones, personal digital assistants (PDAs), and is not specifically limited here.

本优选实施例中的应用程序更新装置200包括:检测模块201、获取模块202、生成模块203和更新模块204。其中,检测模块201用于检测终端内的应用程序是否存在更新版本;获取模块202用于若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;生成模块203用于获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;更新模块204用于获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。The application update apparatus 200 in this preferred embodiment includes: a detection module 201 , an acquisition module 202 , a generation module 203 and an update module 204 . Wherein, the detection module 201 is used to detect whether there is an updated version of the application program in the terminal; the acquisition module 202 is used to obtain the updated version installation package of the application program if the application program has the updated version; the generation module 203 uses Obtain the first format file in the installation package of the updated version, and generate a corresponding second format file according to the first format file; the update module 204 is used to obtain the update operation of the terminal user on the application program, and generate the corresponding second format file according to the The update operation, the update version installation package and the second format file are used to update the application program.

当终端内安装应用程序后,应用程序更新装置200内的检测模块201会定期检测应用程序是否存在更新版本。After the application program is installed in the terminal, the detection module 201 in the application program updating device 200 will periodically detect whether there is an updated version of the application program.

在一优选实施例中,请参照图3,图3为图2中应用程序更新装置的检测模块的结构示意图。检测模块201包括发送子模块2011、第一获取子模块2012和判断子模块2013,其中发送子模块2011用于间隔预设时间向应用程序服务器发送应用程序的版本号;第一获取子模块2012用于获取应用程序服务器反馈的配置文件;判断子模块2013用于根据配置文件判断应用程序是否存在更新版本。In a preferred embodiment, please refer to FIG. 3 , which is a schematic structural diagram of a detection module of the application updating device in FIG. 2 . The detection module 201 includes a sending submodule 2011, a first obtaining submodule 2012 and a judging submodule 2013, wherein the sending submodule 2011 is used to send the version number of the application program to the application program server at an interval of a preset time; the first obtaining submodule 2012 uses To obtain the configuration file fed back by the application program server; the judging sub-module 2013 is used to judge whether there is an updated version of the application program according to the configuration file.

具体地,发送子模块2011间隔预设时间将应用程序的版本号发送至应用程序服务器。应用程序服务器接收到该应用程序的版本号后,将根据该当前版本号判断该应用程序是否存在更新版本。若应用程序服务器判断出该应用程序存在更新版本,则应用程序服务器将生成一个携带有下载链接的配置文件,并发送该配置文件至终端的应用程序更新装置200。应用程序更新装置200内的第一获取子模块2012接收到配置文件后,将该配置文件传递给判断子模块2013,由判断子模块2013通过判断该配置文件中是否存在下载链接来判断该应用程序是否存在更新版本,即:若配置文件中存在下载链接,则判断子模块2013将判断出该应用程序存在更新版本;若配置文件中不存在下载链接,则判断子模块2013将判断出该应用程序不存在更新版本。Specifically, the sending submodule 2011 sends the version number of the application program to the application program server at preset time intervals. After the application program server receives the version number of the application program, it will judge whether there is an updated version of the application program according to the current version number. If the application server determines that there is an updated version of the application, the application server will generate a configuration file carrying a download link, and send the configuration file to the application update device 200 of the terminal. After receiving the configuration file, the first obtaining submodule 2012 in the application updating device 200 passes the configuration file to the judging submodule 2013, and the judging submodule 2013 judges the application by judging whether there is a download link in the configuration file. Whether there is an updated version, that is: if there is a download link in the configuration file, then the judging submodule 2013 will judge that the application program has an updated version; if there is no download link in the configuration file, then the judging submodule 2013 will judge that the application program No newer version exists.

需要说明的是,判断子模块2013根据配置文件判断应用程序是否存在更新版本的具体方式也可以为其他方式,例如,配置文件中还包括更新指令或未更新指令,当判断子模块2013判断出该配置文件中存在更新指令后,将判定该应用程序存在更新版本;当判断子模块2013判断出该配置文件中存在未更新指令后,将判定该应用程序不存在更新版本,在此不做具体限制。It should be noted that the judging sub-module 2013 can also use other methods to judge whether there is an updated version of the application according to the configuration file. For example, the configuration file also includes an update instruction or a non-updated instruction. After there is an update instruction in the configuration file, it will be determined that the application program has an updated version; when the judging submodule 2013 determines that there is an unupdated instruction in the configuration file, it will be determined that the application program does not have an updated version, and no specific restrictions are made here. .

当检测模块201判断出应用程序存在更新版本时,检测模块201将给获取模块202发送第一信号,使得获取模块202根据第一信号获取应用程序的更新版本安装包,并保存该更新版本安装包于终端内。When the detection module 201 determines that there is an updated version of the application program, the detection module 201 will send a first signal to the acquisition module 202, so that the acquisition module 202 acquires the updated version installation package of the application program according to the first signal, and saves the updated version installation package in the terminal.

在一优选实施例中,当配置文件中的下载链接为应用程序的更新版本安装包的下载链接时,即该更新版本安装包为整包,获取模块202通过该配置文件中的下载链接即可以获取到更新版本安装包,并将该更新版本安装包存储在终端内。In a preferred embodiment, when the download link in the configuration file is the download link of the updated version installation package of the application program, that is, the updated version installation package is a complete package, the acquisition module 202 can use the download link in the configuration file. The updated version installation package is obtained, and the updated version installation package is stored in the terminal.

在另一优选实施例中,请参见图4,图4为图2中应用程序更新装置的获取模块的结构示意图。当配置文件中的下载链接为应用程序的差分包的下载链接时,获取模块202包括第二获取子模块2021、第三获取子模块2022和生成子模块2023,其中,第二获取子模块2021用于通过配置文件携带的下载链接获取应用程序的差分包;第三获取子模块2022用于获取应用程序的旧版本安装包;生成子模块2023用于根据差分包和旧版本安装包生成更新版本安装包。In another preferred embodiment, please refer to FIG. 4 , which is a schematic structural diagram of an acquisition module of the application updating device in FIG. 2 . When the download link in the configuration file is the download link of the differential package of the application program, the acquisition module 202 includes a second acquisition submodule 2021, a third acquisition submodule 2022 and a generation submodule 2023, wherein the second acquisition submodule 2021 uses It is used to obtain the differential package of the application program through the download link carried by the configuration file; the third acquisition sub-module 2022 is used to obtain the old version installation package of the application program; the generation sub-module 2023 is used to generate an updated version installation package according to the differential package and the old version installation package Bag.

具体地,第二获取子模块2021通过配置文件携带的下载链接获取该应用程序的差分包,其中,该差分包为更新版本安装包与终端内应用程序当前版本安装包通过差分获得。当第二获取子模块2021下载完该差分包后,将该差分包传递至生成子模块2023,并发送第二信号至第三获取子模块2022,使得第三获取子模块2022将从终端内获取应用程序的旧版本安装包,即获取该应用程序的当前版本安装包。第三获取子模块2022将旧版本安装包传递至生成子模块2023。生成子模块2023通过将差分包和旧版本安装包进行整合形成更新版本安装包。Specifically, the second obtaining submodule 2021 obtains the differential package of the application through the download link carried in the configuration file, wherein the differential package is obtained by difference between the installation package of the updated version and the installation package of the current version of the application in the terminal. After the second obtaining sub-module 2021 has downloaded the differential packet, it transmits the differential packet to the generating sub-module 2023, and sends a second signal to the third obtaining sub-module 2022, so that the third obtaining sub-module 2022 will obtain from the terminal The installation package of the old version of the application is to obtain the installation package of the current version of the application. The third acquiring submodule 2022 transfers the old version installation package to the generating submodule 2023 . The generation sub-module 2023 forms an updated version installation package by integrating the difference package and the old version installation package.

这样,当用户需要更新该应用程序时,可以直接使用该新版本安装包对应用程序进行更新,节省用户下载新版本安装包的时间,同时缩短应用程序更新所耗时间,提高应用程序更新速度。In this way, when the user needs to update the application program, he can directly use the new version installation package to update the application program, which saves the time for the user to download the new version installation package, shortens the time spent on application program update, and improves the application program update speed.

在获取模块202获取到新版本安装包后,将该新版本安装包传递至生成模块203。生成模块203将获取该更新版本安装包中的第一格式文件,并根据第一格式文件生成相应的第二格式文件。After the acquiring module 202 acquires the new version installation package, the new version installation package is delivered to the generation module 203 . The generation module 203 will obtain the first format file in the installation package of the updated version, and generate the corresponding second format file according to the first format file.

在本优选实施例中,第一格式文件为Dex格式文件,第二格式文件为Oat格式文件。其中,Dex格式文件为更新版本安装包中的classes.dex文件;Oat格式文件是包含了Dex格式文件内容以及从Dex格式文件编译而来的本地机器指令。当然,在其他优选实施例中,第一格式文件和第二格式文件还可以为其他文件,在此不做具体限制。In this preferred embodiment, the first format file is a Dex format file, and the second format file is an Oat format file. Among them, the Dex format file is the classes.dex file in the installation package of the updated version; the Oat format file contains the content of the Dex format file and the local machine instructions compiled from the Dex format file. Of course, in other preferred embodiments, the first format file and the second format file may also be other files, which are not specifically limited here.

具体地,生成模块203将获取该更新版本安装包中的Dex格式文件,并通过调用dex2oat命令来将Dex格式文件生成相对应的Oat格式文件,并将Oat格式文件保存于终端中。这样,当用户需要更新该应用程序时,终端可以直接使用预先生成好的Oat格式文件,减少了Dex格式文件生成Oat格式文件所耗时间,进一步提高应用程序的更新速度。Specifically, the generation module 203 will obtain the Dex format file in the updated version installation package, and generate a corresponding Oat format file from the Dex format file by calling the dex2oat command, and save the Oat format file in the terminal. In this way, when the user needs to update the application program, the terminal can directly use the pre-generated Oat format file, which reduces the time spent in generating the Oat format file from the Dex format file, and further improves the update speed of the application program.

当生成模块203生成第二格式文件,即Oat格式文件后,生成模块203将向提示模块(未在图2中示出)发送第三信号,使得提示模块根据第三信号发出提示信息,提示用户当前应用程序存在更新版本,并询问用户是否需要更新该应用程序。若用户选择更新该应用程序,则更新模块204将获取到用户选择更新该应用程序的更新操作,并根据该更新操作获取更新版本安装包的本地保存路径和Oat格式文件的本地保存路径。更新模块204将根据上述两个本地保存路径加载相应的更新版本安装包和Oat格式文件,并根据该更新版本安装包和Oat格式文件对应用程序进行更新。After the generation module 203 generates the second format file, i.e. the Oat format file, the generation module 203 will send a third signal to the prompt module (not shown in Figure 2), so that the prompt module sends prompt information according to the third signal, prompting the user A newer version of the current application exists and the user is asked if the application needs to be updated. If the user chooses to update the application, the update module 204 will obtain the update operation that the user chooses to update the application, and obtain the local storage path of the updated version installation package and the local storage path of the Oat format file according to the update operation. The update module 204 will load the corresponding update version installation package and Oat format file according to the above two local storage paths, and update the application program according to the update version installation package and Oat format file.

在一优选实施例中,更新模块204具体用于:根据更新操作卸载旧版本的应用程序;根据更新版本安装包执行安装新版本的应用程序的操作;判断终端内是否存在第二格式文件;若终端内存在第二格式文件,则复制第二格式文件至新版本的应用程序的安装目录下,完成对旧版本的应用程序的更新操作。In a preferred embodiment, the update module 204 is specifically configured to: uninstall the old version of the application program according to the update operation; execute the operation of installing the new version of the application program according to the update version installation package; determine whether there is a second format file in the terminal; if If there is a file in the second format in the terminal, copy the file in the second format to the installation directory of the new version of the application program to complete the update operation of the old version of the application program.

具体地,当更新模块204获取到用户选择更新应用程序的更新操作后,将根据该更新操作卸载旧版本的应用程序,并获取更新版本安装包的本地保存路径和Oat格式文件的本地保存路径。更新模块204将根据更新版本安装包的本地保存路径获取到更新版本安装包,并执行安装更新版本的应用程序的操作。在安装更新版本的应用程序的过程中,当更新模块204需要使用到Oat格式文件时,更新模块204将判断终端内是否存在Oat格式文件。具体地,判断该Oat格式文件的本地保存路径内是否存在可用的Oat格式文件,若存在Oat格式文件,则判定该终端内存在Oat格式文件。更新模块204将复制该Oat格式文件至新版本的应用程序的安装目录下,从而完成对旧版本的应用程序的更新操作。Specifically, when the update module 204 obtains the update operation of the user selecting to update the application program, it will uninstall the old version of the application program according to the update operation, and obtain the local storage path of the updated version installation package and the local storage path of the Oat format file. The update module 204 will obtain the updated version installation package according to the local storage path of the updated version installation package, and execute the operation of installing the updated version of the application program. During the process of installing the updated version of the application program, when the update module 204 needs to use the Oat format file, the update module 204 will judge whether there is an Oat format file in the terminal. Specifically, it is judged whether there is an available Oat format file in the local storage path of the Oat format file, and if there is an Oat format file, it is determined that there is an Oat format file in the terminal. The update module 204 will copy the Oat format file to the installation directory of the new version of the application, so as to complete the update operation of the old version of the application.

本优选实施例中的应用程序更新装置200,其通过检测模块201检测终端内的应用程序是否存在更新版本;若所述应用程序存在所述更新版本,则获取模块202将获取所述应用程序的更新版本安装包;生成模块203获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;更新模块204获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。该应用程序更新装置200可以预先下载更新版本安装包,同时将第一格式文件生成相应的第二格式文件,当用户需要更新应用程序时,直接使用更新版本安装包和第二格式文件对应用程序进行更新,大大提高了应用程序的更新速度,节省了用户大量时间,提高用户体验度。The application program update device 200 in this preferred embodiment detects whether there is an updated version of the application program in the terminal through the detection module 201; if the application program has the updated version, the acquisition module 202 will acquire the application program Update version installation package; generating module 203 acquires the first format file in the update version installation package, and generates a corresponding second format file according to the first format file; update module 204 acquires an update of the application program by the terminal user operation, and update the application program according to the update operation, the update version installation package and the second format file. The application program update device 200 can download the updated version installation package in advance, and generate the corresponding second format file from the first format file at the same time, when the user needs to update the application program, directly use the updated version installation package and the second format file to update the application program The update greatly improves the update speed of the application, saves a lot of time for the user, and improves the user experience.

本发明还提供一种计算机设备,该计算机设备可以为但不限于移动终端。下面以移动终端为例对该计算机设备进行详细地说明。请参阅图5,图5为本发明实施例提供的移动终端结构示意图。本发明优选实施例提供的移动终端300可以为平板电脑、手机等电子设备,在此不做具体限制。The present invention also provides a computer device, which may be but not limited to a mobile terminal. The computer device will be described in detail below by taking a mobile terminal as an example. Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention. The mobile terminal 300 provided in the preferred embodiment of the present invention may be an electronic device such as a tablet computer or a mobile phone, and no specific limitation is set here.

该移动终端300可以包括射频(RF,Radio Frequency)电路301、包括有一个或一个以上计算机可读存储介质的存储器302、输入模块303、显示模块304、传感器305、音频电路306、无线保真(WiFi,Wireless Fidelity)模块307、包括有一个或者一个以上处理核心的处理器308、以及电源309等部件。本领域技术人员可以理解,图5中示出的移动终端结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The mobile terminal 300 may include a radio frequency (RF, Radio Frequency) circuit 301, a memory 302 including one or more computer-readable storage media, an input module 303, a display module 304, a sensor 305, an audio circuit 306, a wireless fidelity ( WiFi (Wireless Fidelity) module 307, including a processor 308 with one or more processing cores, and a power supply 309 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 5 does not constitute a limitation on the mobile terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.

射频电路301可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器308处理;另外,将涉及上行的数据发送给基站。通常,射频电路301包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路301还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System ofMobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 301 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information of the base station, it is processed by one or more processors 308; in addition, the data related to the uplink is sent to the base station . Generally, the radio frequency circuit 301 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the radio frequency circuit 301 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Message Service (SMS, Short Messaging Service), etc.

存储器302可用于存储应用程序和数据。存储器302存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器308通过运行存储在存储器302的应用程序,从而执行各种功能应用以及数据处理。存储器302可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据移动终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器302可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器302还可以包括存储器控制器,以提供处理器308和输入模块303对存储器302的访问。Memory 302 may be used to store applications and data. The application programs stored in the memory 302 include executable codes. Applications can be composed of various functional modules. The processor 308 executes various functional applications and data processing by running the application programs stored in the memory 302 . The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of mobile terminals (such as audio data, phonebook, etc.) and the like. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 302 may further include a memory controller to provide the processor 308 and the input module 303 with access to the memory 302 .

输入模块303可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入模块303可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器308,并能接收处理器308发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入模块303还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、指纹识别模组、轨迹球、鼠标、操作杆等中的一种或多种。The input module 303 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input module 303 may include a touch-sensitive surface as well as other input devices. A touch-sensitive surface, also known as a touch display or trackpad, collects user touch operations on or near it (for example, the user uses a finger, stylus, etc. any suitable object or accessory on the touch-sensitive surface or on the touch-sensitive Operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 308, and can receive and execute commands sent by the processor 308. In addition, touch-sensitive surfaces can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surfaces, input module 303 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), fingerprint recognition modules, trackballs, mice, and joysticks.

显示模块304可用于显示由用户输入的信息或提供给用户的信息以及移动终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示模块304可包括显示面板。可选的,可以采用液晶显示器(LCD,Liquid CrystalDisplay)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器308以确定触摸事件的类型,随后处理器308根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图5中,触敏表面与显示面板是作为两个独立的部件来实现输入和输出功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display module 304 can be used to display information input by the user or provided to the user and various graphical user interfaces of the mobile terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display module 304 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is sent to the processor 308 to determine the type of the touch event, and then the processor 308 displays on the display according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 5 , the touch-sensitive surface and the display panel are used as two independent components to realize the input and output functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize the input and output functions.

移动终端还可包括至少一种传感器305,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在移动终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于移动终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The mobile terminal may also include at least one sensor 305, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or backlight. As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. Let me repeat.

音频电路306可通过扬声器、传声器提供用户与移动终端之间的音频接口。音频电路306可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路306接收后转换为音频数据,再将音频数据输出处理器308处理后,经射频电路301以发送给比如另一移动终端,或者将音频数据输出至存储器302以便进一步处理。音频电路306还可能包括耳塞插孔,以提供外设耳机与移动终端的通信。The audio circuit 306 can provide an audio interface between the user and the mobile terminal through a speaker or a microphone. The audio circuit 306 can convert the received audio data into an electrical signal, transmit it to the speaker, and convert it into a sound signal output by the speaker; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted into The audio data, after being processed by the audio data output processor 308, is sent to another mobile terminal through the radio frequency circuit 301, or the audio data is output to the memory 302 for further processing. The audio circuit 306 may also include an earphone jack to provide communication between an external earphone and the mobile terminal.

无线保真(WiFi)属于短距离无线传输技术,移动终端通过无线保真模块307可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了无线保真模块307,但是可以理解的是,其并不属于移动终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) belongs to short-distance wireless transmission technology. The mobile terminal can help users send and receive e-mails, browse web pages, and access streaming media through the wireless fidelity module 307. It provides users with wireless broadband Internet access. Although Fig. 5 shows the Wi-Fi module 307, it can be understood that it is not an essential component of the mobile terminal, and can be completely omitted as required without changing the essence of the invention.

处理器308是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器302内的应用程序,以及调用存储在存储器302内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。可选的,处理器308可包括一个或多个处理核心;一些实施例中,处理器308可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器308中。The processor 308 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. By running or executing the application program stored in the memory 302 and calling the data stored in the memory 302, the mobile terminal executes Various functions and processing data, so as to monitor the mobile terminal as a whole. Optionally, the processor 308 may include one or more processing cores; in some embodiments, the processor 308 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 308 .

移动终端还包括给各个部件供电的电源309(比如电池)。一些实施例中,电源可以通过电源管理系统与处理器308逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源309还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The mobile terminal also includes a power source 309 (such as a battery) for powering various components. In some embodiments, the power supply can be logically connected to the processor 308 through the power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system. The power supply 309 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

尽管图5中未示出,移动终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 5 , the mobile terminal may also include a camera, a Bluetooth module, etc., which will not be repeated here.

具体在本实施例中,移动终端中的处理器308会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器302中,并由处理器308来运行存储在存储器302中的应用程序,从而实现各种功能:检测终端内的应用程序是否存在更新版本;若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。Specifically, in this embodiment, the processor 308 in the mobile terminal will load the executable code corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 308 will run the executable code stored in the The application program in the memory 302, so as to realize various functions: detect whether there is an updated version of the application program in the terminal; if the application program has the updated version, then obtain the updated version installation package of the application program; obtain the update the first format file in the version installation package, and generate a corresponding second format file according to the first format file; and obtain the update operation of the terminal user on the application program, and update the version installation package according to the update operation The application program is updated with the second format file.

在一优选实施例中,处理器308在执行检测终端内的应用程序是否存在更新版本时,具体执行如下步骤:间隔预设时间向应用程序服务器发送所述应用程序的版本号;获取所述应用程序服务器反馈的配置文件;根据所述配置文件判断所述应用程序是否存在更新版本。In a preferred embodiment, when the processor 308 detects whether there is an updated version of the application program in the terminal, it specifically performs the following steps: sending the version number of the application program to the application program server at preset intervals; acquiring the application program version number; The configuration file fed back by the program server; judging whether there is an updated version of the application program according to the configuration file.

在一优选实施例中,处理器308在执行获取所述应用程序的更新版本安装包时,具体执行如下步骤:通过所述配置文件携带的下载链接获取所述应用程序的更新版本安装包。In a preferred embodiment, when the processor 308 acquires the installation package of the updated version of the application, it specifically performs the following steps: acquire the installation package of the updated version of the application through the download link carried in the configuration file.

在另一优选实施例中,处理器308在执行获取所述应用程序的更新版本安装包时,具体执行如下步骤:通过所述配置文件携带的下载链接获取所述应用程序的差分包;获取所述应用程序的旧版本安装包;根据所述差分包和所述旧版本安装包生成所述更新版本安装包。In another preferred embodiment, when the processor 308 obtains the installation package of the updated version of the application, it specifically performs the following steps: obtain the differential package of the application through the download link carried in the configuration file; obtain the An old version installation package of the application program; generating the updated version installation package according to the difference package and the old version installation package.

在一优选实施例中,处理器308在执行根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新时,具体执行如下步骤:根据所述更新操作卸载旧版本的所述应用程序;根据所述更新版本安装包执行安装新版本的所述应用程序的操作;判断所述终端内是否存在所述第二格式文件;若所述终端内存在所述第二格式文件,则复制所述第二格式文件至新版本的所述应用程序的安装目录下,完成对旧版本的所述应用程序的更新操作。In a preferred embodiment, when the processor 308 updates the application program according to the update operation, the update version installation package and the second format file, it specifically performs the following steps: uninstall the old application program according to the update operation. version of the application program; perform the operation of installing a new version of the application program according to the updated version installation package; determine whether the second format file exists in the terminal; if the second format file exists in the terminal format file, then copy the second format file to the installation directory of the new version of the application program to complete the update operation of the old version of the application program.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对应用程序更新方法的详细描述,此处不再赘述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases. For the part not described in detail in a certain embodiment, please refer to the detailed description of the application program updating method above, which will not be repeated here.

本发明实施例提供的应用程序更新装置,譬如为计算机、平板电脑、具有触摸功能的手机等等,所述应用程序更新装置与上文实施例中的应用程序更新方法属于同一构思,在所述应用程序更新装置上可以运行所述应用程序更新方法实施例中提供的任一方法,其具体实现过程详见所述应用程序更新方法实施例,此处不再赘述。The application program update device provided by the embodiment of the present invention is, for example, a computer, a tablet computer, a mobile phone with a touch function, etc. Any method provided in the application program updating method embodiment can be run on the application program updating device, and its specific implementation process can be found in the application program updating method embodiment, and will not be repeated here.

需要说明的是,对本发明所述应用程序更新方法而言,本领域普通测试人员可以理解实现本发明实施例所述应用程序更新方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如所述应用程序更新方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that, for the application program updating method described in the present invention, ordinary testers in the field can understand that all or part of the procedures for implementing the application program updating method described in the embodiment of the present invention can be controlled by computer programs. To complete, the computer program can be stored in a computer-readable storage medium, such as stored in the memory of the terminal, and executed by at least one processor in the terminal, and the execution process can include such as the application program Flow of an embodiment of an update method. Wherein, the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory) and the like.

本发明实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或系统,可以执行相应方法实施例中的方法。Each functional module in the embodiment of the present invention may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Each of the above devices or systems may execute the methods in the corresponding method embodiments.

综上所述,虽然本发明已以优选实施例揭露如上,但上述优选实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。In summary, although the present invention has been disclosed above with preferred embodiments, the above preferred embodiments are not intended to limit the present invention, and those of ordinary skill in the art can make various modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope defined in the claims.

Claims (10)

Translated fromChinese
1.一种应用程序更新方法,其特征在于,包括:1. A method for updating an application program, comprising:检测终端内的应用程序是否存在更新版本;Detect whether there is an updated version of the application program in the terminal;若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;If the updated version of the application exists, obtaining an installation package of the updated version of the application;获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及Obtaining the first format file in the installation package of the updated version, and generating a corresponding second format file according to the first format file; and获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。An update operation of the application program by the terminal user is obtained, and the application program is updated according to the update operation, the installation package of the updated version, and the second format file.2.根据权利要求1所述的应用程序更新方法,其特征在于,所述检测终端内的应用程序是否存在更新版本,包括:2. The application program update method according to claim 1, wherein the detecting whether there is an updated version of the application program in the terminal comprises:间隔预设时间向应用程序服务器发送所述应用程序的版本号;Sending the version number of the application program to the application program server at preset time intervals;获取所述应用程序服务器反馈的配置文件;Obtain the configuration file fed back by the application program server;根据所述配置文件判断所述应用程序是否存在更新版本。According to the configuration file, it is judged whether there is an updated version of the application program.3.根据权利要求2所述的应用程序更新方法,其特征在于,所述获取所述应用程序的更新版本安装包,包括:3. The application program update method according to claim 2, wherein said obtaining the updated version installation package of said application program comprises:通过所述配置文件携带的下载链接获取所述应用程序的更新版本安装包。The installation package of the updated version of the application is obtained through the download link carried in the configuration file.4.根据权利要求2所述的应用程序更新方法,其特征在于,所述获取所述应用程序的更新版本安装包,包括:4. The application program updating method according to claim 2, wherein said acquiring the updated version installation package of said application program comprises:通过所述配置文件携带的下载链接获取所述应用程序的差分包;Obtaining the differential package of the application through the download link carried in the configuration file;获取所述应用程序的旧版本安装包;Obtain the installation package of the old version of the application;根据所述差分包和所述旧版本安装包生成所述更新版本安装包。Generating the updated version installation package according to the differential package and the old version installation package.5.根据权利要求1所述的应用程序更新方法,其特征在于,所述根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新,包括:5. The application program update method according to claim 1, wherein said updating said application program according to said update operation, an update version installation package and said second format file comprises:根据所述更新操作卸载旧版本的所述应用程序;Uninstalling the old version of the application program according to the update operation;根据所述更新版本安装包执行安装新版本的所述应用程序的操作;performing an operation of installing a new version of the application according to the updated version installation package;判断所述终端内是否存在所述第二格式文件;judging whether the second format file exists in the terminal;若所述终端内存在所述第二格式文件,则复制所述第二格式文件至新版本的所述应用程序的安装目录下,完成对旧版本的所述应用程序的更新操作。If the second format file exists in the terminal, copy the second format file to the installation directory of the new version of the application program to complete the update operation of the old version of the application program.6.一种应用程序更新装置,其特征在于,包括:6. An application program updating device, characterized in that it comprises:检测模块,用于检测终端内的应用程序是否存在更新版本;A detection module, configured to detect whether there is an updated version of the application program in the terminal;获取模块,用于若所述应用程序存在所述更新版本,则获取所述应用程序的更新版本安装包;An obtaining module, configured to obtain an installation package of an updated version of the application if the updated version exists in the application;生成模块,用于获取所述更新版本安装包中第一格式文件,并根据所述第一格式文件生成相应的第二格式文件;以及A generating module, configured to obtain a first format file in the installation package of the updated version, and generate a corresponding second format file according to the first format file; and更新模块,用于获取终端用户对所述应用程序的更新操作,并根据所述更新操作、更新版本安装包和所述第二格式文件对所述应用程序进行更新。The update module is configured to obtain an update operation of the terminal user on the application program, and update the application program according to the update operation, the update version installation package and the second format file.7.根据权利要求6所述的应用程序更新装置,其特征在于,所述检测模块包括发送子模块、第一获取子模块和判断子模块;7. The application program updating device according to claim 6, wherein the detection module comprises a sending submodule, a first obtaining submodule and a judging submodule;所述发送子模块用于间隔预设时间向应用程序服务器发送所述应用程序的版本号;The sending submodule is used to send the version number of the application program to the application program server at preset time intervals;所述第一获取子模块用于获取所述应用程序服务器反馈的配置文件;The first obtaining submodule is used to obtain the configuration file fed back by the application server;所述判断子模块用于根据所述配置文件判断所述应用程序是否存在更新版本。The judging submodule is used for judging whether there is an updated version of the application program according to the configuration file.8.根据权利要求7所述的应用程序更新装置,其特征在于,所述获取模块用于通过所述配置文件携带的下载链接获取所述应用程序的更新版本安装包。8 . The application program updating device according to claim 7 , wherein the acquiring module is configured to acquire an installation package of an updated version of the application program through a download link carried in the configuration file.9.根据权利要求7所述的应用程序更新装置,其特征在于,所述获取模块包括第二获取子模块、第三获取子模块和生成子模块;9. The application program updating device according to claim 7, wherein the acquiring module comprises a second acquiring submodule, a third acquiring submodule and a generating submodule;所述第二获取子模块用于通过所述配置文件携带的下载链接获取所述应用程序的差分包;The second obtaining submodule is used to obtain the differential package of the application through the download link carried in the configuration file;所述第三获取子模块用于获取所述应用程序的旧版本安装包;The third obtaining submodule is used to obtain the old version installation package of the application;所述生成子模块用于根据所述差分包和所述旧版本安装包生成所述更新版本安装包。The generating submodule is used to generate the updated version installation package according to the difference package and the old version installation package.10.一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权1至权5中任意一种应用程序更新方法。10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, characterized in that, when the processor executes the computer program, rights 1 to 1 are realized. Any one of the application update methods in right 5.
CN201611051646.8A2016-11-252016-11-25Application program updating method and device and computer equipmentActiveCN106775827B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201611051646.8ACN106775827B (en)2016-11-252016-11-25Application program updating method and device and computer equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201611051646.8ACN106775827B (en)2016-11-252016-11-25Application program updating method and device and computer equipment

Publications (2)

Publication NumberPublication Date
CN106775827Atrue CN106775827A (en)2017-05-31
CN106775827B CN106775827B (en)2020-05-12

Family

ID=58910580

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201611051646.8AActiveCN106775827B (en)2016-11-252016-11-25Application program updating method and device and computer equipment

Country Status (1)

CountryLink
CN (1)CN106775827B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107357613A (en)*2017-06-282017-11-17广州酷狗计算机科技有限公司Using update method, device and computer-readable recording medium
CN107509187A (en)*2017-08-312017-12-22维沃移动通信有限公司A kind of installation method of application program, mobile terminal and server
CN109062593A (en)*2018-07-202018-12-21Oppo(重庆)智能科技有限公司Application processing method and device, electronic equipment, computer readable storage medium
CN109743456A (en)*2018-12-292019-05-10Oppo广东移动通信有限公司data transmission method and related device
CN110109685A (en)*2019-04-232019-08-09维沃移动通信有限公司Production method, device and the mobile terminal of the update, installation kit applied fastly
CN111221538A (en)*2018-11-232020-06-02珠海金山办公软件有限公司 A program installation method, system, terminal and storage medium
CN111221559A (en)*2019-11-052020-06-02北京达佳互联信息技术有限公司Application updating method and device, storage medium, terminal and server
CN111831300A (en)*2019-08-232020-10-27北京骑胜科技有限公司 APP update method, apparatus, electronic device, and computer-readable storage medium
CN113031988A (en)*2021-03-262021-06-25北京字节跳动网络技术有限公司Application program updating method, device, equipment and storage medium
CN109413186B (en)*2018-10-312021-07-30Oppo广东移动通信有限公司 Application program updating method, terminal, server and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103699410A (en)*2013-12-202014-04-02北京奇虎科技有限公司Method and device for updating application programs
CN105138382A (en)*2015-09-242015-12-09广东欧珀移动通信有限公司 Method and terminal for upgrading Android system
CN105893080A (en)*2016-03-282016-08-24努比亚技术有限公司Application management method and device
US20160274887A1 (en)*2015-03-192016-09-22Zynga Inc.Modifying client device game applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103699410A (en)*2013-12-202014-04-02北京奇虎科技有限公司Method and device for updating application programs
US20160274887A1 (en)*2015-03-192016-09-22Zynga Inc.Modifying client device game applications
CN105138382A (en)*2015-09-242015-12-09广东欧珀移动通信有限公司 Method and terminal for upgrading Android system
CN105893080A (en)*2016-03-282016-08-24努比亚技术有限公司Application management method and device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107357613A (en)*2017-06-282017-11-17广州酷狗计算机科技有限公司Using update method, device and computer-readable recording medium
CN107357613B (en)*2017-06-282020-09-04广州酷狗计算机科技有限公司Application updating method and device and computer readable storage medium
CN107509187A (en)*2017-08-312017-12-22维沃移动通信有限公司A kind of installation method of application program, mobile terminal and server
CN107509187B (en)*2017-08-312020-09-22维沃移动通信有限公司 Application installation method, mobile terminal and server
CN109062593A (en)*2018-07-202018-12-21Oppo(重庆)智能科技有限公司Application processing method and device, electronic equipment, computer readable storage medium
CN109413186B (en)*2018-10-312021-07-30Oppo广东移动通信有限公司 Application program updating method, terminal, server and system
CN111221538A (en)*2018-11-232020-06-02珠海金山办公软件有限公司 A program installation method, system, terminal and storage medium
CN109743456A (en)*2018-12-292019-05-10Oppo广东移动通信有限公司data transmission method and related device
CN110109685A (en)*2019-04-232019-08-09维沃移动通信有限公司Production method, device and the mobile terminal of the update, installation kit applied fastly
CN111831300A (en)*2019-08-232020-10-27北京骑胜科技有限公司 APP update method, apparatus, electronic device, and computer-readable storage medium
CN111221559A (en)*2019-11-052020-06-02北京达佳互联信息技术有限公司Application updating method and device, storage medium, terminal and server
CN111221559B (en)*2019-11-052024-05-14北京达佳互联信息技术有限公司Application updating method, device, storage medium, terminal and server
CN113031988A (en)*2021-03-262021-06-25北京字节跳动网络技术有限公司Application program updating method, device, equipment and storage medium
CN113031988B (en)*2021-03-262024-05-14北京字节跳动网络技术有限公司Application program updating method, device, equipment and storage medium

Also Published As

Publication numberPublication date
CN106775827B (en)2020-05-12

Similar Documents

PublicationPublication DateTitle
CN106775827A (en) Application program update method and device, and computer equipment
CN109857403B (en)Page updating method and device, page processing method and device
CN104765591A (en)Method and system for updating software configuration parameter, and terminal server
CN106775828B (en) Application installation method and device, computer equipment
CN107734616A (en) Application closing method, device, storage medium and electronic device
CN106502703B (en)Function calling method and device
CN106502834A (en)The backup method of data, apparatus and system
CN106502681B (en)Sensor registration method and device and mobile terminal
CN103455343A (en)Method and device for updating application programs
CN103455348A (en)Subarea adjustment method, device, terminal, server and system
CN106095456A (en)User is guided to download the method for application program, device and mobile terminal
CN106126411A (en)A kind of method and apparatus that tested program code is tested
CN106713608B (en)Application function state modification method and device and terminal
CN107861730A (en)The processing method and mobile terminal of a kind of application program
CN110830127B (en)Radio frequency parameter processing method and device, mobile terminal and storage medium
EP2869604B1 (en)Method, apparatus and device for processing a mobile terminal resource
CN106658354A (en)Data transmission method and equipment
CN106953898B (en)Method and device for acquiring software package
CN106375582A (en) Vibration control method and device
CN107171740A (en)Radio frequency interference processing method, device, storage medium and terminal
US20160314036A1 (en)Method and Apparatus for Repairing Dynamic Link Library File
CN106528231B (en)A kind of method and apparatus starting application program
CN108549552B (en)Kernel loading method and device and storage medium
CN106250175A (en) An application upgrading method and terminal equipment
CN105354067A (en)Interface configuration method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information

Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

CB02Change of applicant information
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp