[go: up one dir, main page]

CN107704278A - Application upgrade method and apparatus - Google Patents

Application upgrade method and apparatus Download PDF

Info

Publication number
CN107704278A
CN107704278A CN201610643491.0A CN201610643491A CN107704278A CN 107704278 A CN107704278 A CN 107704278A CN 201610643491 A CN201610643491 A CN 201610643491A CN 107704278 A CN107704278 A CN 107704278A
Authority
CN
China
Prior art keywords
version number
code bag
application
upgraded
code package
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610643491.0A
Other languages
Chinese (zh)
Inventor
李强
廖耀华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610643491.0A priority Critical patent/CN107704278A/en
Publication of CN107704278A publication Critical patent/CN107704278A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

本申请公开了应用升级方法和装置。所述方法的一具体实施方式包括:确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更,其中,所述版本号存储用服务器存储以下内容:所述待升级应用的代码包版本号、所述代码包版本号对应的代码包路径;响应于所述版本号存储用服务器中的所述待升级应用的代码包版本号有变更,则从所述版本号存储用服务器接收版本号变更通知;根据所述版本号变更通知中的变更的代码包版本号和/或所述变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级待升级应用的代码包;用所下载的代码包替换所述待升级应用的本地代码包。该实施方式实现了应用升级的实时性,提高了应用的升级效率。

This application discloses an application upgrading method and device. A specific implementation of the method includes: determining whether the version number of the code package of the application to be upgraded in the server for storing the version number has changed, wherein the server for storing the version number stores the following content: the code of the application to be upgraded Package version number, the code package path corresponding to the code package version number; in response to a change in the code package version number of the application to be upgraded in the version number storage server, receive from the version number storage server Version number change notification; according to the changed code package version number in the version number change notification and/or the code package path corresponding to the changed code package version number, download from the connected code package storage server for upgrading The code package of the application to be upgraded; the downloaded code package is used to replace the local code package of the application to be upgraded. This embodiment realizes the real-time performance of application upgrade and improves the efficiency of application upgrade.

Description

应用升级方法和装置Application upgrade method and device

技术领域technical field

本申请涉及计算机技术领域,具体涉及互联网技术领域,尤其涉及应用升级方法和装置。The present application relates to the field of computer technology, in particular to the field of Internet technology, and in particular to an application upgrading method and device.

背景技术Background technique

随着互联网技术的快速发展,各种应用的功能也在不断的完善中。其中,每次对应用的功能进行完善后,就需要对应用进行升级。With the rapid development of Internet technology, the functions of various applications are also constantly being improved. Wherein, after each function of the application is improved, the application needs to be upgraded.

目前,对于应用的升级通常有如下两种做法:用户确认法:用户先接收到应用升级通知,然后手动确认后再进行升级;定时检测替换法:安装有待升级应用的终端设备定时检测待升级应用的本地代码包版本和服务器中的最新代码包版本是否一致,如果版本不一致,则从服务器中下载最新代码包版本对应的代码包以替换本地代码包。At present, there are usually two ways to upgrade the application: user confirmation method: the user first receives the application upgrade notification, and then manually confirms the upgrade before proceeding; regular detection and replacement method: the terminal device with the application to be upgraded regularly detects the application to be upgraded Whether the version of the local code package is consistent with the latest code package version in the server, if the versions are inconsistent, download the code package corresponding to the latest code package version from the server to replace the local code package.

虽然上述两种方法都能达到对应用进行升级的目的,但也都存在不同的缺陷。采用用户确认法,用户需要手动确认后再进行升级,对于用户来说这是对用户交互的干扰和中断;采用定时检测替换法,终端设备是采用每隔一段时间轮询检测,迭代更新时,必然存在一定的等待检测时间,不能够实时更新,而且会增加CPU(Central Processing Unit,中央处理器)的负载。Although the above two methods can achieve the purpose of upgrading the application, they also have different defects. Using the user confirmation method, the user needs to manually confirm before upgrading, which is an interference and interruption to the user interaction for the user; using the regular detection replacement method, the terminal device uses polling detection at intervals, and when iteratively updated, There must be a certain waiting time for detection, which cannot be updated in real time, and will increase the load on the CPU (Central Processing Unit, central processing unit).

因此,目前的应用升级方法不能满足应用升级的实时性,存在升级效率低的问题。Therefore, the current application upgrade method cannot satisfy the real-time performance of application upgrade, and there is a problem of low upgrade efficiency.

发明内容Contents of the invention

本申请的目的在于提出一种改进的应用升级方法和装置,来解决以上背景技术部分提到的技术问题。The purpose of this application is to propose an improved application upgrading method and device to solve the technical problems mentioned in the above background technology section.

第一方面,本申请提供了一种应用升级方法,所述方法包括:确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更,其中,所述版本号存储用服务器存储以下内容:所述待升级应用的代码包版本号、所述代码包版本号对应的代码包路径;响应于所述版本号存储用服务器中的所述待升级应用的代码包版本号有变更,则从所述版本号存储用服务器接收版本号变更通知,其中,所述版本号变更通知包括以下至少一项:所述待升级应用的变更的代码包版本号、所述变更的代码包版本号对应的代码包路径;根据所述版本号变更通知中的所述变更的代码包版本号和/或所述变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级待升级应用的代码包;用所下载的代码包替换所述待升级应用的本地代码包。In a first aspect, the present application provides an application upgrade method, the method includes: determining whether the version number of the code package of the application to be upgraded in the server for storing the version number has changed, wherein the server for storing the version number stores the following Content: the code package version number of the application to be upgraded, and the code package path corresponding to the code package version number; in response to a change in the code package version number of the application to be upgraded in the version number storage server, then A version number change notification is received from the version number storage server, wherein the version number change notification includes at least one of the following: the changed code package version number of the application to be upgraded, and the corresponding version number of the changed code package version number code package path; according to the changed code package version number in the version number change notification and/or the code package path corresponding to the changed code package version number, download from the connected code package storage server to upgrade the code package of the application to be upgraded; and replace the local code package of the application to be upgraded with the downloaded code package.

在一些实施例中,所述用所下载的代码包替换所述待升级应用的本地代码包,包括:对于所下载的代码包中的各个文件中的每一个文件,确定该文件的文件名是否与所述本地代码包中的文件的文件名相同;对于所下载的代码包中的各个文件中的每一个文件,响应于该文件的文件名与所述本地代码包中的文件的文件名相同,则用该文件替换所述本地代码包中文件名与其相同的文件。In some embodiments, the replacing the local code package of the application to be upgraded with the downloaded code package includes: for each file in the downloaded code package, determining whether the file name of the file is the same as the file name of the file in the native code package; for each of the files in the downloaded code package, responding to the file name of the file being the same as the file name of the file in the native code package , replace the file with the same file name in the native code package with this file.

在一些实施例中,所述用所下载的代码包替换所述待升级应用的本地代码包,包括:对于所下载的代码包中的各个文件中的每一个文件,响应于该文件的文件名与所述本地代码包中的文件的文件名不同,则复制该文件至所述本地代码包,其中,该文件在所述本地代码包中的位置与在所下载的代码包中的位置相同。In some embodiments, the replacing the local code package of the application to be upgraded with the downloaded code package includes: for each file in the downloaded code package, responding to the file name of the file If the file name is different from that of the file in the local code package, copy the file to the local code package, where the position of the file in the local code package is the same as that in the downloaded code package.

