An application program updating method and device

By acquiring the computing performance and network speed of electronic devices, estimating update time, and selecting appropriate data packets for application updates, the problem of low update efficiency in existing technologies is solved, achieving efficient and accurate application updates.

CN114064102BActive Publication Date: 2025-11-04ECARX (HUBEI) TECHCO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111470662.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-11-04
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

In existing technologies, during application updates, it is impossible to efficiently select the appropriate update method based on the computing performance and network speed of the electronic device, resulting in low update efficiency.

Method used

By acquiring the computing performance and network speed of electronic devices, the update time based on differential packets and installation packages is estimated, and smaller data packets are selected and sent for updates, ensuring that electronic devices can efficiently complete application updates.

Benefits of technology

It improves the efficiency of application updates, reduces update time, and enhances update accuracy and network resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064102B_ABST
    Figure CN114064102B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an application program updating method and device, and relate to the technical field of application software. The method comprises: obtaining a first computing power value and a first network speed of an electronic device; obtaining a size of a first difference package between an installation package of a target version of an application program to be updated and an installation package of a first version, and a first time consumption required by a server to merge the first difference package and the installation package of the first version; estimating a first representation value based on the first computing power value, the first network speed, a second computing power value, the size of the first difference package and the first time consumption; estimating a second representation value according to the first network speed and the size of the installation package of the target version; if the first representation value is greater than the second representation value, sending the installation package of the target version to the electronic device; and if the first representation value is not greater than the second representation value, sending the first difference package to the electronic device. The application program updating scheme provided by the embodiments of the present application can update the version of the application program installed on the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of application software, in particular to an application program updating method and device. BACKGROUND

[0002] In order to add new functions in the application program or repair problems in the application program during use, etc., the application program developers will continuously develop new versions of the above-mentioned application program. In this way, the electronic device installed with the above-mentioned application program can update the application program to the above-mentioned new version, so that the user can experience the new functions of the application program, or eliminate the problems in the use of the application program, and thus improve the use experience.

[0003] Therefore, an application program updating scheme is needed, so that the electronic device installed with the application program can update the version of the installed application program. SUMMARY

[0004] The purpose of the embodiment of the present application is to provide an application program updating method and device to update the version of the application program installed in the electronic device. The specific technical scheme is as follows:

[0005] In the first aspect, the embodiment of the present application provides a first application program updating method applied to a server, and the method comprises:

[0006] obtaining a first computing power value representing the computing performance of an electronic device and a first network speed of the electronic device, wherein the electronic device is installed with a first version of an application program to be updated;

[0007] obtaining the size of a first difference package between the installation package of the target version of the application program to be updated and the installation package of the first version, and the first time consumption required by the server to merge the first difference package and the installation package of the first version;

[0008] based on the first computing power value, the first network speed, a second computing power value representing the computing performance of the server, the size of the first difference package and the first time consumption, estimating a first representation value representing the time consumption required by the electronic device to update the application program to be updated based on the first difference package;

[0009] based on the first network speed and the size of the installation package of the target version, estimating a second representation value representing the time consumption required by the electronic device to update the application program to be updated based on the installation package of the target version;

[0010] if the first representation value is greater than the second representation value, sending the installation package of the target version to the electronic device, so that the electronic device updates the application program to be updated based on the installation package of the target version;

[0011] If the first characteristic value is not greater than the second characteristic value, the first differential package is sent to the electronic device, so that the electronic device updates the application to be updated based on the first differential package.

[0012] In one embodiment of the application, the first characteristic value representing the time consumption of the electronic device for updating the application to be updated based on the first differential package is estimated based on the first computing power value, the first network speed, a second computing power value representing the computing performance of the server, the size of the first differential package and the first time consumption, and the first characteristic value is determined by:

[0013] The second time consumption of the electronic device for downloading the first differential package is calculated based on the first network speed and the size of the first differential package.

[0014] The third time consumption of the electronic device for generating the installation package of the target version based on the first differential package and the installation package of the first version is calculated based on the first computing power value, the second computing power value and the first time consumption.

[0015] The sum of the second time consumption and the third time consumption is determined as the first characteristic value representing the time consumption of the electronic device for updating the application to be updated based on the first differential package.

[0016] In one embodiment of the application, the second time consumption of the electronic device for downloading the first differential package is calculated based on the first network speed and the size of the first differential package, and the calculation includes:

[0017] The second time consumption is calculated according to the following expression:

[0018]

[0019] Wherein, T1 represents the second time consumption, S1 represents the size of the first differential package, and V represents the first network speed.

[0020] In one embodiment of the application, the third time consumption of the electronic device for generating the installation package of the target version based on the first differential package and the installation package of the first version is calculated based on the first computing power value, the second computing power value and the first time consumption, and the calculation includes:

[0021] The third time consumption is calculated according to the following expression:

[0022]

[0023] Wherein, T2 represents the third time consumption, C1 represents the first computing power value, C2 represents the second computing power value, and T3 represents the first time consumption.

[0024] In one embodiment of the present application, the second characteristic value representing the time required for the electronic device to update the application to be updated based on the installation package of the target version is estimated according to the first network speed and the size of the installation package of the target version, and the method comprises the following steps:

[0025] The second characteristic value is calculated according to the following expression:

[0026]

[0027] Wherein, T4 represents the second characteristic value, S2 represents the size of the installation package of the target version, and V represents the first network speed.

[0028] In one embodiment of the present application, the size of the first differential package between the installation package of the target version of the application to be updated and the installation package of the first version, and the first time required for the server to merge the first differential package and the installation package of the first version are obtained, and the method comprises the following steps:

[0029] Among the stored historical differential packages, a first differential package corresponding to the first version is determined, wherein the historical differential package is a differential package generated by the server according to the installation package of the target version and the installation package of the historical version of the application to be updated;

[0030] The size of the determined first differential package is obtained, and the first time required for the server to merge the first differential package and the installation package of the first version is obtained.

[0031] In a second aspect, the embodiments of the present application also provide a second application updating method applied to an electronic device, and the method comprises the following steps:

[0032] A first computing power value representing the computing performance of the electronic device and a first network speed of the electronic device are obtained, wherein the electronic device is installed with a first version of an application to be updated;

[0033] The first computing power value, the first network speed and the information of the first version are sent to a server;

[0034] A first data package fed back by the server based on the first computing power value and the first network speed is obtained;

[0035] If the first data package is an installation package of a target version of the application to be updated, the application to be updated is updated based on the installation package of the target version;

[0036] If the first data package is a first differential package between the installation package of the target version and the installation package of the first version, the application to be updated is updated based on the first differential package and the installation package of the first version.

[0037] In a third aspect, the embodiments of the present application further provide a first application program updating device applied to a server, the device comprising:

[0038] a first obtaining module, configured to obtain a first computing power value representing a computing performance of an electronic device and a first network speed of the electronic device, wherein the electronic device is installed with a first version of an application program to be updated;

[0039] a second obtaining module, configured to obtain a size of a first differential package between an installation package of a target version of the application program to be updated and an installation package of the first version, and a first time consumption required by the server to combine the first differential package and the installation package of the first version;

