CN115480789A - Application program updating method and device - Google Patents
Application program updating method and device Download PDFInfo
- Publication number
- CN115480789A CN115480789A CN202110601661.XA CN202110601661A CN115480789A CN 115480789 A CN115480789 A CN 115480789A CN 202110601661 A CN202110601661 A CN 202110601661A CN 115480789 A CN115480789 A CN 115480789A
- Authority
- CN
- China
- Prior art keywords
- target
- installation package
- package
- identification information
- version
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本公开涉及计算机技术领域,具体而言,涉及一种应用程序更新方法及装置。The present disclosure relates to the field of computer technology, in particular, to an application program updating method and device.
背景技术Background technique
在为游戏等应用程序进行差分更新时,服务端通常需要根据客户端当前的安装包,向客户端发送对应的差分包,客户端在接收到差分包后可以将差分包与当前的安装包合并,生成新的安装包,再用新生成的安装包进行更新。在服务器确定客户端当前的安装包时,需要获取客户端当前版本安装包的标识信息,再利用标识信息确定安装包。为了保证新生成的安装包能够正确更新应用程序,差分包需要与客户端当前的安装包精确匹配,因此,安装包的标识信息需要根据安装包中所包含的文件确定。When performing differential updates for applications such as games, the server usually needs to send the corresponding differential package to the client according to the current installation package of the client. After receiving the differential package, the client can merge the differential package with the current installation package. , generate a new installation package, and then update it with the newly generated installation package. When the server determines the current installation package of the client, it needs to obtain the identification information of the current version installation package of the client, and then use the identification information to determine the installation package. In order to ensure that the newly generated installation package can correctly update the application program, the differential package needs to exactly match the current installation package of the client. Therefore, the identification information of the installation package needs to be determined according to the files contained in the installation package.
通常,可以计算安装包中各个文件的消息摘要算法(Message-Digest Algorithm,MD5)值,再根据每个文件的MD5值生成安装包的标识信息。然而,游戏等大型应用程序的安装包通常包含大量的文件,计算每个文件的MD5值会消耗大量的时间,效率较低。Usually, the message digest algorithm (Message-Digest Algorithm, MD5) value of each file in the installation package can be calculated, and then the identification information of the installation package is generated according to the MD5 value of each file. However, the installation package of a large-scale application such as a game usually contains a large number of files, and calculating the MD5 value of each file will consume a lot of time, and the efficiency is low.
发明内容Contents of the invention
本公开实施例至少提供一种应用程序更新方法及装置。Embodiments of the present disclosure at least provide an application update method and device.
第一方面,本公开实施例提供了一种应用程序更新方法,包括:In a first aspect, an embodiment of the present disclosure provides a method for updating an application program, including:
基于目标应用程序的当前版本安装包的签名信息的存储路径,获取该存储路径下的第一目标数据;所述第一目标数据包括所述当前版本安装包的签名信息以及渠道信息;Based on the storage path of the signature information of the current version installation package of the target application, the first target data under the storage path is obtained; the first target data includes the signature information and channel information of the current version installation package;
基于所述第一目标数据,生成所述当前版本安装包对应的目标标识信息;Based on the first target data, generate target identification information corresponding to the current version installation package;
在存在更新需求的情况下,根据所述目标标识信息向服务器发送差分包获取请求,所述差分包获取请求中携带所述目标标识信息,并接收所述服务器基于所述目标标识信息反馈的目标差分包;When there is an update requirement, send a differential packet acquisition request to the server according to the target identification information, the differential packet acquisition request carries the target identification information, and receive the target information fed back by the server based on the target identification information differential package;
基于所述目标差分包以及所述当前版本安装包,更新所述目标应用程序。The target application program is updated based on the target differential package and the current version installation package.
一种可选的实施方式中,所述基于目标应用程序的当前版本安装包的签名信息的存储路径,获取该存储路径下的第一目标数据,包括:In an optional implementation manner, the acquisition of the first target data under the storage path based on the storage path of the signature information of the current version installation package of the target application program includes:
基于所述当前版本安装包的签名版本,以及多个签名版本分别对应的签名信息的存储路径,确定所述当前版本安装包对应的目标存储路径;Based on the signature version of the current version installation package and the storage paths of the signature information corresponding to the multiple signature versions, determine the target storage path corresponding to the current version installation package;
获取所述目标存储路径下的全量数据,并将获取到的全量数据作为所述第一目标数据。Acquire the full amount of data under the target storage path, and use the acquired full amount of data as the first target data.
一种可选的实施方式中,所述基于所述第一目标数据,生成所述当前版本安装包对应的目标标识信息,包括:In an optional implementation manner, the generating the target identification information corresponding to the installation package of the current version based on the first target data includes:
按照预设的唯一标识计算算法,对所述第一目标数据进行计算处理,生成所述第一目标数据的唯一标识;Perform calculation processing on the first target data according to a preset unique identifier calculation algorithm to generate a unique identifier of the first target data;
将所述唯一标识作为所述当前版本安装包对应的目标标识信息。The unique identifier is used as the target identifier information corresponding to the installation package of the current version.
一种可选的实施方式中,所述基于所述目标差分包以及所述当前版本安装包,更新所述目标应用程序,包括:In an optional implementation manner, the updating the target application program based on the target differential package and the current version installation package includes:
基于所述目标差分包,对所述当前版本安装包进行更新,生成所述目标应用程序的目标版本安装包;Based on the target differential package, updating the current version installation package to generate a target version installation package of the target application;
利用目标版本安装包,重新安装所述目标应用程序,得到更新后的所述目标应用程序。The target application program is reinstalled by using the target version installation package to obtain the updated target application program.
第二方面,本公开实施例提供了另一种应用程序更新方法,包括:In the second aspect, the embodiment of the present disclosure provides another method for updating an application program, including:
接收客户端发送的差分包获取请求,所述差分包获取请求携带有待更新版本的安装包对应的标识信息;receiving a differential packet acquisition request sent by the client, where the differential packet acquisition request carries identification information corresponding to the installation package to be updated;
根据所述安装包对应的标识信息,从预先建立的映射关系表中确定与所述安装包对应的标识信息唯一对应的目标差分包,并将所述目标差分包发送至所述客户端,以使所述客户端利用所述目标差分包更新目标应用程序;其中,所述映射关系表根据至少一个待更新版本的安装包的签名信息的存储路径下的第二目标数据,以及所述至少一个待更新版本的安装包对应的差分包生成;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息。According to the identification information corresponding to the installation package, determine from a pre-established mapping relationship table a target differential package uniquely corresponding to the identification information corresponding to the installation package, and send the target differential package to the client, to Make the client use the target differential package to update the target application program; wherein, the mapping relationship table is based on the second target data under the storage path of at least one signature information of the installation package of the version to be updated, and the at least one A differential package corresponding to the installation package of the version to be updated is generated; the second target data includes signature information and channel information of the installation package of the version to be updated.
一种可选的实施方式中,通过以下步骤生成所述映射关系表:In an optional implementation manner, the mapping relationship table is generated through the following steps:
获取所述至少一个待更新版本的安装包与目标版本的安装包之间的差分包;Acquiring the differential package between the at least one installation package of the version to be updated and the installation package of the target version;
针对所述至少一个待更新版本下的安装包,获取所述待更新版本的安装包中,在签名信息的存储路径下的第二目标数据;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息;For the installation package under the at least one version to be updated, obtain the second target data under the storage path of the signature information in the installation package of the version to be updated; the second target data includes the Signature information and channel information of the installation package;
基于所述第二目标数据,生成所述待更新版本的安装包对应的标识信息;Based on the second target data, generating identification information corresponding to the installation package of the version to be updated;
基于所述安装包对应的标识信息,以及所述安装包对应的差分包,生成所述差分包与所述标识信息之间的映射关系。Based on the identification information corresponding to the installation package and the difference package corresponding to the installation package, a mapping relationship between the difference package and the identification information is generated.
一种可选的实施方式中,通过以下步骤生成所述差分包:In an optional implementation manner, the differential packet is generated through the following steps:
基于所述至少一个待更新版本下的安装包,以及所述目标应用程序的目标版本安装包,分别生成所述至少一个待更新版本下的安装包对应的差分包;所述待更新版本的版本低于所述目标版本安装包对应的目标版本。Based on the at least one installation package under the version to be updated and the target version installation package of the target application, respectively generate a differential package corresponding to the at least one installation package under the version to be updated; the version of the version to be updated The target version corresponding to the installation package is lower than the target version.
第三方面,本公开实施例还提供一种应用程序更新装置,包括:In a third aspect, an embodiment of the present disclosure further provides an application update device, including:
获取模块,用于基于目标应用程序的当前版本安装包的签名信息的存储路径,获取该存储路径下的第一目标数据;所述第一目标数据包括所述当前版本安装包的签名信息以及渠道信息;An acquisition module, configured to acquire the first target data under the storage path based on the storage path of the signature information of the current version installation package of the target application; the first target data includes the signature information and the channel of the current version installation package information;
第一生成模块,用于基于所述第一目标数据,生成所述当前版本安装包对应的目标标识信息;A first generating module, configured to generate target identification information corresponding to the current version installation package based on the first target data;
第一发送模块,用于在存在更新需求的情况下,根据所述目标标识信息向服务器发送差分包获取请求,所述差分包获取请求中携带所述目标标识信息,并接收所述服务器基于所述目标标识信息反馈的目标差分包;The first sending module is configured to send a differential packet acquisition request to the server according to the target identification information when there is an update requirement, the differential packet acquisition request carries the target identification information, and receives the request from the server based on the target identification information. The target difference package of the target identification information feedback;
更新模块,用于基于所述目标差分包以及所述当前版本安装包,更新所述目标应用程序。An update module, configured to update the target application program based on the target differential package and the current version installation package.
一种可选的实施方式中,所述获取模块具体用于:In an optional implementation manner, the acquisition module is specifically used for:
基于所述当前版本安装包的签名版本,以及多个签名版本分别对应的签名信息的存储路径,确定所述当前版本安装包对应的目标存储路径;Based on the signature version of the current version installation package and the storage paths of the signature information corresponding to the multiple signature versions, determine the target storage path corresponding to the current version installation package;
获取所述目标存储路径下的全量数据,并将获取到的全量数据作为所述第一目标数据。Acquire the full amount of data under the target storage path, and use the acquired full amount of data as the first target data.
一种可选的实施方式中,所述第一生成模块具体用于:In an optional implementation manner, the first generation module is specifically configured to:
按照预设的唯一标识计算算法,对所述第一目标数据进行计算处理,生成所述第一目标数据的唯一标识;Perform calculation processing on the first target data according to a preset unique identifier calculation algorithm to generate a unique identifier of the first target data;
将所述唯一标识作为所述当前版本安装包对应的目标标识信息。The unique identifier is used as the target identifier information corresponding to the installation package of the current version.
一种可选的实施方式中,所述更新模块具体用于:In an optional implementation manner, the update module is specifically used for:
基于所述目标差分包,对所述当前版本安装包进行更新,生成所述目标应用程序的目标版本安装包;Based on the target differential package, updating the current version installation package to generate a target version installation package of the target application;
利用目标版本安装包,重新安装所述目标应用程序,得到更新后的所述目标应用程序。The target application program is reinstalled by using the target version installation package to obtain the updated target application program.
第四方面,本公开实施例还提供另一种应用程序更新装置,包括:In a fourth aspect, the embodiment of the present disclosure also provides another application program updating apparatus, including:
接收模块,用于接收客户端发送的差分包获取请求,所述差分包获取请求携带有待更新版本的安装包对应的标识信息;A receiving module, configured to receive a differential packet acquisition request sent by the client, where the differential packet acquisition request carries identification information corresponding to the installation package to be updated;
第二发送模块,用于根据所述安装包对应的标识信息,从预先建立的映射关系表中确定与所述安装包对应的标识信息唯一对应的目标差分包,并将所述目标差分包发送至所述客户端;其中,所述映射关系表根据至少一个待更新版本的安装包的签名信息的存储路径下的第二目标数据,以及所述至少一个待更新版本的安装包对应的差分包生成;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息。The second sending module is configured to, according to the identification information corresponding to the installation package, determine from a pre-established mapping relationship table a target differential package uniquely corresponding to the identification information corresponding to the installation package, and send the target differential package To the client; wherein, the mapping relationship table is based on the second target data under the storage path of the signature information of at least one installation package of the version to be updated, and the differential package corresponding to the installation package of the at least one version of the installation package to be updated Generate; the second target data includes signature information and channel information of the installation package of the version to be updated.
一种可选的实施方式中,所述装置还包括第二生成模块,用于:In an optional implementation manner, the device further includes a second generation module, configured to:
获取所述至少一个待更新版本的安装包与目标版本的安装包之间的差分包;Acquiring the differential package between the at least one installation package of the version to be updated and the installation package of the target version;
针对所述至少一个待更新版本下的安装包,获取所述待更新版本的安装包中,在签名信息的存储路径下的第二目标数据;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息;For the installation package under the at least one version to be updated, obtain the second target data under the storage path of the signature information in the installation package of the version to be updated; the second target data includes the Signature information and channel information of the installation package;
基于所述第二目标数据,生成所述待更新版本的安装包对应的标识信息;Based on the second target data, generating identification information corresponding to the installation package of the version to be updated;
基于所述安装包对应的标识信息,以及所述安装包对应的差分包,生成所述映射关系表。The mapping relationship table is generated based on the identification information corresponding to the installation package and the differential package corresponding to the installation package.
一种可选的实施方式中,所述装置还包括第三生成模块,用于:In an optional implementation manner, the device further includes a third generation module, configured to:
基于所述至少一个待更新版本下的安装包,以及所述目标应用程序的目标版本安装包,分别生成所述至少一个待更新版本下的安装包对应的差分包;所述待更新版本的版本低于所述目标版本安装包对应的目标版本。Based on the at least one installation package under the version to be updated and the target version installation package of the target application, respectively generate a differential package corresponding to the at least one installation package under the version to be updated; the version of the version to be updated The target version corresponding to the installation package is lower than the target version.
第五方面,本公开实施例还提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行上述应用程序更新方法中的步骤。In the fifth aspect, an embodiment of the present disclosure further provides an electronic device, including: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processing The processor communicates with the memory through a bus, and when the machine-readable instructions are executed by the processor, the steps in the above-mentioned application program updating method are executed.
第六方面,本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述应用程序更新方法中的步骤。In a sixth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps in the above method for updating an application program are executed.
本公开实施例提供的应用程序更新方法及装置,基于目标应用程序的当前版本安装包的签名信息的存储路径,获取该存储路径下的第一目标数据;所述第一目标数据包括所述当前版本安装包的签名信息以及渠道信息;基于所述第一目标数据,生成所述当前版本安装包对应的目标标识信息;在存在更新需求的情况下,根据所述目标标识信息向服务器发送差分包获取请求,所述差分包获取请求中携带所述目标标识信息,并接收所述服务器基于所述目标标识信息反馈的目标差分包;基于所述目标差分包以及所述当前版本安装包,更新目标应用程序。本公开实施例通过基于签名路径下的第一目标数据生成安装包对应的标识信息,由于第一目标数据中包括渠道信息以及签名信息,签名信息本身是对安装包的初始文件的唯一标识,而渠道信息则属于安装包被渠道定制化后的信息,使得根据第一目标数据生成的标识信息能够同时表征当前安装包的签名部分和非签名部分,起到对当前安装包整体进行唯一标识的作用,并且,由于第一目标数据的存储空间占用量远小于整个安装包,在不需要计算所有文件的MD5值的情况下,确定标识信息的速度得到提高,使服务器能够快速、精确的匹配安装包对应的差分包,效率较高。The application update method and device provided by the embodiments of the present disclosure obtain the first target data under the storage path based on the storage path of the signature information of the current version installation package of the target application; the first target data includes the current Signature information and channel information of the version installation package; based on the first target data, generate target identification information corresponding to the current version installation package; in the case of an update requirement, send a differential package to the server according to the target identification information An acquisition request, wherein the differential package acquisition request carries the target identification information, and receives the target differential package fed back by the server based on the target identification information; based on the target differential package and the current version installation package, update the target application. In the embodiment of the present disclosure, the identification information corresponding to the installation package is generated based on the first target data under the signature path. Since the first target data includes channel information and signature information, the signature information itself is the unique identification of the initial file of the installation package, and Channel information belongs to the information after the installation package is customized by the channel, so that the identification information generated according to the first target data can simultaneously represent the signature part and the non-signature part of the current installation package, and play a role in uniquely identifying the current installation package as a whole , and, since the storage space occupied by the first target data is much smaller than that of the entire installation package, the speed of determining the identification information is improved without calculating the MD5 values of all files, so that the server can quickly and accurately match the installation package The corresponding differential package is more efficient.
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present disclosure more clearly, the following will briefly introduce the accompanying drawings used in the embodiments. The accompanying drawings here are incorporated into the specification and constitute a part of the specification. The drawings show the embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as limiting the scope. For those skilled in the art, they can also make From these drawings other related drawings are obtained.
图1示出了本公开实施例所提供的一种应用程序更新方法的流程图;FIG. 1 shows a flow chart of an application update method provided by an embodiment of the present disclosure;
图2示出了本公开实施例所提供的另一种应用程序更新方法的流程图;FIG. 2 shows a flow chart of another method for updating an application provided by an embodiment of the present disclosure;
图3示出了本公开实施例所提供的一种应用程序更新装置的示意图;FIG. 3 shows a schematic diagram of an application updating device provided by an embodiment of the present disclosure;
图4示出了本公开实施例所提供的另一种应用程序更新装置的示意图;FIG. 4 shows a schematic diagram of another application updating device provided by an embodiment of the present disclosure;
图5示出了本公开实施例所提供的一种电子设备的示意图;Fig. 5 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure;
图6示出了本公开实施例所提供的另一种电子设备的示意图。Fig. 6 shows a schematic diagram of another electronic device provided by an embodiment of the present disclosure.
具体实施方式detailed description
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only It is a part of the embodiments of the present disclosure, but not all of them. The components of the disclosed embodiments generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort shall fall within the protection scope of the present disclosure.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.
本文中术语“和/或”,仅仅是描述一种关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article only describes an association relationship, which means that there can be three kinds of relationships, for example, A and/or B can mean: there is A alone, A and B exist at the same time, and B exists alone. situation. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
经研究发现,在服务器在确定客户端当所需要的差分包时,通常利用安装包的标识信息识别客户端当前的安装包,为了保证新生成的安装包能够正确更新应用程序,差分包需要与客户端当前的安装包精确匹配,因此,安装包的标识信息需要根据安装包中所包含的文件确定。通常,可以计算安装包中各个文件的MD5值,再根据每个文件的MD5值生成安装包的标识信息。然而,游戏等大型应用程序的安装包通常包含大量的文件,计算每个文件的MD5值会消耗大量的时间,效率较低。After research, it is found that when the server determines the differential package needed by the client, it usually uses the identification information of the installation package to identify the current installation package of the client. In order to ensure that the newly generated installation package can update the application program correctly, the differential package needs to be shared with the Therefore, the identification information of the installation package needs to be determined according to the files contained in the installation package. Usually, the MD5 value of each file in the installation package can be calculated, and then the identification information of the installation package can be generated according to the MD5 value of each file. However, the installation package of a large-scale application such as a game usually contains a large number of files, and calculating the MD5 value of each file will consume a lot of time, and the efficiency is low.
基于上述研究,本公开提供了一种应用程序更新方法及装置,通过基于签名路径下的第一目标数据生成安装包对应的标识信息,由于第一目标数据中包括渠道信息以及签名信息,签名信息本身是对安装包的初始文件的唯一标识,而渠道信息则属于安装包被渠道定制化后的信息,使得根据第一目标数据生成的标识信息能够同时表征当前安装包的签名部分和非签名部分,起到对当前安装包整体进行唯一标识的作用,并且,由于第一目标数据的存储空间占用量远小于整个安装包,在不需要计算所有文件的MD5值的情况下,确定标识信息的速度得到提高,使服务器能够快速、精确的匹配安装包对应的差分包,效率较高。Based on the above research, this disclosure provides a method and device for updating an application program. The identification information corresponding to the installation package is generated based on the first target data under the signature path. Since the first target data includes channel information and signature information, the signature information It is the unique identification of the initial file of the installation package, and the channel information belongs to the information after the installation package is customized by the channel, so that the identification information generated according to the first target data can simultaneously represent the signature part and the non-signature part of the current installation package , to uniquely identify the current installation package as a whole, and since the storage space occupied by the first target data is much smaller than that of the entire installation package, the speed of determining the identification information does not need to calculate the MD5 values of all files It is improved, so that the server can quickly and accurately match the differential package corresponding to the installation package, and the efficiency is high.
参见图1所示,为本公开实施例提供的一种应用程序更新方法的流程图,所述方法的执行主体可以为客户端,该方法包括步骤S101~S104,其中:Referring to FIG. 1 , it is a flow chart of an application update method provided by an embodiment of the present disclosure. The subject of execution of the method may be a client, and the method includes steps S101 to S104, wherein:
S101、基于目标应用程序的当前版本安装包的签名信息的存储路径,获取该存储路径下的第一目标数据;所述第一目标数据包括所述当前版本安装包的签名信息以及渠道信息。S101. Based on the storage path of the signature information of the current version installation package of the target application, acquire first target data under the storage path; the first target data includes the signature information and channel information of the current version installation package.
该步骤中,客户端可以在检测到目标应用程序发布更新后,或接收到服务器发送的标识信息获取请求后,获取目标应用程序的当前版本安装包,并获取当前版本安装包的签名信息的存储路径下的第一目标数据。In this step, the client can obtain the current version installation package of the target application after detecting that the target application releases an update, or after receiving the identification information acquisition request sent by the server, and obtain the storage of the signature information of the current version installation package The first target data under the path.
其中,目标应用程序可以是运行在安卓系统下的应用程序,当前版本安装包的格式可以为apk格式,可以存储在客户端的预设目录下;签名信息的存储路径(签名路径)可以为当前版本安装包中的一个路径,该路径下可以存储有当前版本安装包的签名信息、渠道信息等。签名信息是安装包在发布时,基于安装包中各个文件以及预设的签名算法生成的,并在签名信息生成后将其添加进行安装包中的签名路径下,用于检验安装包中各个文件的安全性和完整性,防止安装包被篡改。签名信息的存储路径下除签名信息外,还可以包括安装包对应的渠道信息等。Wherein, the target application program can be the application program running under the Android system, and the format of the installation package of the current version can be the apk format, which can be stored in the preset directory of the client; the storage path (signature path) of the signature information can be the current version A path in the installation package, under which the signature information and channel information of the current version of the installation package can be stored. The signature information is generated based on each file in the installation package and the preset signature algorithm when the installation package is released, and is added to the signature path in the installation package after the signature information is generated to verify each file in the installation package The security and integrity of the installation package are prevented from being tampered with. In addition to the signature information, the storage path of the signature information may also include channel information corresponding to the installation package.
对于不同签名版本,在对安装包签名时使用的签名算法不同,其对应的签名路径也不同,可以当前版本安装包的签名版本,以及多个签名版本分别对应的签名信息的存储路径,确定所述当前版本安装包对应的目标存储路径,然后再获取所述目标存储路径下的全量数据,并将获取到的全量数据作为所述第一目标数据。For different signature versions, the signature algorithms used when signing the installation package are different, and the corresponding signature paths are also different. The signature version of the current version of the installation package and the storage paths of the signature information corresponding to multiple signature versions can be used to determine the signature. The target storage path corresponding to the installation package of the current version is described, and then the full amount of data under the target storage path is obtained, and the obtained full amount of data is used as the first target data.
S102、基于所述第一目标数据,生成所述当前版本安装包对应的目标标识信息。S102. Based on the first target data, generate target identification information corresponding to the current version installation package.
该步骤中,可以利用预设的唯一标识计算算法,对所述第一目标数据进行计算处理,生成所述第一目标数据的唯一标识,将所述唯一标识作为所述当前版本安装包对应的目标标识信息。具体的,可以提取第一目标数据在一个或多个维度的数据特征,按照标识生成算法对提取的数据特征进行处理,得到目标标识信息。In this step, the first target data can be calculated and processed by using a preset unique identifier calculation algorithm to generate a unique identifier of the first target data, and the unique identifier can be used as the corresponding identifier of the current version installation package. Target identification information. Specifically, data features of the first target data in one or more dimensions may be extracted, and the extracted data features may be processed according to an identification generation algorithm to obtain target identification information.
示例性的,数据特征可以是第一目标数据的MD5值或哈希值。Exemplarily, the data feature may be an MD5 value or a hash value of the first target data.
S103、在存在更新需求的情况下,根据所述目标标识信息向服务器发送差分包获取请求,所述差分包获取请求中携带所述目标标识信息,并接收所述服务器基于所述目标标识信息反馈的目标差分包。S103. When there is an update requirement, send a differential packet acquisition request to the server according to the target identification information, the differential packet acquisition request carries the target identification information, and receive feedback from the server based on the target identification information The target differential package.
该步骤中,在生成目标标识信息后,可以对更新需求进行检测,当存在更新需求时,可以向服务器发送差分包获取请求,差分包获取请求中携带有目标标识信息,服务器在接收到含有目标标识信息的差分包获取请求后可以确定与目标标识匹配的目标差分包,并将目标差分包反馈给终端设备。In this step, after the target identification information is generated, the update requirement can be detected. When there is an update requirement, a differential packet acquisition request can be sent to the server. The differential packet acquisition request carries the target identification information. After the differential packet acquisition request of the identification information, the target differential packet matching the target identifier can be determined, and the target differential packet can be fed back to the terminal device.
这里,更新需求可以为检测到比当前版本更高的安装包发布,也可以为检测到当前版本安装包存在缺陷等。Here, the update requirement may be the detection of a release of an installation package higher than the current version, or the detection of a defect in the current version of the installation package.
S104、基于所述目标差分包以及所述当前版本安装包,更新所述目标应用程序。S104. Update the target application program based on the target differential package and the current version installation package.
该步骤中,客户端可以基于所述目标差分包,对所述当前版本安装包进行更新,生成所述目标应用程序的目标版本安装包,具体的,可以将目标差分包与当前版本安装包合并,生成目标应用程序的与目标差分包对应的目标版本安装包,然后,可以利用目标版本安装包,对目标应用程序进行重新安装,实现目标应用程序的更新。In this step, the client may update the current version installation package based on the target differential package to generate the target version installation package of the target application, specifically, the target differential package may be merged with the current version installation package to generate a target version installation package of the target application program corresponding to the target differential package, and then, the target version installation package can be used to reinstall the target application program to implement an update of the target application program.
本公开实施例通过基于签名路径下的第一目标数据生成安装包对应的标识信息,不需要计算所有文件的MD5值,在标识信息能够完整地反映安装包中的文件的情况下,使服务器精确匹配安装包对应的差分包,效率较高。The embodiment of the present disclosure generates the identification information corresponding to the installation package based on the first target data under the signature path, without calculating the MD5 values of all files, and enables the server to accurately Match the differential package corresponding to the installation package, which is more efficient.
参见图2所示,为本公开实施例提供的另一种应用程序更新方法的流程图,所述方法的执行主体可以为服务器,该方法包括步骤S201~S203,其中:Referring to FIG. 2 , it is a flow chart of another method for updating an application program provided by an embodiment of the present disclosure. The subject of execution of the method may be a server, and the method includes steps S201 to S203, wherein:
S201、接收客户端发送的差分包获取请求,所述差分包获取请求携带有待更新版本的安装包对应的标识信息。S201. Receive a differential package acquisition request sent by a client, where the differential package acquisition request carries identification information corresponding to an installation package of a version to be updated.
该步骤中,服务器接收到客户端发送差分包获取请求,差分包获取请求中包含目标标识信息,目标标识信息可以为上述客户端基于前版本安装包的签名路径下的第一目标数据生成的,第一目标数据包括目标应用程序的当前版本安装包的签名信息以及渠道信息。In this step, the server receives a differential packet acquisition request sent by the client. The differential packet acquisition request includes target identification information. The target identification information may be generated by the above-mentioned client based on the first target data under the signature path of the previous version installation package. The first target data includes signature information and channel information of the current version installation package of the target application program.
S202、根据所述安装包对应的标识信息,从预先建立的映射关系表中确定与所述安装包对应的标识信息唯一对应的目标差分包,并将所述目标差分包发送所述至客户端,以使所述客户端利用所述目标差分包更新目标应用程序。S202. According to the identification information corresponding to the installation package, determine the target differential package uniquely corresponding to the identification information corresponding to the installation package from the pre-established mapping table, and send the target differential package to the client , so that the client uses the target differential package to update the target application program.
其中,所述映射关系表根据至少一个待更新版本的安装包的签名信息的存储路径下的第二目标数据,以及所述至少一个待更新版本的安装包对应的差分包生成;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息。Wherein, the mapping relationship table is generated according to the second target data under the storage path of the signature information of at least one installation package of the version to be updated, and the differential package corresponding to the at least one installation package of the version to be updated; the second The target data includes signature information and channel information of the installation package of the version to be updated.
该步骤中,服务器获取到目标标识信息之后,可以通过上述映射关系表确定对应的目标差分包,映射关系表能够反映差分包与标识信息之间的映射关系,并利用映射关系从多个差分包中筛选出目标标识信息对应的目标差分包。In this step, after the server obtains the target identification information, it can determine the corresponding target differential packet through the above-mentioned mapping relationship table. The mapping relationship table can reflect the mapping relationship between the differential Filter out the target differential package corresponding to the target identification information.
其中,差分包是基于目标应用程序在两个不同版本下的安装包得到的,由于不同客户端上安装的目标应用程序的渠道、版本都可能不同,要将不同版本的应用程序更新到目标版本,可以基于目标应用程序的至少一个待更新版本下的安装包,以及目标应用程序的目标版本安装包,分别确定各个待更新版本下的安装包与目标版本安装包之间的差异文件,并基于这些差异文件,生成各个待更新版本下的安装包对应的差分包。Among them, the differential package is obtained based on the installation packages of the target application in two different versions. Since the channel and version of the target application installed on different clients may be different, it is necessary to update the application of different versions to the target version , the difference files between the installation packages of each version to be updated and the installation package of the target version can be respectively determined based on at least one installation package of the target application program under the version to be updated, and the installation package of the target version of the target application program, and based on These differential files generate differential packages corresponding to the installation packages of each version to be updated.
具体的,上述映射关系表可以通过以下步骤生成:Specifically, the above mapping relationship table may be generated through the following steps:
获取所述至少一个待更新版本的安装包与目标版本的安装包之间的差分包;Acquiring the differential package between the at least one installation package of the version to be updated and the installation package of the target version;
针对所述至少一个待更新版本下的安装包,获取所述待更新版本的安装包中,在签名信息的存储路径下的第二目标数据;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息;For the installation package under the at least one version to be updated, obtain the second target data under the storage path of the signature information in the installation package of the version to be updated; the second target data includes the Signature information and channel information of the installation package;
基于所述第二目标数据,生成所述待更新版本的安装包对应的标识信息;Based on the second target data, generating identification information corresponding to the installation package of the version to be updated;
基于所述安装包对应的标识信息,以及所述安装包对应的差分包,生成所述映射关系表。The mapping relationship table is generated based on the identification information corresponding to the installation package and the differential package corresponding to the installation package.
其中,第二目标数据与第一目标数据都为对应的安装包中签名信息的存储路径下的数据,关于第二目标数据的描述可以参考上述关于第一目标数据的描述。Wherein, both the second target data and the first target data are data under the storage path of the signature information in the corresponding installation package, and the description about the second target data can refer to the above description about the first target data.
在获取到第二目标数据后,可以利用与生成目标标识信息相同的方式,生成第二目标数据对应的安装包的标识信息,并将安装包对应的差分包和对应的标识信息之间建立映射关系,得到上述差分包与标识信息之间的映射关系。After the second target data is obtained, the identification information of the installation package corresponding to the second target data can be generated in the same manner as the target identification information, and a mapping between the difference package corresponding to the installation package and the corresponding identification information can be established relationship to obtain the above-mentioned mapping relationship between the differential packet and the identification information.
由于上述目标标识信息的生成方式与上述待更新版本下的安装包的标识信息的生成方式相同,因此,若客户端的当前版本安装包与待更新版本下的安装包相同,则目标标识信息和待更新版本下的安装包对应的标识信息也相同,因此,利用待更新版本下的安装包的标识信息与差分包之间的映射关系,确定客户端的当前版本安装包与差分包之间的对应关系,从而筛选出当前版本安装包对应的目标差分包。Since the generation method of the above target identification information is the same as that of the identification information of the installation package under the version to be updated, if the installation package of the current version of the client is the same as the installation package of the version to be updated, the target identification information and the installation package to be updated The identification information corresponding to the installation package under the updated version is also the same, therefore, use the mapping relationship between the identification information of the installation package under the version to be updated and the differential package to determine the corresponding relationship between the current version installation package and the differential package of the client , so as to filter out the target differential package corresponding to the current version installation package.
在确定与安装包的标识信息唯一对应的目标差分包后,可以将目标差分包发送至客户端,使客户端基于目标差分包和当前版本安装包生成目标差分包对应的目标版本安装包,再利用目标版本安装包更新目标应用程序。After determining the target differential package uniquely corresponding to the identification information of the installation package, the target differential package can be sent to the client, so that the client generates a target version installation package corresponding to the target differential package based on the target differential package and the current version installation package, and then Update the target application with the target version installation package.
本公开实施例提供的应用程序更新方法,接收客户端发送的差分包获取请求,所述差分包获取请求携带有待更新版本的安装包对应的标识信息;然后,根据所述安装包对应的标识信息,从预先建立的映射关系表中确定与所述安装包对应的标识信息唯一对应的目标差分包,并将所述目标差分包发送至所述客户端,以使所述客户端利用所述目标差分包更新目标应用程序;其中,所述映射关系表根据至少一个待更新版本的安装包的签名信息的存储路径下的第二目标数据,以及所述至少一个待更新版本的安装包对应的差分包生成;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息。本公开实施例通过基于签名路径下的数据生成安装包对应的标识信息,并建立标识信息与差分包之间的映射关系,使服务器能够快速定位到客户端需要的差分包。The method for updating an application program provided by an embodiment of the present disclosure receives a differential packet acquisition request sent by a client, and the differential packet acquisition request carries identification information corresponding to an installation package to be updated; then, according to the identification information corresponding to the installation package , determining from a pre-established mapping relationship table a target differential package uniquely corresponding to the identification information corresponding to the installation package, and sending the target differential package to the client, so that the client uses the target The difference package updates the target application program; wherein, the mapping relationship table is based on the second target data under the storage path of the signature information of at least one installation package of the version to be updated, and the corresponding difference of the installation package of the at least one version of the installation package to be updated Package generation; the second target data includes signature information and channel information of the installation package of the version to be updated. In the embodiments of the present disclosure, identification information corresponding to the installation package is generated based on the data in the signature path, and a mapping relationship between the identification information and the differential package is established, so that the server can quickly locate the differential package required by the client.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.
基于同一发明构思,本公开实施例中还提供了与应用程序更新方法对应的应用程序更新装置,由于本公开实施例中的装置解决问题的原理与本公开实施例上述应用程序更新方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, the embodiments of the present disclosure also provide an application update device corresponding to the application update method. Since the problem-solving principle of the device in the embodiments of the present disclosure is similar to that of the above-mentioned application update method in the embodiments of the present disclosure, therefore For the implementation of the device, reference may be made to the implementation of the method, and repeated descriptions will not be repeated.
参照图3所示,为本公开实施例提供的一种应用程序更新装置的示意图,所述装置包括:Referring to FIG. 3 , it is a schematic diagram of an application update device provided by an embodiment of the present disclosure, and the device includes:
获取模块310,用于基于目标应用程序的当前版本安装包的签名信息的存储路径,获取该存储路径下的第一目标数据;所述第一目标数据包括所述当前版本安装包的签名信息以及渠道信息;The obtaining
第一生成模块320,用于基于所述第一目标数据,生成所述当前版本安装包对应的目标标识信息;The
第一发送模块330,用于在存在更新需求的情况下,根据所述目标标识信息向服务器发送差分包获取请求,所述差分包获取请求中携带所述目标标识信息,并接收所述服务器基于所述目标标识信息反馈的目标差分包;The
更新模块340,用于基于所述目标差分包以及所述当前版本安装包,更新所述目标应用程序。An
本公开实施例通过基于签名路径下的第一目标数据生成安装包对应的标识信息,不需要计算所有文件的MD5值,在标识信息能够完整地反映安装包中的文件的情况下,使服务器精确匹配安装包对应的差分包,效率较高。The embodiment of the present disclosure generates the identification information corresponding to the installation package based on the first target data under the signature path, without calculating the MD5 values of all files, and enables the server to accurately Match the differential package corresponding to the installation package, which is more efficient.
一种可选的实施方式中,所述获取模块310具体用于:In an optional implementation manner, the obtaining
基于所述当前版本安装包的签名版本,以及多个签名版本分别对应的签名信息的存储路径,确定所述当前版本安装包对应的目标存储路径;Based on the signature version of the current version installation package and the storage paths of the signature information corresponding to the multiple signature versions, determine the target storage path corresponding to the current version installation package;
获取所述目标存储路径下的全量数据,并将获取到的全量数据作为所述第一目标数据。Acquire the full amount of data under the target storage path, and use the acquired full amount of data as the first target data.
一种可选的实施方式中,所述第一生成模块320具体用于:In an optional implementation manner, the
按照预设的唯一标识计算算法,对所述第一目标数据进行计算处理,生成所述第一目标数据的唯一标识;Perform calculation processing on the first target data according to a preset unique identifier calculation algorithm to generate a unique identifier of the first target data;
将所述唯一标识作为所述当前版本安装包对应的目标标识信息。The unique identifier is used as the target identifier information corresponding to the installation package of the current version.
一种可选的实施方式中,所述更新模块340具体用于:In an optional implementation manner, the
基于所述目标差分包,对所述当前版本安装包进行更新,生成所述目标应用程序的目标版本安装包;Based on the target differential package, updating the current version installation package to generate a target version installation package of the target application;
利用目标版本安装包,重新安装所述目标应用程序,得到更新后的所述目标应用程序。The target application program is reinstalled by using the target version installation package to obtain the updated target application program.
参照图4所示,为本公开实施例提供的另一种应用程序更新装置的示意图,所述装置包括:Referring to FIG. 4 , which is a schematic diagram of another application program updating device provided by an embodiment of the present disclosure, the device includes:
接收模块410,用于接收客户端发送的差分包获取请求,所述差分包获取请求携带有待更新版本的安装包对应的标识信息;The receiving
第二发送模块420,用于根据所述安装包对应的标识信息,从预先建立的映射关系表中确定与所述安装包对应的标识信息唯一对应的目标差分包,并将所述目标差分包发送至所述客户端;其中,所述映射关系表根据至少一个待更新版本的安装包的签名信息的存储路径下的第二目标数据,以及所述至少一个待更新版本的安装包对应的差分包生成;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息。The
一种可选的实施方式中,所述装置还包括第二生成模块,用于:In an optional implementation manner, the device further includes a second generation module, configured to:
获取所述至少一个待更新版本的安装包与目标版本的安装包之间的差分包;Acquiring the differential package between the at least one installation package of the version to be updated and the installation package of the target version;
针对所述至少一个待更新版本下的安装包,获取所述待更新版本的安装包中,在签名信息的存储路径下的第二目标数据;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息;For the installation package under the at least one version to be updated, obtain the second target data under the storage path of the signature information in the installation package of the version to be updated; the second target data includes the Signature information and channel information of the installation package;
基于所述第二目标数据,生成所述待更新版本的安装包对应的标识信息;Based on the second target data, generating identification information corresponding to the installation package of the version to be updated;
基于所述安装包对应的标识信息,以及所述安装包对应的差分包,生成所述映射关系表。The mapping relationship table is generated based on the identification information corresponding to the installation package and the differential package corresponding to the installation package.
一种可选的实施方式中,所述装置还包括第三生成模块,用于:In an optional implementation manner, the device further includes a third generation module, configured to:
基于所述至少一个待更新版本下的安装包,以及所述目标应用程序的目标版本安装包,分别生成所述至少一个待更新版本下的安装包对应的差分包;所述待更新版本的版本低于所述目标版本安装包对应的目标版本。Based on the at least one installation package under the version to be updated and the target version installation package of the target application, respectively generate a differential package corresponding to the at least one installation package under the version to be updated; the version of the version to be updated The target version corresponding to the installation package is lower than the target version.
关于装置中的各模块的处理流程、以及各模块之间的交互流程的描述可以参照上述方法实施例中的相关说明,这里不再详述。For the description of the processing flow of each module in the device and the interaction flow between the modules, reference may be made to the relevant description in the above method embodiment, and details will not be described here.
对应于图1中的应用程序更新方法,本公开实施例还提供了一种电子设备500,如图5所示,为本公开实施例提供的电子设备500结构示意图,包括:Corresponding to the application update method in FIG. 1 , an embodiment of the present disclosure also provides an electronic device 500 , as shown in FIG. 5 , which is a schematic structural diagram of the electronic device 500 provided by the embodiment of the present disclosure, including:
处理器51、存储器52、和总线53;存储器52用于存储执行指令,包括内存521和外部存储器522;这里的内存521也称内存储器,用于暂时存放处理器51中的运算数据,以及与硬盘等外部存储器522交换的数据,处理器51通过内存521与外部存储器522进行数据交换,当所述电子设备500运行时,所述处理器51与所述存储器52之间通过总线53通信,使得所述处理器51执行以下指令:
基于目标应用程序的当前版本安装包的签名信息的存储路径,获取该存储路径下的第一目标数据;所述第一目标数据包括所述当前版本安装包的签名信息以及渠道信息;Based on the storage path of the signature information of the current version installation package of the target application, the first target data under the storage path is obtained; the first target data includes the signature information and channel information of the current version installation package;
基于所述第一目标数据,生成所述当前版本安装包对应的目标标识信息;Based on the first target data, generate target identification information corresponding to the current version installation package;
在存在更新需求的情况下,根据所述目标标识信息向服务器发送差分包获取请求,所述差分包获取请求中携带所述目标标识信息,并接收所述服务器基于所述目标标识信息反馈的目标差分包;When there is an update requirement, send a differential packet acquisition request to the server according to the target identification information, the differential packet acquisition request carries the target identification information, and receive the target information fed back by the server based on the target identification information differential package;
基于所述目标差分包以及所述当前版本安装包,更新所述目标应用程序。The target application program is updated based on the target differential package and the current version installation package.
对应于图2中的应用程序更新方法,本公开实施例还提供了另一种电子设备600,如图6所示,为本公开实施例提供的电子设备600结构示意图,包括:Corresponding to the application update method in FIG. 2, the embodiment of the present disclosure also provides another electronic device 600, as shown in FIG. 6, which is a schematic structural diagram of the electronic device 600 provided in the embodiment of the present disclosure, including:
处理器61、存储器62、和总线63;存储器62用于存储执行指令,包括内存621和外部存储器622;这里的内存621也称内存储器,用于暂时存放处理器61中的运算数据,以及与硬盘等外部存储器622交换的数据,处理器61通过内存621与外部存储器622进行数据交换,当所述电子设备600运行时,所述处理器61与所述存储器62之间通过总线63通信,使得所述处理器61执行以下指令:
接收客户端发送的目标应用程序的目标标识信息;所述目标标识信息是基于所述目标应用程序的当前版本安装包的签名路径下的第一目标数据生成的;所述第一目标数据包括所述目标应用程序的当前版本安装包的签名信息以及渠道信息;receiving the target identification information of the target application sent by the client; the target identification information is generated based on the first target data under the signature path of the current version installation package of the target application; the first target data includes the Describe the signature information and channel information of the current version installation package of the target application;
接收客户端发送的差分包获取请求,所述差分包获取请求携带有待更新版本的安装包对应的标识信息;receiving a differential packet acquisition request sent by the client, where the differential packet acquisition request carries identification information corresponding to the installation package to be updated;
根据所述安装包对应的标识信息,从预先建立的映射关系表中确定与所述安装包对应的标识信息唯一对应的目标差分包,并将所述目标差分包发送至所述客户端,以使所述客户端利用所述目标差分包更新目标应用程序;其中,所述映射关系表根据至少一个待更新版本的安装包的签名信息的存储路径下的第二目标数据,以及所述至少一个待更新版本的安装包对应的差分包生成;所述第二目标数据包括所述待更新版本的安装包的签名信息以及渠道信息。According to the identification information corresponding to the installation package, determine from a pre-established mapping relationship table a target differential package uniquely corresponding to the identification information corresponding to the installation package, and send the target differential package to the client, to Make the client use the target differential package to update the target application program; wherein, the mapping relationship table is based on the second target data under the storage path of at least one signature information of the installation package of the version to be updated, and the at least one A differential package corresponding to the installation package of the version to be updated is generated; the second target data includes signature information and channel information of the installation package of the version to be updated.
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的应用程序更新方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。Embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the steps of the application program updating method described in the foregoing method embodiments are executed. Wherein, the storage medium may be a volatile or non-volatile computer-readable storage medium.
本公开实施例还提供一种计算机程序产品,该计算机程序产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的应用程序更新方法的步骤,具体可参见上述方法实施例,在此不再赘述。Embodiments of the present disclosure also provide a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the method for updating an application program described in the method embodiment above. For details, please refer to the above-mentioned The method embodiment will not be repeated here.
其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。Wherein, the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium. In another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the foregoing method embodiment, and details are not repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, and other media that can store program codes.
最后应说明的是:以上所述实施例,仅为本公开的具体实施方式,用以说明本公开的技术方案,而非对其限制,本公开的保护范围并不局限于此,尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本公开实施例技术方案的精神和范围,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that: the above-mentioned embodiments are only specific implementations of the present disclosure, and are used to illustrate the technical solutions of the present disclosure, rather than limit them, and the protection scope of the present disclosure is not limited thereto, although referring to the aforementioned The embodiments have described the present disclosure in detail, and those skilled in the art should understand that any person familiar with the technical field can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present disclosure Changes can be easily imagined, or equivalent replacements can be made to some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in this disclosure. within the scope of protection. Therefore, the protection scope of the present disclosure should be defined by the protection scope of the claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110601661.XA CN115480789A (en) | 2021-05-31 | 2021-05-31 | Application program updating method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110601661.XA CN115480789A (en) | 2021-05-31 | 2021-05-31 | Application program updating method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115480789A true CN115480789A (en) | 2022-12-16 |
Family
ID=84419166
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110601661.XA Pending CN115480789A (en) | 2021-05-31 | 2021-05-31 | Application program updating method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115480789A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024217140A1 (en) * | 2023-04-20 | 2024-10-24 | 华为技术有限公司 | Application updating method, communication system, and electronic device |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104346184A (en) * | 2013-08-01 | 2015-02-11 | 中兴通讯股份有限公司 | Application packaging device and application packaging method |
| CN104657170A (en) * | 2013-11-25 | 2015-05-27 | 腾讯科技(上海)有限公司 | Data updating method, device and system |
| US20170346671A1 (en) * | 2014-11-06 | 2017-11-30 | Beijing Qihoo Techonology Company Limited | Method and system for sharing application, and application service platform |
| CN107465646A (en) * | 2016-06-02 | 2017-12-12 | 腾讯科技(深圳)有限公司 | One kind applies method for down loading, system and relevant device |
| CN107797808A (en) * | 2016-08-31 | 2018-03-13 | 腾讯科技(深圳)有限公司 | Application installation package processing method and processing device |
| WO2021097758A1 (en) * | 2019-11-21 | 2021-05-27 | 深圳市欢太科技有限公司 | Incremental package generation method, incremental package generation apparatus, and server |
-
2021
- 2021-05-31 CN CN202110601661.XA patent/CN115480789A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104346184A (en) * | 2013-08-01 | 2015-02-11 | 中兴通讯股份有限公司 | Application packaging device and application packaging method |
| CN104657170A (en) * | 2013-11-25 | 2015-05-27 | 腾讯科技(上海)有限公司 | Data updating method, device and system |
| US20170346671A1 (en) * | 2014-11-06 | 2017-11-30 | Beijing Qihoo Techonology Company Limited | Method and system for sharing application, and application service platform |
| CN107465646A (en) * | 2016-06-02 | 2017-12-12 | 腾讯科技(深圳)有限公司 | One kind applies method for down loading, system and relevant device |
| CN107797808A (en) * | 2016-08-31 | 2018-03-13 | 腾讯科技(深圳)有限公司 | Application installation package processing method and processing device |
| WO2021097758A1 (en) * | 2019-11-21 | 2021-05-27 | 深圳市欢太科技有限公司 | Incremental package generation method, incremental package generation apparatus, and server |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024217140A1 (en) * | 2023-04-20 | 2024-10-24 | 华为技术有限公司 | Application updating method, communication system, and electronic device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI737944B (en) | Block chain-based transaction execution method and device, and electronic equipment | |
| CN107577427B (en) | data migration method, device and storage medium for blockchain system | |
| CN111782275B (en) | Blockchain-based transaction processing methods and devices, electronic equipment | |
| CN108734028B (en) | Blockchain-based data management method, blockchain node and storage medium | |
| CN109584063B (en) | Transaction processing method and device based on block chain and electronic equipment | |
| CN109472696A (en) | asset transaction method, device, storage medium and computer equipment | |
| CN106575244B (en) | Patching process to ensure high availability of cloud applications | |
| CN108805570A (en) | Data processing method, device and storage medium | |
| CN110535639A (en) | Block chain assets disposition method and relevant device based on more asset models | |
| CN101308471B (en) | Method and device for data restoration | |
| CN111179086A (en) | Intelligent contract virtual machine based on WebAssembly | |
| CN113326059A (en) | Resource updating method, device and storage medium | |
| CN110825399B (en) | Deployment method and device of application program | |
| CN111026568A (en) | Data and task relation construction method and device, computer equipment and storage medium | |
| JP2024509486A (en) | Fixed data processing | |
| CN112579591B (en) | Data verification method, device, electronic equipment and computer readable storage medium | |
| CN114995860A (en) | Graphics processor firmware upgrade method and graphics processor | |
| CN109088914B (en) | Block generation method, blockchain ecosystem, and computer-readable storage medium | |
| CN115480789A (en) | Application program updating method and device | |
| CN108874425A (en) | Configuration file update method, device, baseboard management controller and storage medium | |
| CN108628728A (en) | Detection method and device | |
| JP2021135937A (en) | Information processing device and program startup method | |
| CN113806335A (en) | A method and device for data migration applied to blockchain | |
| CN116820554A (en) | Upgrading method and device of functional component, electronic equipment and storage medium | |
| US20240061857A1 (en) | Migration and validation of data from tabular structures to non-relational data stores |
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 | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing. Applicant after: Douyin Vision Co.,Ltd. Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing. Applicant before: Tiktok vision (Beijing) Co.,Ltd. Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing. Applicant after: Tiktok vision (Beijing) Co.,Ltd. Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing. Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd. |