在一些实施例中,所述用所下载的代码包替换所述待升级应用的本地代码包,包括:确定所述本地代码包的版本号是否与所下载的代码包的版本号相同,若否,则将所述本地代码包的版本号更新为所下载的代码包的版本号。In some embodiments, the replacing the local code package of the application to be upgraded with the downloaded code package includes: determining whether the version number of the local code package is the same as the version number of the downloaded code package, if not , then update the version number of the local code package to the version number of the downloaded code package.

在一些实施例中,所述方法还包括:重新启动所述待升级应用。In some embodiments, the method further includes: restarting the application to be upgraded.

第二方面,本申请提供了一种应用升级装置,所述装置包括:确定单元,配置用于确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更,其中,所述版本号存储用服务器存储以下内容:所述待升级应用的代码包版本号、所述代码包版本号对应的代码包路径;接收单元,配置用于响应于所述版本号存储用服务器中的所述待升级应用的代码包版本号有变更,则从所述版本号存储用服务器接收版本号变更通知,其中,所述版本号变更通知包括以下至少一项:所述待升级应用的变更的代码包版本号、所述变更的代码包版本号对应的代码包路径;下载单元,配置用于根据所述版本号变更通知中的所述变更的代码包版本号和/或所述变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级待升级应用的代码包;替换单元,配置用于用所下载的代码包替换所述待升级应用的本地代码包。In a second aspect, the present application provides an application upgrading device, which includes: a determining unit configured to determine whether the version number of the code package of the application to be upgraded in the version number storage server has changed, wherein the version The number storage server stores the following content: the code package version number of the application to be upgraded, and the code package path corresponding to the code package version number; the receiving unit is configured to respond to the version number in the version number storage server. If the version number of the code package of the application to be upgraded is changed, a version number change notification is received from the version number storage server, wherein the version number change notification includes at least one of the following: the changed code package of the application to be upgraded version number, the code package path corresponding to the changed code package version number; the download unit is configured to change the code package version number and/or the changed code package version according to the version number change notification The code package path corresponding to the number downloads the code package used to upgrade the application to be upgraded from the connected code package storage server; the replacement unit is configured to replace the local code package of the application to be upgraded with the downloaded code package.

在一些实施例中,所述替换单元包括:确定子单元,配置用于对于所下载的代码包中的各个文件中的每一个文件,确定该文件的文件名是否与所述本地代码包中的文件的文件名相同;替换子单元,配置用于对于所下载的代码包中的各个文件中的每一个文件,响应于该文件的文件名与所述本地代码包中的文件的文件名相同,则用该文件替换所述本地代码包中文件名与其相同的文件。In some embodiments, the replacement unit includes: a determining subunit configured to, for each file in each file in the downloaded code package, determine whether the file name of the file is the same as that in the local code package the filenames of the files are the same; a replacement subunit configured for, for each of the files in the downloaded code package, responsive to the file having the same filename as a file in the native code package, Then use this file to replace the file with the same file name in the local code package.

在一些实施例中,所述替换单元包括:复制子单元,配置用于对于所下载的代码包中的各个文件中的每一个文件,响应于该文件的文件名与所述本地代码包中的文件的文件名不同,则复制该文件至所述本地代码包,其中,该文件在所述本地代码包中的位置与在所下载的代码包中的位置相同。In some embodiments, the replacement unit includes: a copying subunit, configured for each file in each file in the downloaded code package, in response to the file name of the file being the same as the If the file names of the files are different, copy the file to the local code package, where the position of the file in the local code package is the same as that in the downloaded code package.

在一些实施例中,所述替换单元包括:更新子单元,配置用于确定所述本地代码包的版本号是否与所下载的代码包的版本号相同,若否,则将所述本地代码包的版本号更新为所下载的代码包的版本号。In some embodiments, the replacement unit includes: an update subunit configured to determine whether the version number of the local code package is the same as the version number of the downloaded code package, and if not, update the local code package The version number of is updated to the version number of the downloaded code package.

在一些实施例中,所述装置还包括:重启单元,配置用于重新启动所述待升级应用。In some embodiments, the device further includes: a restart unit configured to restart the application to be upgraded.

本申请提供的应用升级方法和装置,通过从版本号存储用服务器接收版本号变更通知以确定版本号存储用服务器中的待升级应用的代码包版本号有变更,而后根据变更通知中的变更的代码包版本号和/或变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级待升级应用的代码包,最后用所下载的代码包替换待升级应用的本地代码包,从而有效利用了从版本号存储用服务器接收的变更通知,实现了应用升级的实时性,提高了应用的升级效率。The application upgrade method and device provided by this application determine that the code package version number of the application to be upgraded in the version number storage server has changed by receiving the version number change notification from the version number storage server, and then according to the changes in the change notification The code package version number and/or the code package path corresponding to the changed code package version number, download the code package used to upgrade the application to be upgraded from the connected code package storage server, and finally replace the application to be upgraded with the downloaded code package The local code package of the local code package effectively utilizes the change notification received from the version number storage server, realizes the real-time performance of the application upgrade, and improves the upgrade efficiency of the application.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1是本申请可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;

图2是根据本申请的应用升级方法的一个实施例的流程图;Fig. 2 is a flow chart according to an embodiment of the application upgrading method of the present application;

图3是根据本申请的应用升级方法的一个应用场景的示意图;FIG. 3 is a schematic diagram of an application scenario of the application upgrading method according to the present application;

图4是根据本申请的应用升级方法的又一个实施例的流程图;FIG. 4 is a flow chart of another embodiment of the application upgrading method according to the present application;

图5是根据本申请的应用升级装置的一个实施例的结构示意图;FIG. 5 is a schematic structural diagram of an embodiment of an application upgrading device according to the present application;

图6是适于用来实现本申请实施例的终端设备的计算机系统的结构示意图。Fig. 6 is a schematic structural diagram of a computer system suitable for implementing a terminal device according to an embodiment of the present application.

具体实施方式detailed description

下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

图1示出了可以应用本申请的应用升级方法或应用升级装置的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which embodiments of the application upgrading method or application upgrading apparatus of the present application can be applied.

如图1所示,系统架构100可以包括终端设备101、102、103,网络104、105和服务器106、107。网络104用以在终端设备101、102、103和服务器106、107之间提供通信链路的介质。网络105用以在服务器106和服务器107之间提供通信链路的介质。网络104、105可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include terminal devices 101 , 102 , 103 , networks 104 , 105 and servers 106 , 107 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the servers 106 , 107 . The network 105 is used as a medium for providing a communication link between the server 106 and the server 107 . The networks 104, 105 may include various connection types such as wires, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以监控服务器105中的待升级应用的代码包版本号是否有变更或从服务器105接收版本号变更通知等。用户还可以使用终端设备101、102、103通过网络104从服务器107下载用以升级待升级应用的代码包。终端设备101、102、103上可以安装有各种类别的应用,例如网络爬虫应用、网页浏览器应用、搜索类应用等。Users can use terminal devices 101 , 102 , and 103 to interact with server 105 through network 104 to monitor whether the version number of the code package of the application to be upgraded in server 105 is changed or receive version number change notification from server 105 . The user can also use the terminal devices 101 , 102 , 103 to download the code package used to upgrade the application to be upgraded from the server 107 through the network 104 . Various types of applications may be installed on the terminal devices 101 , 102 , 103 , such as web crawler applications, web browser applications, search applications, and the like.