[0040] a first estimating module, configured to estimate, based on the first computing power value, the first network speed, a second computing power value representing a computing performance of the server, the size of the first differential package and the first time consumption, a first representation value representing a time consumption required by the electronic device to update the application program to be updated based on the first differential package;

[0041] a second estimating module, configured to estimate, according to the first network speed and the size of the installation package of the target version, a second representation value representing a time consumption required by the electronic device to update the application program to be updated based on the installation package of the target version;

[0042] a first updating module, configured to send the installation package of the target version to the electronic device to enable the electronic device to update the application program to be updated based on the installation package of the target version, if the first representation value is greater than the second representation value;

[0043] a second updating module, configured to send the first differential package to the electronic device to enable the electronic device to update the application program to be updated based on the first differential package, if the first representation value is not greater than the second representation value.

[0044] In an embodiment of the present application, the first estimating module comprises:

[0045] a first calculating submodule, configured to calculate, according to the first network speed and the size of the first differential package, a second time consumption required by the electronic device to download the first differential package;

[0046] a second calculating submodule, configured to calculate, according to the first computing power value, the second computing power value and the first time consumption, a third time consumption required by the electronic device to generate the installation package of the target version based on the first differential package and the installation package of the first version;

[0047] The third calculating sub-module is configured to determine a sum of the second time consumption and the third time consumption as a first representation value representing a time consumption required by the electronic device to update the application program based on the first differential package.

[0048] In one embodiment of the present application, the first calculating sub-module is specifically configured to:

[0049] The second time consumption is calculated according to the following expression:

[0050]

[0051] Wherein, T1 represents the second time consumption, S1 represents the size of the first differential package, and V represents the first network speed.

[0052] In one embodiment of the present application, the second calculating sub-module is specifically configured to:

[0053] The third time consumption is calculated according to the following expression:

[0054]

[0055] Wherein, T2 represents the third time consumption, C1 represents the first computing power value, C2 represents the second computing power value, and T3 represents the first time consumption.

[0056] In one embodiment of the present application, the second estimating module is specifically configured to:

[0057] The second representation value is calculated according to the following expression:

[0058]

[0059] Wherein, T4 represents the second representation value, S2 represents the size of the installation package of the target version, and V represents the first network speed.

[0060] In one embodiment of the present application, the second obtaining module is specifically configured to:

[0061] Among the stored historical differential packages, a first differential package corresponding to the first version is determined, wherein the historical differential package is a differential package generated by the server according to the installation package of the target version and the installation package of the historical version of the application program to be updated;

[0062] The size of the determined first differential package is obtained, and the first time consumption required by the server to merge the first differential package and the installation package of the first version is obtained.

[0063] In a fourth aspect, embodiments of the present application further provide a second application program updating device applied to an electronic device, and the device comprises:

[0064] an information obtaining module, configured to obtain a first computing power value representing a computing performance of the electronic device and a first network speed of the electronic device, wherein the electronic device is installed with a first version of an application program to be updated;

[0065] an information sending module, configured to send information of the first computing power value, the first network speed and the first version to a server;

[0066] a data packet obtaining module, configured to obtain a first data packet fed back by the server based on the first computing power value and the first network speed;

[0067] a target updating module, configured to update the application program to be updated based on an installation package of a target version of the application program to be updated if the first data packet is the installation package of the target version;

[0068] a differential updating module, configured to update the application program to be updated based on the first differential packet and an installation package of the first version if the first data packet is a first differential packet between the installation package of the target version and the installation package of the first version.

[0069] In a fifth aspect, an embodiment of the present application further provides an electronic device as a server, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;

[0070] the memory is used for storing a computer program;

[0071] the processor is used for executing the program stored on the memory, and realizes the application program updating method steps in the first aspect.

[0072] In a sixth aspect, an embodiment of the present application further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;

[0073] the memory is used for storing a computer program;

[0074] the processor is used for executing the program stored on the memory, and realizes the application program updating method steps in the second aspect.

[0075] In a seventh aspect, an embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the application program updating method steps in the first aspect.

[0076] Embodiments of the present application have the following beneficial effects:

[0077] From the above, when the application program updating scheme provided by the embodiment of the present application is applied, the server can obtain the first computing power value, the first network speed, the size of the first differential package and the first time consumption, according to the above information, estimate the first representing value representing the time consumption required for the electronic device to update the application program based on the first differential package and the second representing value representing the time consumption required for the electronic device to update the application program based on the installation package of the target version, and send the data package corresponding to the smaller representing value of the two representing values to the electronic device, so that the electronic device can update the application program based on the sent data package. Moreover, since the representing value corresponding to the data package received by the electronic device is smaller, the time consumption of the electronic device in updating the application program is also shorter. Therefore, the application program updating scheme provided by the embodiment of the present application not only can realize the application program updating, but also has higher efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other embodiments can also be obtained by those skilled in the art according to these drawings.

[0079] Figure 1 The flowchart of the first application program updating method provided by the embodiment of the present application;

[0080] Figure 2 The flowchart of the second application program updating method provided by the embodiment of the present application;

[0081] Figure 3 The flowchart of the third application program updating method provided by the embodiment of the present application;

[0082] Figure 4 The flowchart of the fourth application program updating method provided by the embodiment of the present application;

[0083] Figure 5 The structural diagram of the first application program updating device provided by the embodiment of the present application;

[0084] Figure 6 The structural diagram of the second application program updating device provided by the embodiment of the present application;

[0085] Figure 7 The structural diagram of the third application program updating device provided by the embodiment of the present application;

[0086] Figure 8 The flowchart of the first electronic device provided by the embodiment of the present application;

[0087] Figure 9 The second flowchart of the electronic device is provided for the embodiment of the present application. DETAILED DESCRIPTION

[0088] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art based on the present application belong to the scope of protection of the present application.

[0089] Referring to Figure 1 , Figure 1 The first application program updating method is provided for the embodiment of the present application, and the above method is applied to a server and includes the following steps S101-S106.

[0090] Step S101: obtaining a first computing power value representing the computing performance of an electronic device and a first network speed of the electronic device.

[0091] The electronic device is installed with a first version of an application program to be updated.

[0092] The first computing power value is used to represent the computing performance of the electronic device. Since the computing performance of the electronic device is related to the amount of computing resources, the amount of computing resources of the electronic device can be used as the first computing power value. The amount of computing resources of the electronic device can include the amount of computing resources of each component in the electronic device, for example, the amount of computing resources of the electronic device can be the number of cores of the CPU in the electronic device, and can also be the speed of floating point operation of the electronic device, and the like.

[0093] In addition, since the application program updating usually mainly consumes the computing resources of the CPU in the electronic device, the amount of computing resources of the CPU in the electronic device can also be used as the first computing power value.

[0094] When calculating the amount of computing resources of the CPU, the number of cores of the CPU, the working frequency of the CPU, and the number of floating point operations of one core of the CPU in one clock cycle can be multiplied, and then the obtained result can be used as the amount of computing resources of the CPU.

[0095] The first network speed can be the current network speed of the electronic device in the network environment, and can also be the average network speed of the electronic device in the network environment for a period of time. The network environment of the electronic device can be the network environment for communication between the electronic device and the server.