终端设备101、102、103可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers and so on.

服务器106可以是提供各种服务的服务器,例如对终端设备101、102、103中的待升级应用的代码包版本号和代码包版本号对应的代码包路径进行存储的版本号存储用服务器。当版本号存储用服务器中的待升级应用的代码包版本号有变更时,版本号存储用服务器106会自动发送版本号变更通知至终端设备101、102、103。The server 106 may be a server that provides various services, such as a version number storage server that stores the code package version numbers of applications to be upgraded in the terminal devices 101 , 102 , and 103 and the code package paths corresponding to the code package version numbers. When the version number of the code package of the application to be upgraded in the version number storage server is changed, the version number storage server 106 will automatically send a version number change notification to the terminal devices 101 , 102 , 103 .

服务器107可以是提供各种服务器的服务器,例如存储终端设备101、102、103中的待升级应用的各个代码包、待升级应用的各个代码包版本号和与各个代码包版本号对应的代码包路径的代码包存储用服务器,并且代码包存储用服务器107还可以将存储的待升级应用的代码包版本号和代码包版本号对应的代码包路径发送至版本号存储用服务器106。The server 107 can be a server that provides various servers, such as storing each code package of the application to be upgraded in the terminal device 101, 102, 103, the version number of each code package of the application to be upgraded, and the code package corresponding to the version number of each code package The code package storage server of the path, and the code package storage server 107 can also send the stored code package version number of the application to be upgraded and the code package path corresponding to the code package version number to the version number storage server 106 .

需要说明的是,本申请实施例所提供的应用升级方法一般由终端设备101、102、103执行,相应地,应用升级装置一般设置于终端设备101、102、103中。It should be noted that the application upgrading method provided by the embodiment of the present application is generally executed by the terminal equipment 101 , 102 , 103 , and correspondingly, the application upgrading apparatus is generally provided in the terminal equipment 101 , 102 , 103 .

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

继续参考图2,示出了根据本申请的应用升级方法的一个实施例的流程200。所述的应用升级方法,包括以下步骤:Continuing to refer to FIG. 2 , a flow 200 of an embodiment of the application upgrading method according to the present application is shown. The described application upgrade method includes the following steps:

步骤201,确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更。Step 201, determine whether the version number of the code package of the application to be upgraded in the version number storage server has changed.