[0096] In one embodiment of the present application, the electronic device can carry the first computing power value and the first network speed in a program update request of the application to be updated, and the server can obtain the first computing power value and the first network speed by analyzing the program update request after obtaining the program update request.

[0097] In another embodiment of the present application, the electronic device can directly send the first computing power value and the first network speed to the server. For example, the electronic device sends the first computing power value and the first network speed to the server before or after sending the program update request.

[0098] Step S102: obtaining a size of a first differential package between an installation package of a target version of the application to be updated and an installation package of a first version, and a first time consumption required for the server to merge the first differential package and the installation package of the first version.

[0099] The target version can be the latest version of the application to be updated, or another version with a release time later than the release time of the first version.

[0100] The first differential package is a data package containing difference information between the installation package of the target version and the installation package of the first version.

[0101] Since the first differential package contains difference information between the installation package of the target version and the installation package of the first version, merging the first differential package and the installation package of the first version can generate the installation package of the target version.

[0102] The first time consumption can be obtained by the server after obtaining the first differential package and the installation package of the first version.

[0103] Specifically, after performing the step S101, the server can first obtain the installation package of the target version and the installation package of the first version, generate the first differential package according to the two obtained installation packages, thereby obtaining the size of the first differential package, and then merge the generated first differential package and the installation package of the first version, and record the time required for merging the first differential package and the installation package of the first version, wherein the recorded time is the first time consumption.

[0104] The generation of the first differential package can be realized by using a differential algorithm in the prior art, such as a binary differential algorithm.

[0105] When the binary differential algorithm is used to generate the first differential package, the installation package of the target version and the installation package of the first version can be compared to generate difference information between the two installation packages and position information of the difference information in the installation package of the target version, and then a data package containing the difference information and the position information is generated as the first differential package.

[0106] For example, if the installation package of the target version is a piece of code, the position information can represent the line number of the difference information in the piece of code.

[0107] The merging of the first difference package and the installation package of the first version can also be implemented by using the difference merging algorithm in the prior art.

[0108] The first time consumption can also be calculated in advance. Since the server can obtain the installation package of the target version and the installation packages of the historical versions before updating the application program, the server can generate the difference packages corresponding to the historical versions according to the installation package of the target version and the installation packages of the historical versions in advance, then merge the installation packages of the historical versions and the corresponding difference packages to restore the installation package of the target version, and record and store the time consumption required for merging the installation packages of the historical versions and the corresponding difference packages. Since the first version is one of the historical versions, the first time consumption can be obtained by searching for the time consumption corresponding to the first version in the time consumption stored by the server. Specifically, the time consumption corresponding to the first version can be obtained by searching for the time consumption corresponding to the first version in the time consumption stored by the server. Figure 2 The size of the first difference package and the first time consumption are obtained in steps S102A-S102B in the illustrated embodiment, which will not be described here.

[0109] Step S103: Based on the first computing power value, the first network speed, the second computing power value representing the computing performance of the server, the size of the first difference package and the first time consumption, a first representation value representing the time consumption required for the electronic device to update the application program to be updated based on the first difference package is estimated.

[0110] The second computing power value is used to represent the computing performance of the server, and is similar to the first computing power value. The computing resource amount of the server can also be used as the second computing power value. For example, the second computing power value can represent the number of cores of the CPU in the server, the speed of floating-point operation of the server or the computing resource amount of the CPU, and the like.

[0111] There are two implementation manners for obtaining the second computing power value:

[0112] In the first implementation manner, the computing performance or the computing resource amount of the server can be detected to obtain the second computing power value. For example, an application program for detecting the computing performance or the computing resource amount of the device is used to detect the server to obtain the second computing power value.

[0113] In the second implementation manner, a corresponding relationship between the device information and the computing power value of various devices can be obtained, and the computing power value corresponding to the device information of the server is searched as the second computing power value.

[0114] The device information of the device can be a device name, a device model, a device model number, or the like.

[0115] In addition, the second computing power value can also be obtained in other manners, which are not listed here.

[0116] The total time required for the electronic device to update the application program based on the first difference package can be considered as the sum of the time required for the electronic device to download the first difference package, the time required for the electronic device to merge the first difference package and the installation package of the first version to generate an installation package of a target version, and the time required for the electronic device to update the application program based on the installation package of the target version.

[0117] For ease of understanding, the time required for the electronic device to download the first difference package is referred to as the second time, the time required for the electronic device to merge the first difference package and the installation package of the first version to generate an installation package of a target version is referred to as the third time, and the time required for the electronic device to update the application program based on the generated installation package of the target version is referred to as the fourth time.

[0118] Since the computing performance of the electronic device is usually different, the fourth time required for the electronic device to update the generated installation package of the target version is usually different, making it difficult to calculate the fourth time. However, the step of updating the application program based on the installation package of the target version is a necessary step for the electronic device to update the application program, so it can be considered that no matter which way the electronic device updates the application program, the time required to update the application program includes the fourth time.

[0119] In view of this, when calculating the time required for the electronic device to update the application program based on the first difference package, in one case, the fourth time can be considered to be constant, and the fourth time is preset to a certain value, for example, the fourth time is set to 10 seconds.

[0120] In one case, after the second time and the third time are calculated, the fourth time and the two calculated times are added to obtain a first representation value representing the time required for the electronic device to update the application program based on the first difference package.

[0121] In another case, the fourth time can be ignored, and the sum of the second time and the third time is directly determined as the first representation value.

[0122] Specifically, the specific implementation of calculating the second time and the third time can be respectively referred to steps S103A and S103B in the subsequent embodiments, which are not described here. Figure 2

[0123] ​Step S104: estimating a second representation value representing the total time consumption of updating the to-be-updated application by the electronic device based on the installation package of the target version according to the first network speed and the size of the installation package of the target version.

[0124] The total time consumption of updating the to-be-updated application by the electronic device based on the installation package of the target version can be considered to include the time consumption of downloading the installation package of the target version by the electronic device and the time consumption of updating the to-be-updated application by the electronic device based on the installation package of the target version, i.e., the fourth time consumption mentioned above, and the sum of the two time consumptions.

[0125] For the convenience of understanding, the time consumption of downloading the installation package of the target version by the electronic device is referred to as installation package downloading time consumption.

[0126] In this step, the fourth time consumption can also be preset to a certain value, and the certain value is the same as the certain value preset in step S103.

[0127] Based on the foregoing description, the second representation value can be calculated according to the following two cases.

[0128] In one case, after the time consumption of downloading the installation package of the target version by the electronic device is calculated, the calculated time consumption is added to the fourth time consumption, so as to obtain the second representation value representing the total time consumption of updating the to-be-updated application by the electronic device based on the installation package of the target version.

[0129] In another case, the time consumption of downloading the installation package of the target version by the electronic device can also be directly determined as the second representation value.

[0130] In one embodiment of the present application, the second representation value can be calculated according to the following expression:

[0131]

[0132] Wherein, T4 represents the second representation value, S2 represents the size of the installation package of the target version, and V represents the first network speed.

[0133] For example, if the size of the installation package of the target version is 120M and the first network speed is 3M / s, the second representation value is calculated to be 120 / 3=40s.

[0134] In addition, since the network speed of the electronic device usually changes over time in the actual process of downloading the installation package of the target version by the electronic device, it is difficult to accurately calculate the required time for the electronic device to download the installation package of the target version, and the second characteristic value calculated by the above formula is only the estimated time required by the server for the electronic device to download the installation package of the target version, and is used to represent the time required by the electronic device to update the application to be updated based on the installation package of the target version.

[0135] Step S105: If the first characteristic value is greater than the second characteristic value, send the installation package of the target version to the electronic device to enable the electronic device to update the application to be updated based on the installation package of the target version.

[0136] Specifically, if the first characteristic value is greater than the second characteristic value, it means that the time required by the electronic device to update the application to be updated based on the first differential package is greater than the time required by the electronic device to update the application to be updated based on the installation package of the target version. At this time, the server sends the installation package of the target version to the electronic device to enable the electronic device to update the application to be updated based on the installation package of the target version.

[0137] In an implementation manner, the server can read the installation package of the target version from the stored installation packages and send the read installation package to the electronic device.

[0138] At this time, the server can also send the identification information of the target version to the electronic device, so that the electronic device identifies the obtained installation package according to the identification information.

[0139] In another implementation manner, the server can also send the download link of the installation package of the target version to the electronic device, so that the electronic device downloads the installation package of the target version according to the obtained download link.

[0140] Step S106: If the first characteristic value is not greater than the second characteristic value, send the first differential package to the electronic device to enable the electronic device to update the application to be updated based on the first differential package.

[0141] Specifically, if the first characteristic value is not greater than the second characteristic value, it means that the time required by the electronic device to update the application to be updated based on the first differential package is not greater than the time required by the electronic device to update the application to be updated based on the installation package of the target version. At this time, the first differential package is sent to the electronic device to enable the electronic device to update the application to be updated based on the first differential package.

[0142] The same as step S105, the server can directly send the first differential package to the electronic device, or can send the download link of the first differential package to the electronic device.

[0143] It should be noted that if the first representation value is the same as the second representation value, it indicates that the time length required by the electronic device to update the to-be-updated application based on the first differential package is the same as the time length required by the electronic device to update the to-be-updated application based on the installation package of the target version. However, since the size of the first differential package is usually smaller than the size of the installation package of the target version, in order to save network resources, the first differential package can be selected to be sent to the electronic device.

[0144] As can be seen from the above, when the application program is updated by using the scheme provided in the embodiments of the present application, the server can obtain the first computing power value, the first network speed, the size of the first differential package and the first time consumption, estimate the first representation value representing the time consumption required by the electronic device to update the to-be-updated application based on the first differential package and the second representation value representing the time consumption required by the electronic device to update the to-be-updated application based on the installation package of the target version according to the above obtained information, and send the data package corresponding to the smaller representation value of the two representation values to the electronic device, so that the electronic device can update the to-be-updated application based on the sent data package. Moreover, since the representation value corresponding to the data package received by the electronic device is smaller, the time consumption of the electronic device to update the to-be-updated application is also shorter. Therefore, the application program updating scheme provided in the embodiments of the present application not only can update the application program, but also has high efficiency.

[0145] The specific implementation of obtaining the size of the first differential package and the first time consumption in step S102 will be described below.

[0146] In one embodiment of the present application, referring to Figure 2 , a flowchart of a second application program updating method is provided. Compared with the above-mentioned embodiment shown in Figure 1 , in the present embodiment, the above-mentioned step S102 can be implemented according to steps S102A-S102B.

[0147] Step S102A: determining the first differential package corresponding to the first version from the stored historical differential packages.

[0148] The historical differential package is a differential package generated by the server according to the installation package of the target version and the installation package of the historical version of the to-be-updated application.

[0149] Since the server usually stores installation packages of various historical versions of the application to be updated, when an installation package of a target version is published to the server, the server can generate historical differential packages in advance according to the installation package of the target version and the installation packages of the historical versions, and store the generated historical differential packages, wherein the server can generate a differential package corresponding to a historical version according to the installation package of the target version and the installation package of the historical version, thereby generating a corresponding relationship between the historical version and the differential package. Based on this, the first differential package corresponding to the first version can be determined according to the version information of the first version.

[0150] The version information of the first version can be version number of the first version, release time of the first version, or identification information of the first version, etc.

[0151] Step S102B: Obtain the size of the determined first differential package, and obtain the first time consumption required by the server to merge the first differential package and the installation package of the first version.

[0152] There are two cases for obtaining the size of the first differential package:

[0153] In one case, after determining the first differential package, the server can read the first differential package from the stored historical differential packages, and then detect the size of the first differential package, thereby obtaining the size of the first differential package.

[0154] In another case, after generating the historical differential packages in advance according to the installation package of the target version and the installation packages of the historical versions, the server can further detect the size of the historical differential packages, thereby obtaining and storing the size of the historical differential packages. In this way, after determining the first differential package, the size of the first differential package can be found from the stored size of the historical differential packages.

[0155] Similarly, there are two cases for obtaining the first time consumption:

[0156] In one case, the server can read the installation package of the first version from the stored installation packages, and merge the first differential package and the installation package of the first version, and record the merging time, thereby obtaining the first time consumption.

[0157] In another case, after generating the historical differential packages in advance, the server can further merge the historical differential packages and the installation packages of the historical versions, thereby obtaining and storing the merging time corresponding to each historical differential package. In this way, the size of the first differential package corresponding to the first version and the first time consumption required by the server to merge the first differential package and the installation package of the first version can be obtained according to the version information of the first version.

[0158] From the above, when the application program is updated by using the scheme provided by the embodiment of the application, the first differential package corresponding to the first version is determined in the stored historical differential packages, and the first differential package is not generated according to the installation package of the target version and the installation package of the first version, so that the size of the first differential package and the time of the first time consumption are shortened, and the efficiency of providing the application program update is improved.

[0159] When the update time consumption required for updating the application program by using different update modes is compared, the fourth time consumption is included in the update time consumption corresponding to different update modes, so that the fourth time consumption can be offset, and the fourth time consumption is not calculated when the update time consumption corresponding to different update modes is calculated. For this case, the specific embodiment of estimating the first characteristic value in step S103 is described below.

[0160] In an embodiment of the application, referring to Figure 3 , a flowchart of a third application program update method is provided. Compared with the embodiment shown in the foregoing Figure 1 , in the embodiment, the step S103 can be implemented according to the following steps S103A-S103C.

[0161] Step S103A: According to the first network speed and the size of the first differential package, the second time consumption of the electronic device for downloading the first differential package is calculated.

[0162] In an embodiment of the application, the second time consumption can be calculated according to the following expression:

[0163]

[0164] Wherein, T1 represents the second time consumption, S1 represents the size of the first differential package, and V represents the first network speed.

[0165] For example, if the size of the first differential package is 15M and the first network speed is 3M / s, the second time consumption is calculated as 15 / 3=5s.