在本实施例中,应用升级方法运行于其上的电子设备(例如图1所示的终端设备101、102、103)可以预先从版本号存储用服务器(例如图1所示的服务器106)中获取待升级应用的代码包版本号内容,然后通过将版本号存储用服务器中的上述待升级应用的代码包版本号内容与所获取的代码包版本号内容进行比较,以确定版本号存储用服务器中的上述待升级应用的代码包版本号是否有变更。这里,版本号存储用服务器可以为分布式系统的可靠协调系统服务器,并且版本号存储用服务器可以存储以下内容:待升级应用的代码包版本号、代码包版本号对应的代码包路径。In this embodiment, the electronic device on which the application upgrade method runs (such as the terminal devices 101, 102, 103 shown in FIG. 1 ) can store the version number in advance from the server (such as the server 106 shown in FIG. Obtain the content of the version number of the code package of the application to be upgraded, and then compare the content of the version number of the code package of the above-mentioned application to be upgraded in the server for storing the version number with the content of the acquired version number of the code package to determine the server for storing the version number Whether there is any change in the code package version number of the above-mentioned application to be upgraded in . Here, the version number storage server may be a reliable coordination system server of the distributed system, and the version number storage server may store the following content: the code package version number of the application to be upgraded, and the code package path corresponding to the code package version number.

可选地,上述电子设备可以在上述待升级应用启动时,创建一个连接版本号存储用服务器的会话;之后,可以获取版本号存储用服务器中的上述待升级应用的版本号内容,并注册监听版本号存储用服务器中的上述待升级应用的版本号内容变更事件;最后可以通过确定上述版本号内容变更事件是否被触发来确定版本号存储用服务器中的上述待升级应用的版本号是否有变更。Optionally, when the above-mentioned application to be upgraded is started, the above-mentioned electronic device can create a session connected to the server for storing the version number; after that, it can obtain the content of the version number of the above-mentioned application to be upgraded in the server for storing the version number, and register to monitor The version number content change event of the above-mentioned application to be upgraded in the version number storage server; finally, it can be determined whether the version number of the above-mentioned application to be upgraded in the version number storage server is changed by determining whether the above-mentioned version number content change event is triggered .

在本实施例的一些可选的实现方式中,版本管理人员可以通过代码包存储用服务器(例如图1所示的服务器107)提供的界面上传上述待升级应用的最新代码包以及输入并保存所上传的代码包的版本号和存储路径。并且,代码包存储用服务器可以将用户保存的所上传的代码包的版本号和存储地址发送至版本号存储用服务器。In some optional implementations of this embodiment, the version manager can upload the latest code package of the above-mentioned application to be upgraded through an interface provided by the code package storage server (such as the server 107 shown in FIG. The version number and storage path of the uploaded code package. In addition, the code package storage server may send the version number and storage address of the uploaded code package saved by the user to the version number storage server.

步骤202,从版本号存储用服务器接收版本号变更通知。Step 202, receiving a version number change notification from the version number storage server.

在本实施例中,当上述电子设备确定版本号存储用服务器中的上述待升级应用的版本号有变更时,比如版本号存储用服务器中新增加了上述待升级应用的代码包版本号和代码包版本号对应的代码包路径,则上述电子设备可以从版本号存储用服务器接收版本号变更通知。其中,版本号变更通知包括以下至少一项:上述待升级应用的变更的代码包版本号、变更的代码包版本号对应的代码包路径。In this embodiment, when the electronic device determines that the version number of the application to be upgraded in the version number storage server has changed, for example, the version number of the code package version number and code of the application to be upgraded are newly added to the version number storage server. If the code package path corresponding to the package version number is provided, the electronic device may receive a version number change notification from the version number storage server. Wherein, the version number change notification includes at least one of the following: the changed code package version number of the application to be upgraded, and the code package path corresponding to the changed code package version number.

步骤203,根据版本号变更通知中的变更的代码包版本号和/或变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级上述待升级应用的代码包。Step 203, according to the changed code package version number and/or the code package path corresponding to the changed code package version number in the version number change notification, download the code used to upgrade the above-mentioned application to be upgraded from the connected code package storage server Bag.

在本实施例中,基于步骤202接收的版本号变更通知中的变更的代码包版本号和/或变更的代码包版本号对应的代码包路径,上述电子设备可以从所连接的代码包存储用服务器(例如图1所示的服务器107)下载用于升级上述待升级应用的代码包。In this embodiment, based on the changed code package version number and/or the code package path corresponding to the changed code package version number in the version number change notification received in step 202, the above-mentioned electronic device can store the code package from the connected code package. The server (for example, the server 107 shown in FIG. 1 ) downloads a code package for upgrading the application to be upgraded.

在本实施例的一些可选的实现方式中,如果上述待升级应用的代码包在代码包存储用服务器中的存储路径是默认的,则上述版本号变更通知中可以只包含上述待升级应用的变更的代码包版本号。上述电子设备可以根据上述待升级应用的变更的代码包版本号在代码包存储用服务器的默认路径下下载上述变更的代码包版本号所指示的代码包,用以升级上述待升级应用。In some optional implementations of this embodiment, if the storage path of the code package of the above-mentioned application to be upgraded in the code package storage server is the default, the above-mentioned version number change notification may only include the code package of the above-mentioned application to be upgraded. The changed code package version number. The electronic device may download the code package indicated by the changed code package version number from the default path of the code package storage server according to the changed code package version number of the application to be upgraded, so as to upgrade the above-mentioned application to be upgraded.

可选地,上述版本号变更通知中可以只包含上述待升级应用的变更的代码包版本号对应的代码包路径。上述电子设备可以根据上述待升级应用的变更的代码包版本号对应的代码包路径从所连接的代码包存储用服务器下载上传时间最晚的代码包,用以上述升级待升级应用。Optionally, the above version number change notification may only include the code package path corresponding to the changed code package version number of the application to be upgraded. The electronic device may download the code package with the latest upload time from the connected code package storage server according to the code package path corresponding to the changed code package version number of the application to be upgraded, and use it to upgrade the application to be upgraded.

可选地,上述版本号变更通知中可以同时包含上述待升级应用的变更的代码包版本号和该变更的代码包版本号所指示的代码包路径,上述电子设备可以根据该变更的代码包版本号和该变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载该变更的代码包版本号所指示的代码包,用以升级上述待升级应用。Optionally, the above-mentioned version number change notification may include both the changed code package version number of the application to be upgraded and the code package path indicated by the changed code package version number, and the above-mentioned electronic device may number and the code package path corresponding to the changed code package version number, and download the code package indicated by the changed code package version number from the connected code package storage server to upgrade the above-mentioned application to be upgraded.

步骤204,用所下载的代码包替换待升级应用的本地代码包。Step 204, replace the local code package of the application to be upgraded with the downloaded code package.

在本实施例中,上述电子设备可以用所下载的整个代码包直接替换上述待升级应用的本地代码包。In this embodiment, the electronic device may directly replace the local code package of the application to be upgraded with the downloaded entire code package.

在本实施例的一些可选的实现方式中,对于所下载的代码包中的各个文件中的每一个文件,上述电子设备可以先确定该文件的文件名是否与上述待升级应用的本地代码包中的文件的文件名相同,如果是,则上述电子设备可以用该文件替换上述待升级应用的本地代码包中文件名与其相同的文件。In some optional implementations of this embodiment, for each file in each file in the downloaded code package, the electronic device may first determine whether the file name of the file is the same as the local code package of the application to be upgraded The file names of the files in are the same, if yes, the above-mentioned electronic device can use this file to replace the file with the same file name in the local code package of the above-mentioned application to be upgraded.

在本实施例的一些可选的实现方式中,对于所下载的代码包中的各个文件中的每一个文件,如果该文件的文件名与上述待升级应用的本地代码包中的文件的文件名不同,则复制该文件至上述待升级应用的本地代码包,其中,该文件在上述待升级应用的本地代码包中的位置与在所下载的代码包中的位置相同。In some optional implementations of this embodiment, for each file in the downloaded code package, if the file name of the file is the same as the file name of the file in the local code package of the application to be upgraded If not, copy the file to the local code package of the application to be upgraded, wherein the position of the file in the local code package of the application to be upgraded is the same as that in the downloaded code package.

在本实施例的一些可选的实现方式中,对上述待升级应用的本地代码包中的文件进行替换更新后,上述电子设备还可以确定上述待升级应用的本地代码包的版本号是否与所下载的代码包的版本号相同,若否,则上述电子设备可以将上述待升级应用的本地代码包的版本号更新为所下载的代码包的版本号。In some optional implementations of this embodiment, after replacing and updating the files in the local code package of the application to be upgraded, the electronic device may also determine whether the version number of the local code package of the application to be upgraded is consistent with the The version numbers of the downloaded code packages are the same, if not, the electronic device may update the version number of the local code package of the application to be upgraded to the version number of the downloaded code package.

继续参见图3,图3是根据本实施例的应用升级方法的应用场景的一个示意图。在图3的应用场景中,如标号301所示,客户端可以先从版本号存储用服务器获取待升级网络爬虫应用的版本号内容,比如“1.1”、“1.1.1”;接着,如标号302所示,上述客户端可以监控上述版本号存储用服务器中的上述待升级网络爬虫应用的版本号内容相对于所获取的版本号内容是否有变更;之后,如标号303所示,代码包存储用服务器可以获取到版本管理人员上传的上述待升级网络爬虫应用的最新代码包以及保存的最新代码包的版本号“1.1.2”和存储路径“ftp://***/files”,并且上述代码包存储用服务器可以自动地将版本号“1.1.2”和存储路径“ftp://***/files”发送至上述版本号存储用服务器;再接着,如标号304所示,当上述客户端监控到上述版本号存储用服务器中的上述待升级网络爬虫应用当前的版本号内容“1.1”、“1.1.1”、“1.1.2”相对于所获取的版本号内容“1.1”、“1.1.1”有变更后,则上述客户端可以从上述版本号存储用服务器接收版本号变更通知,其中,版本号变更通知中包括最新的代码包版本号“1.1.2”和最新的代码包版本号对应的代码包路径“ftp://***/files”,然后,如标号305所示,上述客户端可以从“ftp://***/files”下载代码包版本号为“1.1.2”的代码包;最后,如标号306所示,上述客户端可以用所下载的代码包替换上述待升级网络爬虫应用的本地代码包。Continue to refer to FIG. 3 , which is a schematic diagram of an application scenario of the application upgrading method according to this embodiment. In the application scenario of Fig. 3, as shown by the label 301, the client can first obtain the version number content of the web crawler application to be upgraded from the version number storage server, such as "1.1" and "1.1.1"; then, as the label As shown in 302, the above-mentioned client can monitor whether the version number content of the above-mentioned web crawler application to be upgraded in the above-mentioned version number storage server is changed relative to the obtained version number content; after that, as shown in the label 303, the code package is stored The server can obtain the latest code package of the web crawler application to be upgraded uploaded by the version manager and the version number "1.1.2" and storage path "ftp://***/files" of the latest code package saved, and The above code package storage server can automatically send the version number "1.1.2" and the storage path "ftp://***/files" to the above version number storage server; then, as shown in the label 304, when The above client monitors the content of the current version number "1.1", "1.1.1" and "1.1.2" of the above-mentioned web crawler application to be upgraded in the server for storing the above version number relative to the acquired version number content "1.1" , "1.1.1" is changed, the above client can receive the version number change notification from the above version number storage server, wherein the version number change notification includes the latest code package version number "1.1.2" and the latest The code package path "ftp://***/files" corresponding to the code package version number, and then, as shown in the label 305, the above client can download the code package version number from "ftp://***/files" It is the code package of "1.1.2"; finally, as shown by the label 306, the above-mentioned client can replace the above-mentioned local code package of the web crawler application to be upgraded with the downloaded code package.

本申请的上述实施例提供的方法通过从版本号存储用服务器接收版本号变更通知,实现了应用升级的实时性,提高了应用的升级效率。The method provided by the above embodiments of the present application realizes real-time application upgrade and improves application upgrade efficiency by receiving the version number change notification from the version number storage server.

进一步参考图4,其示出了应用升级方法的又一个实施例的流程400。该应用升级方法的流程400,包括以下步骤:Further referring to FIG. 4 , it shows a flow 400 of another embodiment of the application upgrading method. The process 400 of the application upgrading method includes the following steps:

步骤401,确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更。Step 401, determine whether the version number of the code package of the application to be upgraded in the version number storage server has changed.

在本实施例中,应用升级方法运行于其上的电子设备(例如图1所示的终端设备101、102、103)可以预先从版本号存储用服务器(例如图1所示的服务器106)中获取待升级应用的代码包版本号内容,然后通过将版本号存储用服务器中的上述待升级应用的代码包版本号内容与所获取的代码包版本号内容进行比较,以确定版本号存储用服务器中的上述待升级应用的代码包版本号是否有变更。这里,版本号存储用服务器可以为分布式系统的可靠协调系统服务器,并且版本号存储用服务器可以存储以下内容:待升级应用的代码包版本号、代码包版本号对应的代码包路径。In this embodiment, the electronic device on which the application upgrade method runs (such as the terminal devices 101, 102, 103 shown in FIG. 1 ) can store the version number in advance from the server (such as the server 106 shown in FIG. Obtain the content of the version number of the code package of the application to be upgraded, and then compare the content of the version number of the code package of the above-mentioned application to be upgraded in the server for storing the version number with the content of the acquired version number of the code package to determine the server for storing the version number Whether there is any change in the code package version number of the above-mentioned application to be upgraded in . Here, the version number storage server may be a reliable coordination system server of the distributed system, and the version number storage server may store the following content: the code package version number of the application to be upgraded, and the code package path corresponding to the code package version number.

步骤402,从版本号存储用服务器接收版本号变更通知。Step 402, receiving a version number change notification from the version number storage server.

在本实施例中,当上述电子设备确定版本号存储用服务器中的上述待升级应用的版本号有变更时,比如版本号存储用服务器中新增加了上述待升级应用的代码包版本号和代码包版本号对应的代码包路径,则上述电子设备可以从版本号存储用服务器接收版本号变更通知。其中,版本号变更通知包括以下至少一项:上述待升级应用的变更的代码包版本号、变更的代码包版本号对应的代码包路径。In this embodiment, when the electronic device determines that the version number of the application to be upgraded in the version number storage server has changed, for example, the version number of the code package version number and code of the application to be upgraded are newly added to the version number storage server. If the code package path corresponding to the package version number is provided, the electronic device may receive a version number change notification from the version number storage server. Wherein, the version number change notification includes at least one of the following: the changed code package version number of the application to be upgraded, and the code package path corresponding to the changed code package version number.

步骤403,根据版本号变更通知中的变更的代码包版本号和/或变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级待升级应用的代码包。Step 403, according to the changed code package version number and/or the code package path corresponding to the changed code package version number in the version number change notification, download the code package used to upgrade the application to be upgraded from the connected code package storage server .

在本实施例中,基于步骤202接收的版本号变更通知中的变更的代码包版本号和/或变更的代码包版本号对应的代码包路径,上述电子设备可以从所连接的代码包存储用服务器(例如图1所示的服务器107)下载用于升级上述待升级应用的代码包。In this embodiment, based on the changed code package version number and/or the code package path corresponding to the changed code package version number in the version number change notification received in step 202, the above-mentioned electronic device can store the code package from the connected code package. The server (for example, the server 107 shown in FIG. 1 ) downloads a code package for upgrading the application to be upgraded.

步骤404,用所下载的代码包替换待升级应用的本地代码包。Step 404, replace the local code package of the application to be upgraded with the downloaded code package.

在本实施例中,上述电子设备可以用所下载的整个代码包直接替换上述待升级应用的本地代码包。In this embodiment, the electronic device may directly replace the local code package of the application to be upgraded with the downloaded entire code package.

步骤405,重新启动待升级应用。Step 405, restart the application to be upgraded.

在本实施例中,上述电子设备在用所下载的代码包替换上述待升级应用的本地代码包之后,可以自动重启上述待升级应用。In this embodiment, the electronic device may automatically restart the application to be upgraded after replacing the local code package of the application to be upgraded with the downloaded code package.

在本实施例的一些可选的实现方式中,上述电子设备可以先获取上述待升级应用当前运行中的进程号;之后,上述电子设备可以确定上述待升级应用当前是否存在运行中的进程号;如果是,则上述电子设备可以强制关闭上述待升级应用当前运行中的进程号;如果否,则上述电子设备可以直接重新启动上述待升级应用。In some optional implementation manners of this embodiment, the above-mentioned electronic device may first obtain the process number of the application to be upgraded that is currently running; then, the above-mentioned electronic device may determine whether the application to be upgraded currently has a running process number; If yes, the above-mentioned electronic device may forcibly close the currently running process number of the above-mentioned application to be upgraded; if not, the above-mentioned electronic device may directly restart the above-mentioned application to be upgraded.

从图4中可以看出,与图2对应的实施例相比,本实施例中的应用升级方法的流程400突出了对待升级应用进行重新启动的步骤。由此,本实施例描述的方案通过重新启动上述待升级应用,从而实现了更有效的应用升级效果,并提高了应用升级的效率。It can be seen from FIG. 4 that, compared with the embodiment corresponding to FIG. 2 , the process 400 of the application upgrading method in this embodiment highlights the step of restarting the application to be upgraded. Therefore, the solution described in this embodiment achieves a more effective application upgrade effect and improves the efficiency of application upgrade by restarting the above-mentioned application to be upgraded.

进一步参考图5,作为对上述各图所示方法的实现,本申请提供了一种应用升级装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 5 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of an application upgrading device. The device embodiment corresponds to the method embodiment shown in FIG. 2 , and the device can specifically Used in various electronic equipment.

如图5所示,本实施例所述的应用升级装置500包括:确定单元501、接收单元502、下载单元503和替换单元504。其中,确定单元501配置用于确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更,其中,所述版本号存储用服务器存储以下内容:所述待升级应用的代码包版本号、所述代码包版本号对应的代码包路径;接收单元502配置用于如果所述版本号存储用服务器中的所述待升级应用的代码包版本号有变更,则从所述版本号存储用服务器接收版本号变更通知,其中,所述版本号变更通知包括以下至少一项:所述待升级应用的变更的代码包版本号、所述变更的代码包版本号对应的代码包路径;下载单元503配置用于根据所述版本号变更通知中的所述变更的代码包版本号和/或所述变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级待升级应用的代码包;而替换单元504配置用于用所下载的代码包替换所述待升级应用的本地代码包。As shown in FIG. 5 , the application upgrading apparatus 500 described in this embodiment includes: a determining unit 501 , a receiving unit 502 , a downloading unit 503 and a replacing unit 504 . Wherein, the determining unit 501 is configured to determine whether the version number of the code package of the application to be upgraded in the server for storing the version number has changed, wherein the server for storing the version number stores the following content: the version number of the code package of the application to be upgraded number, the code package path corresponding to the code package version number; the receiving unit 502 is configured to store the version number from the version number if the code package version number of the application to be upgraded in the server for storing the version number changes. Using a server to receive a version number change notification, wherein the version number change notification includes at least one of the following: the changed code package version number of the application to be upgraded, the code package path corresponding to the changed code package version number; Unit 503 is configured to download from the connected code package storage server according to the changed code package version number in the version number change notification and/or the code package path corresponding to the changed code package version number. is used to upgrade the code package of the application to be upgraded; and the replacement unit 504 is configured to replace the local code package of the application to be upgraded with the downloaded code package.

在本实施例中,应用升级装置500的确定单元501可以预先从版本号存储用服务器(例如图1所示的服务器106)中获取上述待升级应用的代码包版本号内容,然后通过将版本号存储用服务器中的上述待升级应用的代码包版本号内容与所获取的代码包版本号内容进行比较,以确定版本号存储用服务器中的上述待升级应用的代码包版本号是否有变更。这里,版本号存储用服务器可以为分布式系统的可靠协调系统服务器,并且版本号存储用服务器可以存储以下内容:上述待升级应用的代码包版本号、代码包版本号对应的代码包路径。In this embodiment, the determining unit 501 of the application upgrading apparatus 500 may obtain the content of the code package version number of the above-mentioned application to be upgraded from the server for storing the version number (such as the server 106 shown in FIG. 1 ) in advance, and then pass the version number The content of the code package version number of the application to be upgraded in the storage server is compared with the obtained content of the code package version number to determine whether the version number of the code package of the application to be upgraded in the version number storage server has changed. Here, the server for storing the version number may be a reliable coordination system server of the distributed system, and the server for storing the version number may store the following content: the code package version number of the application to be upgraded and the code package path corresponding to the code package version number.

在本实施例中,应用升级装置500的接收单元502可以在确定版本号存储用服务器中的上述待升级应用的版本号有变更时,比如版本号存储用服务器中新增加了上述待升级应用的代码包版本号和代码包版本号对应的代码包路径,则上述电子设备可以从版本号存储用服务器接收版本号变更通知。其中,版本号变更通知包括以下至少一项:上述待升级应用的变更的代码包版本号、变更的代码包版本号对应的代码包路径。In this embodiment, the receiving unit 502 of the application upgrading device 500 may determine that the version number of the application to be upgraded in the server for storing the version number has changed, for example, the server for storing the version number has newly added the version number of the application to be upgraded. The code package version number and the code package path corresponding to the code package version number, the electronic device may receive a version number change notification from the version number storage server. Wherein, the version number change notification includes at least one of the following: the changed code package version number of the application to be upgraded, and the code package path corresponding to the changed code package version number.

在本实施例中,应用升级装置500的下载单元503可以基于接收单元502接收的版本号变更通知中的变更的代码包版本号和/或变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级上述待升级应用的代码包。In this embodiment, the downloading unit 503 of the application upgrading apparatus 500 may download the code package path corresponding to the changed code package version number and/or the changed code package version number in the version number change notification received by the receiving unit 502 from the The connected code package storage uses the server to download the code package used to upgrade the above-mentioned application to be upgraded.

在本实施例中,应用升级装置500的替换单元504可以用所下载的整个代码包直接替换上述待升级应用的本地代码包。In this embodiment, the replacement unit 504 of the application upgrading apparatus 500 can directly replace the local code package of the application to be upgraded with the downloaded entire code package.

在本实施例的一些可选的实现方式中,上述替换单元504包括:确定子单元(图1中未示出),配置用于对于所下载的代码包中的各个文件中的每一个文件,确定该文件的文件名是否与所述本地代码包中的文件的文件名相同;替换子单元(图1中未示出),配置用于对于所下载的代码包中的各个文件中的每一个文件,响应于该文件的文件名与所述本地代码包中的文件的文件名相同,则用该文件替换所述本地代码包中文件名与其相同的文件。In some optional implementations of this embodiment, the replacement unit 504 includes: a determining subunit (not shown in FIG. 1 ), configured to, for each file in the downloaded code package, Determine whether the filename of the file is identical to the filename of the file in the native code package; a replacement subunit (not shown in Figure 1) is configured for each of the files in the downloaded code package file, and in response to the file name of the file being the same as the file name of the file in the native code package, the file is used to replace the file with the same file name in the native code package.

在本实施例的一些可选的实现方式中,上述替换单元504包括:复制子单元(图1中未示出),配置用于对于所下载的代码包中的各个文件中的每一个文件,响应于该文件的文件名与所述本地代码包中的文件的文件名不同,则复制该文件至所述本地代码包,其中,该文件在所述本地代码包中的位置与在所下载的代码包中的位置相同。In some optional implementations of this embodiment, the replacement unit 504 includes: a copy subunit (not shown in FIG. 1 ), configured to, for each file in the downloaded code package, In response to the file name of the file being different from the file name of the file in the native code package, copying the file to the native code package, wherein the location of the file in the native code package is the same as that in the downloaded The location in the code package is the same.

在本实施例的一些可选的实现方式中,上述替换单元504包括:更新子单元(图1中未示出),配置用于确定所述本地代码包的版本号是否与所下载的代码包的版本号相同,若否,则将所述本地代码包的版本号更新为所下载的代码包的版本号。In some optional implementations of this embodiment, the replacement unit 504 includes: an update subunit (not shown in FIG. 1 ), configured to determine whether the version number of the local code package is the same as that of the downloaded code package are the same, if not, update the version number of the local code package to the version number of the downloaded code package.

在本实施例的一些可选的实现方式中,上述应用升级装置500还包括:重启单元(图1中未示出),配置用于重新启动所述待升级应用。In some optional implementation manners of this embodiment, the above-mentioned application upgrading apparatus 500 further includes: a restart unit (not shown in FIG. 1 ), configured to restart the application to be upgraded.

下面参考图6,其示出了适于用来实现本申请实施例的终端设备的计算机系统600的结构示意图。Referring now to FIG. 6 , it shows a schematic structural diagram of a computer system 600 suitable for implementing a terminal device according to an embodiment of the present application.

如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6 , a computer system 600 includes a central processing unit (CPU) 601 that can be programmed according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage section 608 into a random-access memory (RAM) 603 Instead, various appropriate actions and processes are performed. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601 , ROM 602 , and RAM 603 are connected to each other via a bus 604 . An input/output (I/O) interface 605 is also connected to the bus 604 .

以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。The following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 608 including a hard disk, etc. and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 610 as necessary so that a computer program read therefrom is installed into the storage section 608 as necessary.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机代码包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本申请的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer code including program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 609 and/or installed from removable media 611 . When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the method of the present application are performed.

附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logic devices for implementing the specified Executable instructions for a function. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.

描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括确定单元、接收单元、下载单元和替换单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,确定单元还可以被描述为“确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更的单元”。The units involved in the embodiments described in the present application may be implemented by means of software or by means of hardware. The described units may also be set in a processor, for example, it may be described as: a processor includes a determining unit, a receiving unit, a downloading unit, and a replacing unit. Wherein, the names of these units do not constitute a limitation on the unit itself under certain circumstances. For example, the determining unit can also be described as "determining whether the version number of the code package of the application to be upgraded in the version number storage server has changed." unit".

作为另一方面,本申请还提供了一种非易失性计算机存储介质,该非易失性计算机存储介质可以是上述实施例中所述装置中所包含的非易失性计算机存储介质;也可以是单独存在,未装配入终端中的非易失性计算机存储介质。上述非易失性计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备:确定版本号存储用服务器中的待升级应用的代码包版本号是否有变更,其中,上述版本号存储用服务器存储以下内容:上述待升级应用的代码包版本号、代码包版本号对应的代码包路径;如果上述版本号存储用服务器中的上述待升级应用的代码包版本号有变更,则从上述版本号存储用服务器接收版本号变更通知,其中,上述版本号变更通知包括以下至少一项:上述待升级应用的变更的代码包版本号、变更的代码包版本号对应的代码包路径;根据上述版本号变更通知中的变更的代码包版本号和/或变更的代码包版本号对应的代码包路径,从所连接的代码包存储用服务器下载用于升级待升级应用的代码包;用所下载的代码包替换上述待升级应用的本地代码包。As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium contained in the device described in the above embodiments; It may be a non-volatile computer storage medium that exists independently and is not assembled into the terminal. The above-mentioned non-volatile computer storage medium stores one or more programs, and when the one or more programs are executed by a device, the device: determines the code package version of the application to be upgraded in the version number storage server Whether there is any change in the version number, wherein, the above-mentioned version number storage server stores the following content: the code package version number of the above-mentioned application to be upgraded, and the code package path corresponding to the code package version number; if the above-mentioned version number is stored in the server If there is a change in the version number of the code package, the version number change notification will be received from the above version number storage server, wherein the above version number change notification includes at least one of the following: the changed code package version number of the application to be upgraded, the changed code The code package path corresponding to the package version number; according to the changed code package version number in the above-mentioned version number change notice and/or the code package path corresponding to the changed code package version number, download from the connected code package storage server for Upgrade the code package of the application to be upgraded; replace the local code package of the application to be upgraded with the downloaded code package.

以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but should also cover the technical solution formed by the above-mentioned technical features without departing from the inventive concept. Other technical solutions formed by any combination of or equivalent features thereof. For example, a technical solution formed by replacing the above-mentioned features with technical features with similar functions disclosed in (but not limited to) this application.

Claims (10)

  1. A kind of 1. application upgrade method, it is characterised in that methods described includes:
    Determine whether the code bag version number of the application to be upgraded in version number's storage server has altered, wherein, the version Server storage herein below is used in this number storage:Code bag version number, the code bag version number pair of the application to be upgraded The code bag path answered;
    Have altered in response to the code bag version number of the application to be upgraded in version number's storage server, then from institute State version number's storage server and receive version number's Notification of Changes, wherein, version number's Notification of Changes includes following at least one :Code bag path corresponding to the code bag version number of the change of the application to be upgraded, the code bag version number of the change;
    The code bag version number of the change in version number's Notification of Changes and/or the code bag version of the change Code bag path corresponding to number, the code for upgrading application to be upgraded is downloaded with server from the code bag storage connected Bag;
    The local code bag of the application to be upgraded is replaced with the code bag downloaded.
  2. 2. according to the method for claim 1, it is characterised in that it is described with downloaded code bag replace it is described it is to be upgraded should Local code bag, including:
    For each file in each file in the code bag downloaded, determine this document filename whether with it is described The filename of file in local code bag is identical;
    For each file in each file in the code bag downloaded, in response to this document filename with described The filename of file in ground code bag is identical, then replaces the text that filename is same in the local code bag with this document Part.
  3. 3. according to the method for claim 2, it is characterised in that it is described with downloaded code bag replace it is described it is to be upgraded should Local code bag, including:
    For each file in each file in the code bag downloaded, in response to this document filename with described The filename of file in ground code bag is different, then replicates this document to the local code bag, wherein, this document is at described Position in ground code bag is identical with the position in the code bag downloaded.
  4. 4. according to the method for claim 3, it is characterised in that it is described with downloaded code bag replace it is described it is to be upgraded should Local code bag, including:
    Determine the local code bag version number whether the code bag with being downloaded version number it is identical, if it is not, then will described in The version number of local code bag is updated to the version number of downloaded code bag.
  5. 5. according to the method described in one of claim 1-4, it is characterised in that methods described also includes:
    Restart the application to be upgraded.
  6. 6. a kind of application upgrade device, it is characterised in that described device includes:
    Determining unit, it is configured to determine whether the code bag version number of the application to be upgraded in version number's storage server has Change, wherein, server storage herein below is used in version number's storage:Code bag version number, the institute of the application to be upgraded State code bag path corresponding to code bag version number;
    Receiving unit, it is configured to the code bag version in response to the application to be upgraded in version number's storage server This number has altered, then receives version number's Notification of Changes from version number's storage with server, wherein, version number's change is logical Know including at least one of following:The code bag version number of the change of the application to be upgraded, the code bag version number of the change Corresponding code bag path;
    Download unit, the code bag version number and/or institute of the change being configured in version number's Notification of Changes Code bag path corresponding to the code bag version number of change is stated, is downloaded from the code bag storage connected with server for upgrading The code bag of application to be upgraded;
    Replacement unit, it is configured to be replaced the local code bag of the application to be upgraded with downloaded code bag.
  7. 7. device according to claim 6, it is characterised in that the replacement unit includes:
    Determination subelement, it is configured to, for each file in each file in the code bag downloaded, determine this article Whether the filename of part is identical with the filename of the file in the local code bag;
    Subelement is replaced, is configured to for each file in each file in the code bag downloaded, in response to this The filename of file is identical with the filename of the file in the local code bag, then replaces the local code bag with this document The same file of middle filename.
  8. 8. device according to claim 7, it is characterised in that the replacement unit includes:
    Subelement is replicated, is configured to for each file in each file in the code bag downloaded, in response to this The filename of file is different from the filename of the file in the local code bag, then replicates this document to the local code Bag, wherein, position of this document in the local code bag is identical with the position in the code bag downloaded.
  9. 9. device according to claim 8, it is characterised in that the replacement unit includes:
    Update subelement, be configured to determine the local code bag version number whether with the version number for the code bag downloaded It is identical, if it is not, the version number of the local code bag to be then updated to the version number of downloaded code bag.
  10. 10. according to the device described in one of claim 6-9, it is characterised in that described device also includes:
    Restart unit, be configured to restart the application to be upgraded.
CN201610643491.0A 2016-08-08 2016-08-08 Application upgrade method and apparatus Pending CN107704278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610643491.0A CN107704278A (en) 2016-08-08 2016-08-08 Application upgrade method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610643491.0A CN107704278A (en) 2016-08-08 2016-08-08 Application upgrade method and apparatus

Publications (1)

Publication Number Publication Date
CN107704278A true CN107704278A (en) 2018-02-16

Family

ID=61168658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610643491.0A Pending CN107704278A (en) 2016-08-08 2016-08-08 Application upgrade method and apparatus

Country Status (1)

Country Link
CN (1) CN107704278A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659063A (en) * 2019-08-08 2020-01-07 平安科技(深圳)有限公司 Software project reconstruction method and device, computer device and storage medium
WO2021052026A1 (en) * 2019-09-17 2021-03-25 中兴通讯股份有限公司 Micro-service upgrading method, electronic device and readable storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030110484A1 (en) * 2001-12-10 2003-06-12 David Famolari Method and apparatus utilizing bluetooth transmission protocols to update software resident on a network of computing devices
US20040098715A1 (en) * 2002-08-30 2004-05-20 Parixit Aghera Over the air mobile device software management
CN101483556A (en) * 2009-01-06 2009-07-15 中兴通讯股份有限公司 Automatic upgrading method and system for switch remote target terminal
CN102195802A (en) * 2010-03-18 2011-09-21 中兴通讯股份有限公司 Terminal software transmission method, server and terminal
CN102271327A (en) * 2011-08-30 2011-12-07 大唐移动通信设备有限公司 Method and equipment for indicating software version updating
CN103024026A (en) * 2012-12-07 2013-04-03 康佳集团股份有限公司 Multi-screen interactive software auto update method and system based on Android
CN103067484A (en) * 2012-12-25 2013-04-24 深圳市天维尔通讯技术有限公司 Method and system upgrading application program automatically
CN103973475A (en) * 2013-02-05 2014-08-06 腾讯科技(深圳)有限公司 Difference service pack generating method, difference service pack downloading method, server and client-side
CN103984573A (en) * 2014-05-26 2014-08-13 中国工商银行股份有限公司 Installation method and device of application program
CN103995721A (en) * 2014-05-22 2014-08-20 广州金山网络科技有限公司 Application program upgrading method, device and system
CN104077131A (en) * 2014-06-13 2014-10-01 科大讯飞股份有限公司 Component deployment system and method
US20140304700A1 (en) * 2013-04-09 2014-10-09 Samsung Electronics Co., Ltd. Method and apparatus for updating application in electronic device
CN104239098A (en) * 2014-09-09 2014-12-24 北京金山安全软件有限公司 Automatic software upgrading method and device and mobile terminal
CN104267993A (en) * 2014-09-30 2015-01-07 珠海市君天电子科技有限公司 Software updating method, device and mobile terminal
CN104793970A (en) * 2015-04-02 2015-07-22 安徽四创电子股份有限公司 Online upgrade method based on FTP

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030110484A1 (en) * 2001-12-10 2003-06-12 David Famolari Method and apparatus utilizing bluetooth transmission protocols to update software resident on a network of computing devices
US20040098715A1 (en) * 2002-08-30 2004-05-20 Parixit Aghera Over the air mobile device software management
CN101483556A (en) * 2009-01-06 2009-07-15 中兴通讯股份有限公司 Automatic upgrading method and system for switch remote target terminal
CN102195802A (en) * 2010-03-18 2011-09-21 中兴通讯股份有限公司 Terminal software transmission method, server and terminal
CN102271327A (en) * 2011-08-30 2011-12-07 大唐移动通信设备有限公司 Method and equipment for indicating software version updating
CN103024026A (en) * 2012-12-07 2013-04-03 康佳集团股份有限公司 Multi-screen interactive software auto update method and system based on Android
CN103067484A (en) * 2012-12-25 2013-04-24 深圳市天维尔通讯技术有限公司 Method and system upgrading application program automatically
CN103973475A (en) * 2013-02-05 2014-08-06 腾讯科技(深圳)有限公司 Difference service pack generating method, difference service pack downloading method, server and client-side
US20140304700A1 (en) * 2013-04-09 2014-10-09 Samsung Electronics Co., Ltd. Method and apparatus for updating application in electronic device
CN103995721A (en) * 2014-05-22 2014-08-20 广州金山网络科技有限公司 Application program upgrading method, device and system
CN103984573A (en) * 2014-05-26 2014-08-13 中国工商银行股份有限公司 Installation method and device of application program
CN104077131A (en) * 2014-06-13 2014-10-01 科大讯飞股份有限公司 Component deployment system and method
CN104239098A (en) * 2014-09-09 2014-12-24 北京金山安全软件有限公司 Automatic software upgrading method and device and mobile terminal
CN104267993A (en) * 2014-09-30 2015-01-07 珠海市君天电子科技有限公司 Software updating method, device and mobile terminal
CN104793970A (en) * 2015-04-02 2015-07-22 安徽四创电子股份有限公司 Online upgrade method based on FTP

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659063A (en) * 2019-08-08 2020-01-07 平安科技(深圳)有限公司 Software project reconstruction method and device, computer device and storage medium
WO2021052026A1 (en) * 2019-09-17 2021-03-25 中兴通讯股份有限公司 Micro-service upgrading method, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
US10742694B2 (en) Method for migrating data and terminal
US9519654B2 (en) Method, device, processing center and system for desktop synchronization
US9244673B2 (en) System and method for updating application archive files
CN111475180B (en) Method and system for updating client cache
CN113760324B (en) Method and device for building micro front-end application
CN102090044B (en) System and method of regulating the download of data files from a server to a client device
JP2001051852A (en) Method and device for automatically installing software in computer
KR20140001172A (en) Methods for updating applications
US20080270524A1 (en) Distributing files over a computer network
US11113045B2 (en) Image install of a network appliance
CN104182294A (en) Method and device for backing up and recovering file
CN113094211B (en) Backup data processing method and device
CN107305553A (en) The method and system of the Hybrid pages are dynamically redirected in a kind of App based on Hybrid
CN109032620A (en) The configuration file generation method and device of application program
CN114385570B (en) Method, device, electronic equipment and readable medium for data synchronization
CN106843976A (en) Method and apparatus for generating image file
CN113805858B (en) Method and device for continuously deploying software developed by scripting language
CN114610366A (en) A differential package upgrade method, system, intelligent electronic device and storage medium
CN113138975A (en) Data migration method and device
CN110119279B (en) Application and upgrading method and device thereof
CN107704278A (en) Application upgrade method and apparatus
CN111258605A (en) Universal upgrading method and device for channel client, computer equipment and storage medium
CN113765983B (en) A site service deployment method and device
CN114117280A (en) Page static resource using method and device, terminal equipment and storage medium
CN112068848B (en) A method and device for managing software versions

Legal Events

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

Application publication date: 20180216

RJ01 Rejection of invention patent application after publication