[0166] As described in the foregoing embodiments, in the actual process of the electronic device downloading the first differential package, the network speed of the electronic device usually changes with time, and the second time consumption calculated by using the above formula is only the time consumption estimated by the server for the electronic device to download the first differential package.

[0167] Step S103B: According to the first computing power value, the second computing power value and the first time consumption, the third time consumption of the electronic device for generating the installation package of the target version according to the first differential package and the installation package of the first version is calculated.

[0168] The time consumption required for generating the installation package of the target version according to the first differential package and the installation package of the first version is generally related to the computing performance of the device, and the higher the computing performance of the device is, the shorter the required time consumption is. Therefore, it can be considered that the computing power value of the device is inversely proportional to the required time consumption, and the higher the computing power value is, the shorter the required time consumption is.

[0169] In view of this, the first time consumption is the time consumption required for the server to generate the installation package of the target version by merging the first differential package and the installation package of the first version based on the computing performance of the server, in other words, in the case that the computing power value of a device is a second computing power value, the device needs to consume a time of the first time consumption to generate the installation package of the target version according to the first differential package and the installation package of the first version, and the first computing power value is a computing power value representing the computing performance of the electronic device, and the computing power value of the device is inversely proportional to the required time consumption, therefore, the third time consumption can be calculated according to the first computing power value, the second computing power value and the first time consumption.

[0170] In an embodiment of the present application, the third time consumption can be calculated according to the following expression:

[0171]

[0172] Wherein, T2 represents the third time consumption, C1 represents the first computing power value, C2 represents the second computing power value, and T3 represents the first time consumption.

[0173] Step S103C: determining the sum of the second time consumption and the third time consumption as the first representation value representing the time consumption required for the electronic device to update the application to be updated based on the first differential package.

[0174] Since the fourth time consumption is not calculated in the embodiment of the present application, the sum of the second time consumption and the third time consumption can be determined as the first representation value.

[0175] As can be seen from the above, when the application program is updated by using the scheme provided by the embodiment of the present application, the sum of the time consumption required for the electronic device to download the first differential package and the time consumption required for the electronic device to generate the installation package of the target version according to the first differential package and the installation package of the first version is determined as the first representation value, since the time consumption required for the electronic device to download the first differential package can be accurately calculated according to the first network speed and the size of the first differential package, and the time consumption required for the electronic device to generate the installation package of the target version according to the first differential package and the installation package of the first version can also be accurately calculated according to the first computing power value, the second computing power value and the first time consumption, therefore, the determined first representation value can represent the time consumption required for the electronic device to update the application to be updated based on the first differential package as accurately as possible, thereby improving the accuracy of the application program update.

[0176] Corresponding to the application program update method applied to the server, the embodiment of the present application also provides an application program update method applied to an electronic device.

[0177] Referring to Figure 4 A fourth application program updating method is provided, and a flowchart of the fourth application program updating method is shown in FIG. 4. The fourth application program updating method is applied to an electronic device, and includes the following steps S401-S405.

[0178] Step S401: Obtain a first computing power value representing a computing performance of the electronic device and a first network speed of the electronic device.

[0179] The electronic device is installed with a first version of an application program to be updated.

[0180] The first computing power value is used to represent the computing performance of the electronic device. Since the computing performance of the electronic device is related to the amount of computing resources, the amount of computing resources of the electronic device can be used as the first computing power value. The amount of computing resources of the electronic device can include the amount of computing resources of each component in the electronic device. For example, the amount of computing resources of the electronic device can be the number of cores of a CPU in the electronic device, or the speed of floating point operation of the electronic device, etc.

[0181] In addition, since the application program updating usually mainly consumes the computing resources of the CPU in the electronic device, the amount of computing resources of the CPU in the electronic device can also be used as the first computing power value.

[0182] The amount of computing resources of the CPU can be obtained by multiplying the number of cores of the CPU, the working frequency of the CPU, and the number of floating point operations of one core of the CPU in one clock cycle.

[0183] The first network speed can be the current network speed of the electronic device in the network environment, or the average network speed of the electronic device in the network environment for a period of time. The network environment of the electronic device can be the network environment in which the electronic device communicates with a server.

[0184] There are various ways to obtain the first computing power value representing the computing performance of the electronic device.

[0185] In one implementation, the computing performance or the amount of computing resources of the electronic device can be detected to obtain the first computing power value. For example, an application program for detecting the computing performance or the amount of computing resources of the electronic device can be used to detect the electronic device to obtain the first computing power value.

[0186] In another implementation, a corresponding relationship between device information and computing power values of various devices can be obtained, and a computing power value corresponding to the device information of the electronic device can be found as the first computing power value.

[0187] The device information of the device can be a device name, a device model, a device model contained in the device, and the like.

[0188] In addition, the first computing power value can be obtained in other manners, which are not listed here.

[0189] Step S402: sending the first computing power value, the first network speed, and the first version information to the server.

[0190] The first version information can be a version number of the first version, a release time of the first version, and identification information of the first version.

[0191] In an embodiment of the present application, the electronic device can carry the first computing power value, the first network speed, and the first version information in a program update request of the application to be updated, and send the first computing power value, the first network speed, and the first version information to the server by sending the program update request to the server.

[0192] In another embodiment of the present application, the electronic device can also directly send the first computing power value, the first network speed, and the first version information to the server. For example, the electronic device sends the first computing power value, the first network speed, and the first version information to the server before or after sending the program update request.

[0193] Step S403: obtaining a first data packet fed back by the server based on the first computing power value and the first network speed.

[0194] The server can determine the first data packet based on the first computing power value and the first network speed by applying any of the application program update schemes applied to the server.

[0195] In the case where the server directly feeds back the first data packet, the electronic device can receive the first data packet sent by the server.

[0196] In the case where the server feeds back the first data packet through a download link of the first data packet, the electronic device can access a storage location of the first data packet according to the download link, and thus obtain the first data packet.

[0197] Step S404: if the first data packet is an installation package of a target version of the application to be updated, updating the application to be updated based on the installation package of the target version.

[0198] Since the way in which the electronic device updates the application to be updated based on the installation package is usually different from the way in which the electronic device updates the application based on the differential package, it is necessary to determine whether the first data packet is an installation package or a differential package.

[0199] In an implementation, the electronic device can detect the first data packet, and if the first data packet is detected as an installation package of the target version, the electronic device can update the application program to be updated based on the installation package of the target version.

[0200] For example, the electronic device can detect the data packet type of the first data packet, and if the data packet type of the first data packet is the data packet type of an installation package, it indicates that the first data packet is an installation package of the target version.

[0201] In another implementation, the electronic device can further send a query request of the first data packet to the server, so that the electronic device can determine whether the first data packet is an installation package or a differential package according to the information fed back by the server.

[0202] Step S405: If the first data packet is a first differential package between the installation package of the target version and the installation package of the first version, the electronic device updates the application program to be updated based on the first differential package and the installation package of the first version.

[0203] If the first data packet is a first differential package, the electronic device can merge the first differential package and the installation package of the first version to generate an installation package of the target version, and then update the application program to be updated based on the installation package of the target version.

[0204] As can be seen from the above, when the application program is updated by using the scheme provided in the embodiments of the present application, the server can feed back a first data packet based on a first computing power value representing the computing performance of the electronic device and a first network speed of the electronic device. If the first data packet is an installation package of the target version, the electronic device updates the application program to be updated based on the installation package of the target version. If the first data packet is a first differential package, the electronic device updates the application program to be updated based on the first differential package and the installation package of the first version. Therefore, the scheme provided in the embodiments of the present application can update the application program.

[0205] Corresponding to the above-mentioned application program updating method, the embodiments of the present application further provide an application program updating device.

[0206] Referring to Figure 5 , a structural schematic diagram of an application program updating device is provided, which is applied to a server and includes:

[0207] A first obtaining module 501 is configured to obtain a first computing power value representing the computing performance of an electronic device and a first network speed of the electronic device, wherein the electronic device is installed with a first version of an application program to be updated.

[0208] A second obtaining module 502 is configured to obtain the size of a first differential package between an installation package of a target version of the application program to be updated and an installation package of the first version, and a first time consumption required by the server for merging the first differential package and the installation package of the first version.

[0209] The first estimation module 503 is configured to estimate, based on the first computing power value, the first network speed, a second computing power value representing the server computing performance, a size of the first differential package, and a first time consumption, a first representation value representing a time consumption required by the electronic device for updating the to-be-updated application based on the first differential package.

[0210] The second estimation module 504 is configured to estimate, according to the first network speed and a size of an installation package of a target version, a second representation value representing a time consumption required by the electronic device for updating the to-be-updated application based on the installation package of the target version.

[0211] The first updating module 505 is configured to, if the first representation value is greater than the second representation value, send the installation package of the target version to the electronic device, so that the electronic device updates the to-be-updated application based on the installation package of the target version.

[0212] The second updating module 506 is configured to, if the first representation value is not greater than the second representation value, send the first differential package to the electronic device, so that the electronic device updates the to-be-updated application based on the first differential package.

[0213] As can be seen from the above, when the application program updating scheme provided by the embodiment of the application is applied, the server can obtain the first computing power value, the first network speed, the size of the first differential package, and the first time consumption, estimate, according to the above obtained information, a first representation value representing a time consumption required by the electronic device for updating the to-be-updated application based on the first differential package and a second representation value representing a time consumption required by the electronic device for updating the to-be-updated application based on the installation package of the target version, and send a data package corresponding to a smaller representation value of the two representation values to the electronic device, so that the electronic device can update the to-be-updated application based on the sent data package. Moreover, since the data package received by the electronic device corresponds to a smaller representation value, the time consumption of the electronic device for updating the to-be-updated application is also shorter. Therefore, the application program updating scheme provided by the embodiment of the application can not only update the application program, but also has higher updating efficiency.

[0214] In an embodiment of the application, referring to Figure 6 , a structural schematic diagram of a second application program updating device is provided, which is compared with the above Figure 5 embodiment. In the embodiment, the first estimation module 503 comprises:

[0215] The first calculation sub-module 503A is configured to calculate a second time consumption of the electronic device for downloading the first differential package according to the first network speed and the size of the first differential package.

[0216] The second calculation sub-module 503B is configured to calculate a third time consumption of the electronic device for generating the installation package of the target version according to the first differential package and the installation package of the first version according to the first computing power value, the second computing power value and the first time consumption.

[0217] The third calculation sub-module 503C is configured to determine a sum of the second time consumption and the third time consumption as a first representation value representing the time consumption of the electronic device for updating the application to be updated based on the first differential package.

[0218] As can be seen from the above, when the application program is updated by using the scheme provided in the embodiments of the present application, the sum of the time consumption of the electronic device for downloading the first differential package and the time consumption of the electronic device for generating the installation package of the target version according to the first differential package and the installation package of the first version is determined as the first representation value. Since the time consumption of the electronic device for downloading the first differential package can be accurately calculated according to the first network speed and the size of the first differential package, and the time consumption of the electronic device for generating the installation package of the target version according to the first differential package and the installation package of the first version can also be accurately calculated according to the first computing power value, the second computing power value and the first time consumption, the first representation value determined can represent the time consumption of the electronic device for updating the application to be updated based on the first differential package as accurately as possible, thereby improving the accuracy of the application program update.

[0219] In one embodiment of the present application, the first calculation sub-module 503A is specifically configured to:

[0220] The second time consumption is calculated according to the following expression:

[0221]

[0222] In the expression, T1 represents the second time consumption, S1 represents the size of the first differential package, and V represents the first network speed.

[0223] As can be seen from the above, when the application program is updated by using the scheme provided in the embodiments of the present application, the size of the first differential package is divided by the first network speed, and the second time consumption of the electronic device for downloading the first differential package can be accurately calculated, thereby improving the accuracy of the application program update.

[0224] In one embodiment of the present application, the second calculation sub-module 503B is specifically configured to:

[0225] The third time consumption is calculated according to the following expression:

[0226]

[0227] In the expression, T2 represents the third time consumption, C1 represents the first computing power value, C2 represents the second computing power value, and T3 represents the first time consumption.

[0228] As can be seen from the above, when the application program is updated by using the scheme provided by the embodiment of the application, since the computing power value of the device is inversely proportional to the third time consumption of the device for generating the installation package of the target version according to the first differential package and the installation package of the first version, the third time consumption can be accurately calculated according to the above expression, and the accuracy of the application program update is improved.

[0229] In an embodiment of the application, the second estimation module 504 is specifically configured to:

[0230] The second characteristic value is calculated according to the following expression:

[0231]

[0232] wherein T4 represents the second characteristic value, S2 represents the size of the installation package of the target version, and V represents the first network speed.

[0233] As can be seen from the above, when the application program is updated by using the scheme provided by the embodiment of the application, the size of the installation package of the target version is divided by the first network speed, and the second characteristic value can be calculated, and then the second characteristic value is compared with the first characteristic value, the data package sent by the server to the electronic device is determined, and the update of the application program is realized.

[0234] In an embodiment of the application, the second obtaining module 502 is specifically configured to:

[0235] Among the stored historical differential packages, a first differential package corresponding to the first version is determined, wherein the historical differential package is a differential package generated by the server according to the installation package of the target version and the installation package of the historical version of the application program to be updated;

[0236] The size of the determined first differential package is obtained, and the first time consumption required by the server for merging the first differential package and the installation package of the first version is obtained.

[0237] As can be seen from the above, when the application program is updated by using the scheme provided by the embodiment of the application, only the first differential package corresponding to the first version needs to be determined among the stored historical differential packages, and the first differential package does not need to be generated according to the installation package of the target version and the installation package of the first version, which can shorten the time for obtaining the size of the first differential package and the first time consumption, and improve the efficiency of the application program update.

[0238] Corresponding to the application program update device applied to the server, an application program update device applied to an electronic device is also provided in an embodiment of the application.

[0239] Reference is made to Figure 7A schematic diagram of a third application update device is provided, which is applied to an electronic device. The device includes:

[0240] Information acquisition module 701 is used to acquire a first computing power value characterizing the computing performance of the electronic device and a first network speed of the electronic device, wherein the electronic device has a first version of an application to be updated installed;

[0241] Information sending module 702 is used to send the first computing power value, the first network speed and the first version information to the server;

[0242] The data packet acquisition module 703 is used to acquire the first data packet fed back by the server based on the first computing power value and the first network speed;

[0243] Target update module 704 is used to update the application to be updated based on the target version installation package if the first data packet is an installation package of the target version of the application to be updated;

[0244] The differential update module 705 is used to update the application to be updated based on the first differential packet and the first version installation package if the first data packet is a first differential packet between the installation package of the target version and the installation package of the first version.

[0245] As can be seen from the above, when updating an application using the solution provided in the embodiments of the present invention, a first data packet can be obtained based on a first computing power value characterizing the computing performance of the electronic device and a first network speed feedback from the electronic device. Furthermore, if the first data packet is an installation package of the target version, the application to be updated is updated based on the installation package of the target version; if the first data packet is a first differential packet, the application to be updated is updated based on the first differential packet and the installation package of the first version. Therefore, it is evident that the solution provided in the embodiments of the present invention can update applications.

[0246] This invention also provides a first electronic device, serving as a server, such as... Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. The processor 801, communication interface 802, and memory 803 communicate with each other via the communication bus 804.

[0247] Memory 803 is used to store computer programs;

[0248] When processor 801 executes a program stored in memory 803, it performs the following steps:

[0249] obtain a first computing power value representing a computing performance of an electronic device and a first network speed of the electronic device, wherein the electronic device is installed with a first version of an application program to be updated;

[0250] obtain a size of a first differential package between an installation package of a target version of the application program to be updated and an installation package of the first version, and a first time consumption required for the server to combine the first differential package and the installation package of the first version;

[0251] based on the first computing power value, the first network speed, a second computing power value representing a computing performance of the server, the size of the first differential package and the first time consumption, estimate a first representation value representing a time consumption required for the electronic device to update the application program to be updated based on the first differential package;

[0252] based on the first network speed and the size of the installation package of the target version, estimate a second representation value representing a time consumption required for the electronic device to update the application program to be updated based on the installation package of the target version;

[0253] if the first representation value is greater than the second representation value, send the installation package of the target version to the electronic device, so that the electronic device updates the application program to be updated based on the installation package of the target version;

[0254] if the first representation value is not greater than the second representation value, send the first differential package to the electronic device, so that the electronic device updates the application program to be updated based on the first differential package.

[0255] In addition, the electronic device can also implement other application program updating methods applied to the server as described in the foregoing method embodiment part, which will not be described in detail here.

[0256] The embodiment of the application further provides a second electronic device, as shown in the accompanying drawings, Figure 9 The processor 901, the communication interface 902 and the memory 903 can communicate with each other through the communication bus 904,

[0257] The memory 903 is used for storing a computer program;

[0258] When the processor 901 executes the program stored in the memory 903, the following steps can also be implemented:

[0259] obtain a first computing power value representing a computing performance of an electronic device and a first network speed of the electronic device, wherein the electronic device is installed with a first version of an application program to be updated;

[0260] Send the first computing power value, the first network speed and the first version information to the server;

[0261] Obtain the first data packet fed back by the server based on the first computing power value and the first network speed;

[0262] If the first data packet is an installation package of the target version of the application to be updated, update the application to be updated based on the installation package of the target version;

[0263] If the first data packet is a first difference packet between the installation package of the target version and the installation package of the first version, update the application to be updated based on the first difference packet and the installation package of the first version.

[0264] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0265] The communication interface is used for communication between the above-mentioned electronic device and other devices.

[0266] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0267] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0268] In yet another embodiment provided by the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the application update methods described above.

[0269] In yet another embodiment provided by the present application, a computer program product containing instructions which, when executed on a computer, cause the computer to perform any of the application update methods described in the above embodiments.

[0270] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium, or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk (SSD)) and the like.

[0271] It should be noted that, in this document, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0272] Various embodiments are described in related manner in the specification, and the same or similar parts among various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the device, electronic device, computer readable storage medium and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0273] The above only describes the preferred embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An application update method, characterized in that, Applied to a server, the method includes: Obtain a first computing power value characterizing the computing performance of an electronic device and a first network speed of the electronic device, wherein the electronic device has a first version of an application to be updated installed; The system obtains the size of a first differential package between the installation package of the target version of the application to be updated and the installation package of the first version, and the first time required for the server to merge the first differential package and the installation package of the first version; wherein, the first time is: the time corresponding to the first version found by the server from the pre-stored time corresponding to each historical version of the application to be updated; the time corresponding to a historical version is: the time taken by the server to merge the installation package of the historical version and its corresponding differential package to obtain the installation package of the target version; the differential package corresponding to a historical version is: generated by the server based on the installation package of the target version and the installation package of the historical version; Based on the first computing power value, the first network speed, the second computing power value representing the computing performance of the server, the size of the first differential packet, and the first time consumption, a first characterization value representing the time required for the electronic device to update the application to be updated based on the first differential packet is estimated. Based on the first network speed and the size of the target version installation package, a second characterization value is estimated to represent the time required for the electronic device to update the application to be updated based on the target version installation package; If the first characterization value is greater than the second characterization value, the target version of the installation package is sent to the electronic device so that the electronic device updates the application to be updated based on the target version of the installation package; If the first characterization value is not greater than the second characterization value, the first differential packet is sent to the electronic device so that the electronic device updates the application to be updated based on the first differential packet; The first characterization value, which estimates the time required for the electronic device to update the application to be updated based on the first differential packet, based on the first computing power value, the first network speed, the second computing power value representing the server's computing performance, the size of the first differential packet, and the first time consumption, includes: Based on the first network speed and the size of the first differential packet, calculate the second time taken for the electronic device to download the first differential packet; Based on the first computing power value, the second computing power value, and the first time consumption, calculate the third time consumption for the electronic device to generate the target version installation package based on the first differential package and the first version installation package; The sum of the second time consumption and the third time consumption is determined as a first characterizing value representing the time required for the electronic device to update the application to be updated based on the first differential packet.

2. The method according to claim 1, characterized in that, The step of calculating the second time taken for the electronic device to download the first differential packet based on the first network speed and the size of the first differential packet includes: The second time consumption is calculated according to the following expression: Where T1 represents the second time consumption, S1 represents the size of the first differential packet, and V represents the first network speed.

3. The method according to claim 1, characterized in that, The step of calculating the third time required for the electronic device to generate the target version installation package based on the first differential package and the first version installation package, according to the first computing power value, the second computing power value, and the first time consumption, includes: The third time consumption is calculated according to the following expression: Wherein, T2 represents the third time consumption, C1 represents the first computing power value, C2 represents the second computing power value, and T3 represents the first time consumption.

4. The method according to any one of claims 1-3, characterized in that, The second characteristic value, which estimates the time required for the electronic device to update the application to be updated based on the target version of the installation package, according to the first network speed and the size of the target version installation package, includes: The second characterization value is calculated according to the following expression: Where T4 represents the second characterization value, S2 represents the size of the installation package of the target version, and V represents the first network speed.

5. The method according to any one of claims 1-3, characterized in that, The determination of the size of the first differential package between the installation package of the target version of the application to be updated and the installation package of the first version, and the first time required for the server to merge the first differential package and the installation package of the first version, includes: Among the stored historical differential packages, a first differential package corresponding to the first version is determined, wherein the historical differential package is: a differential package generated by the server based on the installation package of the target version and the installation package of the historical version of the application to be updated; Obtain the determined size of the first differential package, and obtain the first time required for the server to merge the first differential package and the first version of the installation package.

6. An application update method, characterized in that, Applied to electronic devices, the method includes: Obtain a first computing power value characterizing the computing performance of the electronic device and a first network speed of the electronic device, wherein the electronic device has a first version of an application to be updated installed; Send the first computing power value, the first network speed, and the first version information to the server; The server obtains a first data packet based on the first computing power value and the first network speed; wherein the first data packet is determined by the server through the following methods: obtaining the first computing power value and the first network speed; obtaining the size of the first differential packet between the installation package of the target version of the application to be updated and the installation package of the first version, and the first time required by the server to merge the first differential packet and the installation package of the first version; wherein the first time is: the time corresponding to the first version found by the server from the pre-stored time corresponding to each historical version of the application to be updated; the time corresponding to a historical version is: the time taken by the server to merge the installation package of the historical version and its corresponding differential packet to obtain the installation package of the target version; the differential packet corresponding to a historical version is: generated by the server based on the installation package of the target version and the installation package of the historical version; based on the first network speed and the first differential packet The system calculates the second time required for the electronic device to download the first differential package based on the first computing power value, the second computing power value, and the first time. It then calculates the third time required for the electronic device to generate the target version installation package based on the first differential package and the first version installation package. The sum of the second time and the third time is determined as a first characterizing value representing the time required for the electronic device to update the application to be updated based on the first differential package. Based on the first network speed and the size of the target version installation package, a second characterizing value representing the time required for the electronic device to update the application to be updated based on the target version installation package is estimated. If the first characterizing value is greater than the second characterizing value, the target version installation package is used as the first data packet and sent to the electronic device. If the first characterizing value is not greater than the second characterizing value, the first differential package is used as the first data packet and sent to the electronic device. If the first data packet is the installation package of the target version of the application to be updated, the application to be updated is updated based on the installation package of the target version. If the first data packet is a first differential packet between the installation package of the target version and the installation package of the first version, the application to be updated is updated based on the first differential packet and the installation package of the first version.

7. An application update device, characterized in that, Applied to a server, the device includes: The first acquisition module is used to acquire a first computing power value characterizing the computing performance of the electronic device and a first network speed of the electronic device, wherein the electronic device has a first version of an application to be updated installed; The second obtaining module is used to obtain the size of the first differential package between the installation package of the target version of the application to be updated and the installation package of the first version, and the first time required for the server to merge the first differential package and the installation package of the first version; wherein, the first time is: the time corresponding to the first version found by the server from the pre-stored time corresponding to each historical version of the application to be updated; the time corresponding to a historical version is: the time taken by the server to merge the installation package of the historical version and its corresponding differential package to obtain the installation package of the target version; the differential package corresponding to a historical version is: generated by the server based on the installation package of the target version and the installation package of the historical version; The first estimation module is used to estimate, based on the first computing power value, the first network speed, the second computing power value representing the computing performance of the server, the size of the first differential packet, and the first time consumption, a first characterization value representing the time required for the electronic device to update the application to be updated based on the first differential packet; The second estimation module is used to estimate, based on the first network speed and the size of the target version installation package, a second characterization value representing the time required for the electronic device to update the application to be updated based on the target version installation package; The first update module is configured to send an installation package of the target version to the electronic device if the first characterization value is greater than the second characterization value, so that the electronic device updates the application to be updated based on the installation package of the target version. The second update module is configured to send the first differential packet to the electronic device if the first characterization value is not greater than the second characterization value, so that the electronic device updates the application to be updated based on the first differential packet; The first prediction module includes: The first calculation submodule is used to calculate the second time taken for the electronic device to download the first differential packet based on the first network speed and the size of the first differential packet; The second calculation submodule is used to calculate the third time taken for the electronic device to generate the target version installation package based on the first computing power value, the second computing power value, and the first time taken, according to the first computing power value, the second computing power value, and the first time taken. The third calculation submodule is used to determine the sum of the second time consumption and the third time consumption as a first characterization value representing the time required for the electronic device to update the application to be updated based on the first differential packet.

8. An application update device, characterized in that, Applied to electronic devices, the device includes: An information acquisition module is used to acquire a first computing power value characterizing the computing performance of the electronic device and a first network speed of the electronic device, wherein the electronic device has a first version of an application to be updated installed; The information sending module is used to send the first computing power value, the first network speed, and the first version information to the server; A data packet acquisition module is used to acquire a first data packet fed back by the server based on the first computing power value and the first network speed; wherein, the first data packet is determined by the server through the following methods: acquiring the first computing power value and the first network speed; acquiring the size of a first differential packet between the installation package of the target version of the application to be updated and the installation package of the first version, and the first time required by the server to merge the first differential packet and the installation package of the first version; wherein, the first time is: the time corresponding to the first version found by the server from the pre-stored time corresponding to each historical version of the application to be updated; the time corresponding to a historical version is: the time taken by the server to merge the installation package of the historical version and its corresponding differential packet to obtain the installation package of the target version; the differential packet corresponding to a historical version is: generated by the server based on the installation package of the target version and the installation package of the historical version; based on the first network speed and the first differential packet, the first data packet is determined by the server through the following methods: acquiring the first computing power value and the first network speed; acquiring the size of a first differential packet between the installation package of the target version of the application to be updated and the installation package of the first version; acquiring the size of a first differential packet between the installation package of the target version of the application ... The size of a differential packet is used to calculate a second time for the electronic device to download the first differential packet; based on the first computing power value, the second computing power value, and the first time, a third time is calculated for the electronic device to generate the target version installation package based on the first differential packet and the first version installation package; the sum of the second time and the third time is determined as a first characterizing value representing the time required for the electronic device to update the application to be updated based on the first differential packet; based on the first network speed and the size of the target version installation package, a second characterizing value representing the time required for the electronic device to update the application to be updated based on the target version installation package is estimated; if the first characterizing value is greater than the second characterizing value, the target version installation package is used as the first data packet and the first data packet is sent to the electronic device; if the first characterizing value is not greater than the second characterizing value, the first differential packet is used as the first data packet and the first data packet is sent to the electronic device. The target update module is configured to update the application to be updated based on the target version installation package if the first data packet is an installation package of the target version of the application to be updated. The differential update module is used to update the application to be updated based on the first differential packet and the first version installation package if the first data packet is a first differential packet between the installation package of the target version and the installation package of the first version.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the application update method steps as described in any one of claims 1-5 or 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the application update method steps as described in any one of claims 1-5 or 6.

Citation Information

Patent Citations

  • Upgrade package sending management method, incremental upgrade package preparation method and related device

    CN112994955A