WO2015180304A1 - 增量升级方法及装置 - Google Patents
增量升级方法及装置 Download PDFInfo
- Publication number
- WO2015180304A1 WO2015180304A1 PCT/CN2014/086816 CN2014086816W WO2015180304A1 WO 2015180304 A1 WO2015180304 A1 WO 2015180304A1 CN 2014086816 W CN2014086816 W CN 2014086816W WO 2015180304 A1 WO2015180304 A1 WO 2015180304A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- subfile
- compressed
- type
- difference data
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 114
- 230000006837 decompression Effects 0.000 claims abstract description 105
- 230000006835 compression Effects 0.000 claims description 74
- 238000007906 compression Methods 0.000 claims description 74
- 238000004590 computer program Methods 0.000 claims description 12
- 230000010354 integration Effects 0.000 claims description 2
- 230000001960 triggered effect Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Definitions
- the present application relates to the field of data processing technologies, and in particular, to an incremental upgrade method and apparatus.
- Version upgrade refers to the improvement of the vulnerability of the operating system or the old version of the software, or the addition of new application functions to the software, so that the software is more perfect and easy to use.
- Incremental upgrade is a common version upgrade method. The basic principle is: the server compares the old version file with the new version file, and generates an incremental file for recording the difference information between the old version file and the new version file; The client downloads the delta file, and merges the delta file with its own old version file to obtain a corresponding new version file. After the new version file is installed, the version upgrade is completed. Compared with the way to perform the upgrade by downloading the entire new version file, the above incremental upgrade method is widely used because it consumes less data traffic, takes less time, and has higher upgrade efficiency.
- each version file is a compressed file that contains multiple subfiles.
- incremental files are obtained mainly by direct comparison method or decompression comparison method.
- the direct comparison method directly compares the old version file and the new version file as a whole file; the method is more efficient, but the obtained incremental file is large, even close to the size of the new version file, It is convenient for the client to download the delta file. For example, compared to the old version file, each subfile corresponding to the new version file is not modified, but the compression order of the subfile is changed, but from the perspective of the overall file, the two files are still completely different, so The incremental file obtained by the direct comparison method will be large.
- the decompression comparison method is specifically: extracting the sub-files in the old version file and the new version file respectively, and comparing the old version file obtained after decompression with the sub-file corresponding to the new version file (such as the same file name), Get the delta file.
- the decompression comparison method can solve the problem that the overall file difference caused by the sub-file order change is large, and the size of the incremental file is effectively reduced.
- it is generally necessary to perform several thousand decompressions. The compression operation results in a lower upgrade efficiency.
- an incremental upgrade method and apparatus are provided to solve the problem that the incremental incremental upgrade method cannot balance the incremental file size and the upgrade efficiency.
- an incremental upgrade method including:
- the server obtains at least one of a first type of subfile, a second type of subfile, and a third type of subfile; wherein the first type of subfile exists in a new version of the compressed file but does not exist in the old version of the compressed file.
- the second type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and that meets the preset decompression conditions, including the second type of subfile in the new version of the compressed file and the old version of the compressed file.
- a second type of subfile; the third type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and partially or completely does not satisfy the preset decompression condition, including the first in the new version of the compressed file.
- the third type of subfile and the third type of subfile in the old version of the compressed file is
- the server decompresses the second type of subfile in the new version of the compressed file and the second subfile in the corresponding old version of the compressed file, and compares the differences to obtain the first difference. data files;
- the server compares the third type of subfile in the new version of the compressed file and the third subtype of the corresponding old version of the compressed file without directly decompressing, and obtains the second Difference data file;
- the server generates an incremental file for the client to perform incremental upgrade of the file according to at least one of the obtained first type of subfile, the first difference data file, and the second difference data file.
- an incremental upgrade method including:
- the client obtains the delta file from the server, where the delta file includes at least one of the first type of subfile, the first difference data file, and the second difference data file; wherein the first type of subfile is a file that exists in the new version of the compressed file but does not exist in the old version of the compressed file; the first difference data file is the second type of subfile in the new version of the compressed file and the second type in the corresponding old version of the compressed file.
- the file is decompressed and compared, and the second type of subfile is a file that exists in both the new version compressed file and the old version compressed file and both meet the preset decompression condition; the second difference data file is a new pair
- the third type of subfile in the version compression file and the third type of subfile in the corresponding old version of the compressed file are not decompressed and directly obtained by differential comparison, and the third type of subfile is a new version of the compressed file and the old version is compressed. a file that exists in the file and partially or completely does not satisfy the preset decom
- the client uses the delta file to obtain a new version of the compressed file, including: when the delta file includes the first type of subfile, the first difference data file, and the second difference data file, the old version of the compressed file
- the first difference data file is merged to obtain a first merged sub-file
- the first merged sub-file is compressed to obtain a first compressed sub-file
- Combining the three types of subfiles with the second difference data file to obtain a second merged subfile, compressing the second merged subfile to obtain a second compressed subfile
- the client uses the new version of the compressed file for incremental upgrade of the file.
- a server including:
- a first obtaining module configured to obtain at least one of a first type of subfile, a second type of subfile, and a third type of subfile; wherein the first type of subfile exists in a new version of the compressed file but the old version The file that does not exist in the compressed file; the second type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and that meets the preset decompression conditions, including the second type of subfile in the new version of the compressed file.
- the third type of subfile is a file that exists in the new version of the compressed file and the old version of the compressed file and partially or completely does not meet the preset decompression conditions, including the new version of the compressed file.
- the third type of subfile in the file and the third type of subfile in the old version of the compressed file is a file that exists in the new version of the compressed file and the old version of the compressed file and partially or completely does not meet the preset decompression conditions, including the new version of the compressed file.
- the first comparison module is configured to decompress and differentiate the second type of subfiles in the new version of the compressed file and the second type of subfiles in the corresponding old version of the compressed file when the obtained second file includes the second type of subfile Comparing, obtaining the first difference data file;
- the second comparison module is configured to directly perform the third type subfile in the new version compressed file and the third type subfile in the corresponding old version compressed file without directly decompressing the third type subfile in the obtained file. Comparing the differences, obtaining a second difference data file;
- a generating module configured to generate an incremental file for the client to perform an incremental upgrade of the file according to the obtained at least one of the first type of subfile, the first difference data file, and the second difference data file .
- a client including:
- a second obtaining module configured to obtain an incremental file from the server, where the incremental file includes at least one of a first type of subfile, a first difference data file, and a second difference data file;
- a type of subfile is a file that exists in the new version of the compressed file but does not exist in the old version of the compressed file;
- the first difference data file is in the second type of subfile in the new version of the compressed file and the corresponding old version of the compressed file
- the second type of subfile is decompressed and compared to obtain a file, and the second type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and that meets the preset decompression condition;
- the second difference The data file is a file obtained by directly comparing the third type of subfiles in the new version of the compressed file and the third type of subfiles in the corresponding old version of the compressed file, and the third type of subfile is compressed for the new version.
- a second merge module configured to use the delta file to obtain a new version of the compressed file, including: compressing the old version when the delta file includes the first type of subfile, the first difference data file, and the second difference data file After decompressing the second type of subfile of the file, combining with the first difference data file to obtain a first merged subfile, compressing the first merged subfile to obtain a first compressed subfile; compressing the old version The third type of subfile of the file is merged with the second difference data file to obtain a second merged subfile, and the second merged subfile is compressed. Obtaining a second compressed subfile; combining the first compressed subfile, the second compressed subfile, and the first subfile to obtain a new version compressed file;
- the incremental upgrade module is configured to incrementally upgrade files using the new version of the compressed file.
- a computer program comprising program instructions, when the computer program is run on a server, causing the server to perform the incremental upgrade method of the server side.
- the invention provides a computer readable medium storing the computer program according to the fifth aspect.
- a computer program comprising program instructions, when the computer program is run on a client, causing the client to perform an incremental upgrade method of the client.
- a computer readable medium storing the computer program according to the seventh aspect.
- the server when generating the delta file, the server first obtains different types of subfiles in the old version compressed file and the new version compressed file, and then performs different difference comparisons on different types of subfiles. Steps to obtain a difference data file of the corresponding type. Then, for the sub-files satisfying the preset decompression conditions, the difference comparison is performed by using the decompression comparison method, and the size of the difference data can be reduced. For the sub-files that do not satisfy the preset decompression conditions, the direct comparison method is used to perform the difference comparison, which can improve the difference comparison. effectiveness.
- the server generates an incremental file for the client to perform incremental upgrade of the file according to at least one of the obtained first type of subfile, the first difference data file, and the second difference data file.
- the client obtains the delta file from the server, it can perform different operations according to the type of the subfile in the delta file to obtain a new version of the compressed file.
- the merge operation of the difference data file and the old version compressed file can be performed according to the type of the difference data file, and a new version of the compressed file is obtained, thereby improving the efficiency of the merge operation. Therefore, compared with the traditional single incremental comparison method or the incremental upgrade based on the decompression comparison method, the present application can achieve the purpose of both the incremental file size and the upgrade efficiency.
- FIG. 1 is a schematic flowchart diagram of an incremental upgrade method according to an embodiment of the present application
- FIG. 2 is a schematic flowchart of generating an incremental file in an incremental upgrade method according to an embodiment of the present disclosure
- FIG. 3 is another schematic flowchart of generating an incremental file in an incremental upgrade method according to an embodiment of the present disclosure
- FIG. 4 is a schematic diagram of a storage structure of an old version compressed file and a new version compressed file in the embodiment of the present application;
- FIG. 5 is a schematic diagram of a storage structure of a first buffer area and a second buffer area in an embodiment of the present application
- FIG. 6 is a schematic flowchart of a client performing a merge operation in an incremental upgrade method according to an embodiment of the present disclosure
- FIG. 7 is a schematic flowchart of another incremental upgrade method according to an embodiment of the present disclosure.
- FIG. 8 is a schematic flowchart of still another incremental upgrade method according to an embodiment of the present application.
- FIG. 9 is a schematic diagram of a relationship between a server and a client that implement incremental upgrade according to an embodiment of the present application.
- FIG. 10 is a structural block diagram of a server according to an embodiment of the present application.
- FIG. 11 is a structural block diagram of an optimized server according to an embodiment of the present application.
- FIG. 12 is a structural block diagram of a client according to an embodiment of the present disclosure
- FIG. 13 is a structural block diagram of another server according to an embodiment of the present application
- FIG. 14 is a structural block diagram of another client according to an embodiment of the present application.
- the embodiment of the present application provides an incremental upgrade method and device to solve the problem that the incremental incremental upgrade method cannot balance the incremental file size and the upgrade efficiency.
- FIG. 1 is a flowchart of an incremental upgrade method according to an embodiment of the present application.
- This embodiment first describes the incremental upgrade method of the present application from the perspective of an overall system including a server and a client.
- the incremental upgrade method provided in this embodiment includes the following steps:
- the server obtains a new version of the compressed file and a corresponding old version of the compressed file.
- the embodiment of the present application may determine two corresponding compressed files according to the file name and/or the version identifier, and further determine, according to the version numbers of the two compressed files, which compressed file is an old version compressed file, and which compressed file is The new version of the compressed file.
- the two compressed files are the corresponding two compressed files; further, of the two compressed files, the compressed version has a version number of 9.6. .0, the version number of another compressed file is 9.6.1, you can determine that the latter version number is higher, the new version is Therefore, it can be determined that the compressed file with the version number of 9.6.0 is the compressed file of the old version, and the compressed file with the version number of 9.6.1 is the compressed file of the new version.
- the server obtains at least one of a first type of subfile, a second type of subfile, and a third type of subfile.
- the first type of subfile is a file that exists in the new version compressed file but does not exist in the old version compressed file; the second type of subfile exists in both the new version compressed file and the old version compressed file, and
- the files satisfying the preset decompression conditions include the second type of subfiles in the new version of the compressed file and the second type of subfiles in the old version of the compressed file; the third type of subfile is the new version of the compressed file.
- the third type of subfile includes the third type of subfile in the new version of the compressed file and the third type in the old version of the compressed file. sub file.
- the compressed file (including the old version compressed file and the new version compressed file) in the embodiment of the present application refers to a file obtained by storing a plurality of compressed sub-files in a certain order. More specifically, the compressed file format may be in a zip format, and the corresponding common files include files in the apk format, most game resource files, and data files of some large applications. However, it is not limited thereto, and those skilled in the art should understand that the compressed files of other formats are also applicable to the incremental upgrade scheme of the present application.
- the data in the new version of the compressed file can be grouped according to functions and the like, and the data and/or subfiles in each group are separately compressed to obtain a plurality of compressed subfiles, and the compressed subfiles are The predetermined order is arranged to obtain a compressed file of the new version file, that is, a new version of the compressed file.
- the new version of the subfile represents the subfile in the new version of the compressed file
- the old version of the subfile represents the subfile in the old version of the compressed file.
- the new version of the subfile A is the first type of subfile.
- the new version File B is the second type of subfile in the new version of the compressed file
- the corresponding old version of the subfile B' is the second type of subfile in the old version of the compressed file.
- the new version of the sub-file C is the third type of sub-file in the new version of the compressed file
- the corresponding old version of the sub-file C' is the third-type sub-file in the old version of the compressed file.
- the new version of the sub-file described in this embodiment corresponds to the old version of the sub-file, which means that the new version of the sub-file and the old version of the sub-file achieve the same (or similar) functions.
- the file names of the corresponding subfiles are the same. Therefore, by looking up the subfiles whose file names are the same as the file names of the new version subfiles in the old version of the compressed file, the subfiles found are The old version of the subfile corresponds to the old version of the subfile.
- the same difference comparison method is used for all data or subfiles in the compressed file to obtain the corresponding incremental file.
- the optimal difference comparison method for different sub-files may be different.
- some files have little or no difference in size before and after compression.
- the size of the two kinds of difference data obtained by the decompression comparison method and the direct comparison method are not much different.
- the decompression comparison method requires multiple decompression operations, the execution efficiency is lower than that of the direct comparison method. Therefore, for such documents, the preferred method of comparison of differences is direct comparison.
- the decompression comparison method needs to sacrifice a certain execution efficiency, since the data granularity obtained after decompression is smaller, it can be recognized that the content of the old version subfile and the new version subfile are the same.
- the data with different order relations avoids the problem that the overall difference of the file is large due to the change of the data arrangement order, so the size of the difference data obtained is much smaller than the size of the difference data obtained by the direct comparison method. Therefore, for such documents, the preferred method of comparison of differences is the decompression comparison method.
- the embodiment of the present application distinguishes the above two types of files according to preset decompression conditions, so as to adopt an optimal difference comparison manner for each type of file.
- the server decompresses the second type of the subfile in the new version of the compressed file and the second subfile in the corresponding old version of the compressed file, and compares the difference to obtain the first A difference data file.
- the first difference data file is the difference data obtained after the server decompresses and compares the second type of subfiles in the new version of the compressed file and the second type of subfiles in the corresponding old version of the compressed file. That is, the first difference data file is a file generated by the obtained difference data.
- the server compares the third subtype file in the new version of the compressed file and the third subfile in the corresponding old version of the compressed file without directly decompressing, and obtains a difference comparison.
- the second difference data file is the third difference data file.
- the second difference data file is a third type of subfile included in the compressed file of the new version of the server. And the corresponding third version of the sub-file in the old version of the compressed file is not decompressed directly after the difference is compared, the difference data obtained. That is, the second difference data file is a file generated by the obtained difference data.
- the set of the first type of subfile, the first difference data file, and the second difference data file is an incremental file for recording difference information between the old version compressed file and the new version compressed file; each first type of subfile
- Each first difference data file and each second difference data file are respectively an incremental subfile. It should be noted that, in actual use, it is possible that the obtained file is part of the first type of subfile, the first difference data file, and the second difference data file, and not all of them, and similarly, the obtained part of the file A collection is an incremental file that records the difference information between an old version of a compressed file and a new version of a compressed file.
- only a set of the first type of subfiles, only a set of the first difference data files, only a set of the second difference data files, or only a set of the first type of subfiles and the first difference data file are included.
- the first type of subfile does not exist in the old version of the compressed file, that is, the first type of subfile in the new version of the compressed file is a new file compared to the old version of the compressed file. . Therefore, for the first type of subfile, it is not necessary to perform a difference comparison operation, and the first type of subfile is directly used as a subfile of the delta file.
- the difference comparison method after the first decompression is used to reduce the size of the corresponding incremental sub-file, thereby reducing the size of the incremental file;
- the direct comparison method can shorten the time used for the difference comparison, improve the efficiency of the incremental file generation, and improve the incremental upgrade efficiency.
- the server generates an incremental file for the client to perform incremental upgrade of the file according to at least one of the obtained first type of subfile, the first difference data file, and the second difference data file.
- the server can compress all the resulting incremental subfiles into one file. For example, compressing the first type of subfile, the first difference data file, and the second difference data file into one file, and obtaining an incremental file in the form of a compressed file, in order to send/download the incremental file completely and accurately. Similarly, when only a part of the first type of subfile, the first difference data file, and the second difference data file are obtained, the obtained partial file is compressed into one file.
- the client obtains an incremental file from the server, where the incremental file includes at least one of the foregoing first type of subfile, the first difference data file, and the second difference data file.
- the client obtains the incremental text according to the file type of the subfile in the obtained incremental file.
- the device performs a merge operation with the old version of the compressed file stored by itself, and obtains a new version of the compressed file.
- the incremental file includes the first type of subfile, the first difference data file, and the second difference data file
- the client may perform the merge operation in the following manner to obtain a new version of the compressed file: After decompressing the second type of subfile of the old version compressed file, merge with the first difference data file to obtain the first merged subfile, and compress the first merged subfile to obtain the first compressed subfile; The third type of subfile of the compressed file is merged with the second difference data file to obtain a second merged subfile, and the second merged subfile is compressed to obtain a second compressed subfile; the first compressed subfile is merged, and the first compressed subfile is merged The second compressed subfile and the first subfile get the new version of the compressed file.
- the client can set a new version of the compressed file storage area and perform the merge operation as follows: the first type of subfiles are directly stored in the new version of the compressed file storage area; the second version of the old version is compressed. After the subfile is decompressed, it is merged with the first difference data file, and then the merged data is compressed to obtain a first compressed subfile, and the first compressed subfile is stored in a new version of the compressed file storage area; The third type of subfile of the version compression file is merged with the second difference data file, and the merged data is compressed to obtain a second compressed subfile, and the second compressed subfile is stored in a new version compressed file storage area. After the merge operation is completed, the file set stored in the new version of the compressed file store is the new version of the compressed file.
- the first subfile is used to obtain the new version of the compressed file.
- the first type of subfile can be directly used as a new version of the compressed file.
- the second type of the sub-file of the old version of the compressed file is decompressed, and merged with the first difference data file to obtain a first merged sub-file, A merged subfile is compressed to obtain a first compressed subfile; the first compressed subfile is used to obtain a new version of the compressed file.
- the first compressed subfile can be directly used as a new version of the compressed file.
- the third sub-file of the old version compressed file is merged with the second difference data file to obtain a second merge subfile, and the second merge subfile is Compress to get the second compressed subfile; use the second compressed subfile to get the new version of the compressed file.
- the second compressed subfile can be directly used as a new version of the compressed file.
- the second type of the sub-file of the old version of the compressed file is decompressed, and then merged with the first difference data file to obtain the first merged sub-file.
- the first merged subfile is compressed to obtain a first compressed subfile; the first compressed subfile and the first type of subfile are merged to obtain a new version of the compressed file.
- the third type of subfile of the old version of the compressed file is merged with the second difference data file to obtain a second merged subfile, and the second merged Subfile Compress, get the second compressed subfile; merge the second compressed subfile and the first subfile to get the new version of the compressed file.
- the second type of the sub-file of the old version of the compressed file is decompressed, and then merged with the first difference data file to obtain the first merged sub-file.
- the client uses the new version of the compressed file to perform incremental upgrade of the file.
- the incremental upgrade method provided by the embodiment of the present application first obtains different types of subfiles in the old version compressed file and the new version compressed file when generating the incremental file, and then pairs different types of subfiles. Perform different difference comparison steps to get the corresponding difference data file. Then, the first type of subfiles that exist in the new version of the compressed file but do not exist in the old version of the compressed file are used as new data, and the third type of subfiles that do not satisfy the preset decompression condition are directly compared. The method obtains the corresponding second difference data file, and adopts a decompression comparison method that can make the difference data smaller to obtain the corresponding first difference data file for the second type of subfile satisfying the preset decompression condition.
- the server generates an incremental file for the client to perform incremental upgrade of the file according to at least one of the obtained first type of subfile, the first difference data file, and the second difference data file.
- the client obtains the first type of subfile, the first difference data file, and the second difference data file from the server, and decompresses the second type of subfile of the old version of the compressed file, and the first difference data file.
- the embodiment of the present application selects the corresponding difference comparison mode and the merge operation mode according to the type of the sub-file in the compressed file, and the purpose of both the incremental file size and the upgrade efficiency can be achieved for the entire incremental upgrade process.
- the preset decompression condition may be: the size before the file compression is greater than the preset byte value and the compression ratio is less than the preset ratio.
- the present invention is not limited thereto. In practical applications, those skilled in the art may set other suitable decompression conditions according to the preset decompression conditions to implement the incremental upgrade scheme of the present application.
- the preset byte can be set to 100 KB, but is not limited thereto;
- the compression ratio is a ratio of the size of the file after compression to the size before compression, and can be set to 70%, but is not limited thereto.
- the server after performing the steps S11 to S15, obtains the incremental file between the old version compressed file and the new version compressed file, and may send the upgrade prompt information to the client associated with the client. After receiving the upgrade prompt information, download the corresponding incremental file to implement compression of the old version of the storage itself. Incremental upgrade of files.
- the upgrade prompt information includes version information of a new version of the compressed file corresponding to the incremental file; the version information includes at least a file name, a version number, and the like.
- the client may unconditionally download the incremental file corresponding to each upgrade prompt information received, or determine whether the local file is based on the version information in the received upgrade prompt information and the version information of the file stored or installed by itself. If the upgrade is required, the incremental file corresponding to the upgrade prompt information is downloaded. If the upgrade does not need to be performed or the corresponding old version file does not exist, the incremental file corresponding to the upgrade prompt information is not downloaded.
- the version information carried in the upgrade prompt information received by the client is as follows: the file name is uc_browser.apk, and the version number is 9.6.1. If the file stored or installed by the client itself does not exist, the file named uc_browser.apk exists. Or, there is a file named uc_browser.apk and the version number is 9.6.1, indicating that the client does not need to download the incremental file corresponding to the upgrade prompt information; if the name stored in the client itself is stored or installed, the name is uc_browser.
- the version number is 9.6.0, that is, the version number is lower than the version number of the new version of the compressed file corresponding to the upgrade prompt information, indicating that it is necessary to upgrade the uc_browser.apk file in the client.
- the client downloads The incremental file corresponding to the upgrade prompt information.
- the client may actively send a file upgrade request to the server, and after receiving the file upgrade request, the server sends a corresponding delta file to the client, so that the client stores the old file for itself.
- the version compression file is incrementally upgraded.
- the above file upgrade request includes version information of files stored or installed in the client.
- the server After receiving the file upgrade request from the client, the server searches for a corresponding incremental file, and if so, sends the incremental file to the client.
- the server may return corresponding prompt information to the client, such as “no new version”, “the current version is the latest version”, and the like.
- the version information carried in the file upgrade request received by the server is as follows: the file name is uc_browser.apk, and the version number is 9.6.0. If the server finds that it has stored an incremental file that meets the following upgrade conditions: the file name of the old version compressed file and the new version compressed file corresponding to the incremental file is uc_browser.apk, and the version number of the old version compressed file is 9.6. .0. If the version number of the new version of the compressed file is higher than 9.6.0 (such as 9.6.1 or 9.6.2, etc.), the server sends the incremental file to the client.
- 9.6.0 such as 9.6.1 or 9.6.2, etc.
- the server can return the corresponding prompt information to the client.
- FIG. 2 and FIG. 3 are respectively a flowchart of an embodiment, which is applied to a server to implement a comparison between the old version compressed file and the new version compressed file to obtain a corresponding incremental file (ie, steps S12 to S15 described above).
- the server generates the corresponding incremental file according to the obtained old version compressed file and the new version compressed file as follows:
- step S201 Determine whether the new version of the sub-file in the new version of the compressed file has been read. If yes, the process ends. Otherwise, step S202 is performed.
- step S203 Determine whether an old version subfile corresponding to the read new version subfile exists in the old version compressed file, if yes, execute step S205, otherwise perform step S204.
- step S204 Store the new version subfile in the first storage area for storing the delta file, and return to step S201.
- the new version of the subfile is the first type of subfile. That is, the new version of the subfile is a new file compared to the old version of the compressed file, which can be directly written to the delta file as an incremental subfile.
- step S205 Determine whether the old version subfile and the new version subfile satisfy the preset decompression condition. If both meet the preset decompression condition, step S206 is performed, otherwise step S207 is performed.
- step S206 Decompress the old version subfile and the new version subfile respectively, compare the decompressed old version subfile and the new version subfile, and store the compared first difference data file in the first storage area, and return to step S201.
- the first difference data file described above may be a subfile of the delta file.
- the old version subfile and the new version subfile satisfy the preset decompression condition
- the old version subfile and the new version subfile are the second type subfile, and the decompression comparison method is used to realize the difference comparison between the two, which can ensure The resulting incremental subfile is smaller than the incremental subfile obtained by direct comparison, which in turn makes the entire incremental file smaller.
- the file header of the new version of the subfile is first written into the first storage area, and after the first difference data file is obtained through the decompression and comparison steps, The first difference data file is further written into the first storage area, and the file data headers of the first difference data file and the new version subfile are consecutive in the storage address of the first storage area.
- the server writes the file header of the second type of subfile of the new version of the compressed file to the storage area; decompresses the second type of subfile of the new version of the compressed file and the second type of subfile of the corresponding old version of the compressed file And performing a difference comparison to obtain a first difference data; writing the obtained first difference data After entering the storage address of the file data header of the second type of subfile in the storage area, the second type of subfile is continuously stored in the storage area; according to the file data header and the first difference data of the second type of subfile continuously stored, Get the first difference data file.
- step S207 Directly compare the old version subfile and the new version subfile, and store the compared second difference data file in the first storage area, and return to step S201.
- the above second difference data file can be used as a subfile of the delta file.
- the old version of the subfile does not meet the preset decompression conditions, or the new version of the subfile does not meet the preset decompression conditions, or the old version of the subfile and the new version of the subfile do not meet the preset decompression conditions, the old version of the subfile and the new version of the child
- the file is the third type of subfile.
- the above two methods (decompression comparison method and direct comparison method) are used to compare the difference between the old version of the subfile and the new version of the subfile.
- the size of the resulting incremental subfile is close to or the same. . Therefore, the embodiment of the present application uses the direct comparison method to compare the differences between the third type of sub-files, which can reduce the time consumed by the difference comparison, improve the efficiency of the difference comparison, and further improve the efficiency of the entire incremental upgrade process.
- step S201 if the result of the step S201 is no, that is, the new version of the sub-file in the new version of the compressed file is completely read, indicating that the difference between the old version of the compressed file and the new version of the compressed file has been executed.
- a collection of all the data stored in the first storage area that is, an incremental file for recording difference information between the old version compressed file and the new version compressed file.
- the second difference data may also be obtained by the following method:
- a plurality of new version sub-files of continuous storage ie, storage address consecutive
- the old version sub-files corresponding to the successively stored plurality of new version sub-files are in one-to-one
- the storage location that is, the storage address
- the preset condition is satisfied, the overall file composed of the plurality of newly-updated sub-files continuously stored is compared with another overall file composed of the plurality of consecutively stored plurality of old version sub-files.
- the server determines that there are multiple third-type sub-files with consecutive storage addresses in the new version of the compressed file, and determines that the storage addresses of the corresponding third-type sub-files in the old version of the compressed file are also consecutive;
- the compressed file stores a plurality of third-type sub-files with consecutive addresses as a whole file, and the third-type sub-files with consecutive addresses stored in the old version of the compressed file are used as another overall file; the two entire files are not decompressed directly.
- a difference comparison is made to obtain a second difference data file.
- the steps for the server to generate a corresponding delta file according to the obtained old version compressed file and the new version compressed file are as follows:
- step S201' determining whether the new version of the sub-file in the new version of the compressed file has been read, and if so, ending the flow, otherwise executing step S202'.
- step S203' determining whether there is an old version subfile corresponding to the read new version subfile in the old version compressed file, if yes, executing step S205', otherwise executing step S204'.
- step S204' storing the new version subfile in the first storage area for storing the delta file, and returning to step S201'.
- step S205' determining whether the old version subfile and the new version subfile satisfy the preset decompression condition. If both meet the preset decompression condition, step S206' is performed, otherwise step S207' is performed.
- step S206' decompressing the old version subfile and the new version subfile respectively, comparing the decompressed old version subfile and the new version subfile, and storing the compared first difference data file in the first storage area, and returning to step S201 '.
- step S205' when the result of the determination in step S205' is negative, that is, both the old version subfile and the new version subfile do not satisfy the preset decompression condition, the following steps are performed:
- FIG. 4 is a schematic diagram of a storage structure of an old version compressed file and a new version compressed file in the embodiment
- FIG. 5 is a schematic diagram of a storage structure of a first buffer area and a second buffer area in the embodiment.
- FIG. 4 it is assumed that a new version of the subfile file_21 with the address B01 is stored in the new version compressed file, and the old version subfile file_11 with the address A01 is stored in the old version compressed file, and neither the file_21 nor the file_11 satisfy the preset decompression condition.
- the file_11 is stored in the area of the first buffer area with the address C01
- the file_21 is stored in the area of the second buffer area with the address D01, as shown in FIG.
- step S208' determining whether the next old version subfile and the next new version subfile exist at the same time. If the next old version subfile and the next new version subfile exist at the same time, step S209' is performed, otherwise step S212' is performed.
- the next old version of the subfile refers to the old version of the subfile in the old version of the compressed file that satisfies the following conditions: the storage address is the same as the storage address of the old version of the subfile that was last stored in the first cache in the old version of the compressed file; the next new version A file refers to a new version of a subfile in a new version of a compressed file that satisfies the following conditions: the storage address is consecutive with the storage address of the new version of the subfile that was last stored in the second cache in the new version of the compressed file.
- step S209' can be continued.
- step S209' determining whether the next new version subfile corresponds to the next old version subfile, if so, executing step S210', otherwise performing step S212'.
- step S210' determining whether the next new version subfile and the next old version subfile satisfy the preset decompression condition. If yes, step S212' is performed, otherwise step S211' is performed.
- step S211' storing the next old version subfile in the first buffer area, and storing the next new version subfile in the second buffer area, and returning to step S208'.
- the second difference data file is also stored in the first storage area as a subfile of the delta file.
- the set of all the incremental subfiles stored in the first storage area is an incremental file for recording the difference information between the old version compressed file and the new version compressed file.
- step S209' it is judged in step S209' whether file_12 and file_22 correspond.
- step S210' is performed to determine whether both file_12 and file_22 satisfy the preset decompression condition. If both file_12 and file_22 satisfy the preset decompression condition, it indicates that file_22 is also a third type of subfile. Therefore, step S211' is executed to store file_12 in the area of the first buffer area with the address C03 and file_22 into the second cache.
- the area with the area address D03 is shown in Figure 5.
- the storage addresses of file_11 and file_12 in the first buffer area are also continuous, and the storage addresses of file_21 and file_22 in the first buffer area are also continuous.
- step S208' determines that the next new version subfile and/or the next old version subfile does not exist, or step S209' determines that the next new version subfile does not correspond to the next old version subfile, or step S210' determines
- the next new version of the subfile and the next old version of the subfile meet the preset decompression conditions, it means that there is no next new subfile that satisfies the following conditions: the next new subfile is the third subfile, and the next one The old version of the subfile corresponds to the old version of the subfile corresponding to the old version of the subfile, and the storage address in the old version of the compressed file is continuous.
- step S212' is performed, all the old version sub-files in the first buffer area are regarded as one whole file, and all new version sub-files in the second buffer area are regarded as one overall file, and the above two whole are directly compared by the direct comparison method. After the file performs a difference comparison, the difference information between the multiple new version subfiles and the corresponding old version subfiles can be obtained.
- file_11 and file_12 are treated as an overall file file_1, and file_21 and file_22 are treated as a whole file file_2.
- the sub-files satisfying the following preset conditions can be identified: the plurality of new version sub-files continuously stored are all the third-type sub-files, and the existing version of the compressed file exists and continues.
- the stored version of the new version of the sub-file corresponds to the old version of the sub-file, and the storage location of the plurality of old version of the sub-file in the old version of the compressed file is also continuous; and thus the plurality of new version of the sub-file continuously stored as a whole file
- the corresponding plurality of old version sub-files are used as another overall file, and a difference comparison method is performed on the two whole files by a direct comparison method, so that the second difference data file corresponding to the plurality of third-type sub-files continuously stored can be obtained. . Therefore, the embodiment shown in FIG. 3 can reduce the number of executions of the difference comparison, thereby further reducing the time required to generate the delta file and improving the upgrade efficiency.
- the server performs classification processing on the old version compressed file and the new version compressed file in the stage of performing the difference comparison and generating the incremental file, and adopts different difference comparison methods for different types of subfiles.
- the corresponding difference data file achieves the purpose of taking into account the incremental file size and the upgrade efficiency.
- the process of the client performing the merge operation according to the data type in the delta file is as follows:
- the incremental subfile is a subfile of the delta file, and the delta subfile includes at least one of the first subtype file, the first difference data file, and the second difference data file.
- step S302. Determine whether the incremental subfile is read. If yes, execute step S303; otherwise, end the flow.
- step S304 If the incremental subfile is the first type of subfile, store the first type of subfile in the second storage area, and return to step S301.
- the second storage area is a storage area in the client for storing a new version of the compressed file.
- the file set stored in the second storage area of the client is the target file of the incremental upgrade, that is, the new version compressed file corresponding to the old version compressed file stored by the client.
- the embodiment of the present application not only classifies the sub-files in the old version compressed file and the new version compressed file by the server in the incremental file generation stage, but also uses different difference comparison methods for different types of sub-files.
- the corresponding difference data file achieves the purpose of taking into account the incremental file size and the upgrade efficiency.
- different merge methods are also adopted according to the type of the subfile of the delta file, which can further improve the incremental upgrade efficiency.
- a browser uc_browser applied to the Android system is upgraded from the 9.6.0 version to the 9.6.1 version.
- the traditional direct comparison method is used, the compressed files of the two versions of the apk format are compared as a whole. , the resulting incremental file size is 9410KB. If the compression files of the two versions of the apk format are all decompressed and compared based on the traditional decompression comparison method, the incremental file size is 937 KB, and more than 6000 decompression operations need to be performed during the entire incremental file generation process. (Each version of the compressed file includes more than 3,000 subfiles) and more than 3,000 compression operations (a separate compression operation is performed for each incremental subfile obtained).
- the incremental upgrade method of the embodiment of the present application is adopted, after classification, there are 8 subfiles in the compressed file of the 9.6.1 version as the second type of subfiles, which need to be decompressed and then compared, so only 16 decompression operations are performed (two Versions of compressed files 8 times each) and 1 compression operation (compress all incremental subfiles into one delta file), and the incremental file size is 881KB.
- the client-side merge operation only 9 decompression operations (1 decompression for the delta file, 8 decompression for the 9.6.0 version of the compressed file) and 8 compression operations are performed.
- the eight subfiles obtained by first decompressing and then merging are executed once).
- the method of the present application can reduce the size of the incremental file compared with the traditional method for implementing the incremental upgrade based on the direct comparison method. Compared with the traditional method for implementing the incremental upgrade based on the decompression comparison method, the present application implements For example, the operation complexity can be reduced and the upgrade efficiency can be improved.
- an embodiment of the present application provides another incremental upgrade method, including the following steps:
- the server acquires an old version compressed file and a corresponding new version compressed file.
- the embodiment of the present application may determine two corresponding compressed files according to the file name and/or the version identifier, and further determine, according to the version numbers of the two compressed files, which compressed file is an old version compressed file, and which compressed file is The new version of the compressed file.
- the server obtains at least one of a first type of subfile, a second type of subfile, and a third type of subfile.
- the first type of subfiles are files that exist in the new version of the compressed file but do not exist in the old version of the compressed file;
- the second type of subfiles are both in the new version of the compressed file and the old version of the compressed file and both A file that satisfies the preset decompression condition, including a second type of subfile in the new version of the compressed file and a second type of subfile in the old version of the compressed file;
- the third type of subfile is the new version of the compressed file and the old version of the compressed file Files that exist and partially or completely fail to meet the preset decompression conditions, including the third type of subfile in the new version of the compressed file and the third type of subfile in the old version of the compressed file.
- the server decompresses and compares the second type of subfiles in the new version of the compressed file and the second type of subfiles in the corresponding old version of the compressed file to obtain the first difference data file; the first in the new version of the compressed file
- the third type of subfile and the corresponding third version of the old version of the compressed file are not decompressed and directly compared to obtain a second difference data file.
- the first type of subfile in the new version compressed file is a new file compared to the old version compressed file. Therefore, for the first type of subfile, it is not necessary to perform a difference comparison operation, and the first type of subfile is directly used as a subfile of the delta file.
- the set of the first type of subfile, the first difference data file, and the second difference data file is an incremental file for recording difference information between the old version compressed file and the new version compressed file.
- the server sends the first type of subfile, the first difference data file, and the second difference data file to the client, so that the client incrementally upgrades the old version of the compressed file stored by the client.
- the client receives the first type of subfile, the first difference data file, and the second difference data file, and obtains a new version of the compressed file in the following manner: the second version of the compressed version of the old version After the file is decompressed, it is merged with the first difference data file to obtain a first merged subfile, and the first merged subfile is compressed to obtain a first compressed subfile; and the third type of subfile of the old version of the compressed file is The second above
- the difference data file is merged to obtain a second merged subfile, and the second merged subfile is compressed to obtain a second compressed subfile; the first compressed subfile, the second compressed subfile, and the first subfile are merged to obtain The new version of the compressed file.
- the preset decompression condition may be: the size before the file compression is greater than the preset byte value, and the compression ratio is less than the preset ratio, but is not limited thereto.
- the compression ratio is the ratio of the size of the file after compression to the size before compression.
- the server performs steps S41 to S43 to obtain an incremental file between the old version compressed file and the new version compressed file (including the first type of subfile, the first difference data file, and the first
- the upgrade prompt information may be sent to the client associated with the client.
- the client downloads the corresponding incremental file to implement incremental upgrade of the compressed file of the old version stored by itself.
- the server after receiving the file upgrade request sent by the client, the server sends a corresponding delta file to the client, so that the client incrementally upgrades the old version of the compressed file stored by the client. .
- the server performs classification processing on the subversion file in the old version compressed file and the new version compressed file in the stage of performing the difference comparison and generating the incremental file, Different types of sub-files use different difference comparison methods to obtain different types of difference data files, and then obtain incremental files with multiple types of sub-files, achieving the purpose of both incremental file size and upgrade efficiency.
- the server sends the obtained incremental file to the client, so that the client can adopt different merge methods according to the type of the subfile of the incremental file, which can further improve the incremental upgrade efficiency.
- the embodiment of the present application further provides an incremental upgrade method, including the following steps:
- the client obtains an incremental file from the server, where the incremental file includes at least one of a first type of subfile, a first difference data file, and a second difference data file.
- the first type of subfile is a file that exists in the new version of the compressed file but does not exist in the old version of the compressed file; the first difference data file exists in both the new version of the compressed file and the old version of the compressed file.
- the file that meets the preset decompression condition is decompressed and compared by the difference;
- the second difference data file is that the server has both the new version of the compressed file and the old version of the compressed file, and some or all of the preset decompression conditions are not satisfied.
- the file is not decompressed and the data obtained by comparing the differences directly.
- the first type of subfile is a file that exists in the new version of the compressed file but does not exist in the old version of the compressed file
- the first difference data file is the second type of subfile in the new version of the compressed file and the corresponding old version is compressed
- the second type of subfile in the file is decompressed and compared, and the second type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and that meets the preset decompression conditions
- the second difference The data file is a file obtained by directly comparing the difference between the third type of subfile in the new version of the compressed file and the third type of the subfile in the corresponding old version of the compressed file, wherein the third file is obtained.
- the class subfile is a file that exists in both the new version compressed file and the old version compressed file and partially or completely does not satisfy the preset decompression condition.
- S52 The client performs a merge operation on the obtained delta file and the old version compressed file stored by itself according to the file type in the obtained delta file, to obtain a new version compressed file.
- the delta file includes a first type of subfile, a first difference data file, and a second difference data file
- the client performs a merge operation in the following manner to obtain a new version of the compressed file: the second version of the old version is compressed.
- the class file is decompressed, it is merged with the first difference data file to obtain a first merged subfile, and the first merged subfile is compressed to obtain a first compressed subfile; and the third version of the old version is compressed.
- the preset decompression condition may be: the size before the file compression is greater than the preset byte value, and the compression ratio is less than the preset ratio, but is not limited thereto.
- the compression ratio is the ratio of the size of the file after compression to the size before compression.
- the first difference data file is merged to obtain a first merged subfile, and the first merged subfile is compressed.
- get the first compressed subfile including the following steps:
- the client reads and stores the file data header in the first difference data file
- the embodiment of the present application further provides a server 500 and a client 600, respectively.
- the server 500 is configured to generate a delta file of a new version of the compressed file relative to the old version of the compressed file, and the client 600 acquires the delta file and performs an incremental upgrade of the local old version of the compressed file.
- the client 600 obtains the delta file, and may send the file upgrade request to the server 500 to enable the server 500 to feed back the corresponding delta file; or the server 500 may actively generate the delta file after the incremental file is generated.
- the client 600 sends an upgrade prompt message to remind the client 600 to download the delta file to upgrade the local file.
- a server 500 provided by a feasible embodiment of the present application mainly includes: a first obtaining module 510, a first comparing module 520, a second comparing module 530, and a generating module 540.
- the first obtaining module 510 is configured to obtain at least one of a first type of subfile, a second type of subfile, and a third type of subfile; wherein the first type of subfile exists in a new version of the compressed file.
- the file that does not exist in the old version of the compressed file; the second type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and that meets the preset decompression conditions, including the second in the new version of the compressed file.
- the third type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and partially or completely does not satisfy the preset decompression condition, including The third type of subfile in the new version of the compressed file and the third type of subfile in the old version of the compressed file.
- the preset decompression condition may be: the size before the file compression is greater than the preset byte value and the compression ratio is less than the preset ratio, but is not limited thereto.
- the compression ratio is the ratio of the size of the file after compression to the size before compression.
- the first comparison module 520 is configured to decompress and perform the second type of subfiles in the new version of the compressed file and the second type of subfiles in the corresponding old version of the compressed file when the obtained file includes the second type of subfile. The difference is compared to obtain the first difference data file.
- the second comparison module 530 is configured to: when the obtained file includes the third type of subfile, the third type of subfile in the new version of the compressed file and the third subfile in the corresponding old version of the compressed file are not decompressed directly A difference comparison is made to obtain a second difference data file.
- the generating module 540 is configured to generate, according to the obtained at least one of the first type of subfile, the first difference data file, and the second difference data file, an incremental file for the client to perform file increment upgrade.
- the client after receiving the first type of subfile, the first difference data file, and the second difference data file, the client obtains a new version of the compressed file in the following manner: the second version of the compressed file is the second version.
- the class file After the class file is decompressed, it is merged with the first difference data file to obtain a first merged subfile, and the first merged subfile is compressed to obtain a first compressed subfile; and the third version of the old version is compressed.
- Combining the file with the second difference data file to obtain a second merged subfile compressing the second merged subfile to obtain a second compressed subfile; combining the first compressed subfile, the second compressed subfile, and the first Class subfile, get the new version of the compressed file.
- a server optimized for the server 500 shown in FIG. 10 is as shown in FIG.
- the first comparison module 520 includes: a first writing module 5201, a file data header configured to be a second type of subfile of the new version compressed file is written into the storage area; and the decompression comparison module 5202 is configured to compress the new version file.
- the second type of subfile and the corresponding second version of the old version of the compressed file are decompressed and compared to obtain a first difference data;
- the second writing module 5203 is configured to write the obtained first difference data.
- the first merge module 5204 is configured to be based on the file data of the second type of subfile continuously stored. Head and first difference data, get The first difference data file.
- the second comparison module 530 includes: a determining module 5301 configured to determine that a plurality of third type subfiles having consecutive storage addresses exist in the new version compressed file, and determining a plurality of corresponding thirds in the old version compressed file
- the storage address of the class subfile is also continuous
- the integration module 5302 is configured to store a plurality of third type subfiles with consecutive storage addresses in the new version of the compressed file as a whole file, and store the plurality of consecutive addresses in the compressed file of the old version.
- the three types of sub-files are used as another overall file
- the direct comparison module 5303 is configured to directly perform difference comparison on the two entire files without decompressing to obtain a second difference data file.
- the server 500 of the embodiment further includes: a triggering module 550, configured to obtain, in the first type of subfile, the second type of subfile, and the third type of subfile in the new version of the compressed file by the first obtaining module 510.
- a triggering module 550 configured to obtain, in the first type of subfile, the second type of subfile, and the third type of subfile in the new version of the compressed file by the first obtaining module 510.
- Receiving, at least one, and at least one of the first type of subfile, the second type of subfile, and the third type of subfile in the old version of the compressed file receiving a file upgrade request sent by the client; When the file upgrade request is requested, the first acquiring module is triggered to execute.
- the server provided by the embodiment of the present application performs classification processing on the subversion files in the old version compressed file and the new version compressed file in the stage of performing the difference comparison and generating the incremental file, and different types of sub-files.
- the file uses different difference comparison methods to obtain the difference data file of the corresponding type, and then obtains the incremental file with multiple types of subfiles, thereby achieving the purpose of both the incremental file size and the upgrade efficiency.
- the server sends the obtained incremental file to the client, so that the client can adopt different merge methods according to the type of the subfile of the incremental file, which can further improve the incremental upgrade efficiency.
- a client 600 of the present application includes a second obtaining module 610, a second merge module 620, and an incremental upgrade module 630.
- the second obtaining module 610 is configured to obtain an incremental file from the server, where the incremental file includes at least one of a first type of subfile, a first difference data file, and a second difference data file.
- the first type of subfile is a file that exists in the new version of the compressed file but does not exist in the old version of the compressed file;
- the first difference data file is the second type of subfile in the new version of the compressed file and the corresponding old version of the compressed file.
- the second type of subfiles are decompressed and compared, and the second type of subfiles are files that exist in both the new version of the compressed file and the old version of the compressed file and that meet the preset decompression conditions;
- the second difference data file is The third type of subfile in the new version of the compressed file and the third type of subfile in the corresponding old version of the compressed file are not decompressed and directly compared, and the third type of subfile is a new version of the compressed file and the old version is compressed. Files that exist in the file and that partially or completely do not meet the preset decompression conditions.
- the second merge module 620 is configured to use the delta file to obtain a new version of the compressed file.
- the second merge module 620 may perform a merge operation on the obtained delta file and the old version compressed file stored by itself according to the file type in the obtained delta file to obtain a new version compressed file.
- the second merge module 620 performs the merge operation in the following manner to obtain a new version of the compressed file: After decompressing the second type of subfile of the old version compressed file, merge with the first difference data file to obtain the first merged subfile, and compress the first merged subfile to obtain the first compressed subfile; The third type of subfile of the compressed file is merged with the second difference data file to obtain a second merged subfile, and the second merged subfile is compressed to obtain a second compressed subfile; the first compressed subfile is merged, and the first compressed subfile is merged The second compressed subfile and the first subfile get the new version of the compressed file.
- the incremental upgrade module 630 is configured to incrementally upgrade files using the new version of the compressed file.
- the preset decompression condition may be: the size before the file compression is greater than the preset byte value, and the compression ratio is less than the preset ratio, but is not limited thereto.
- the compression ratio is the ratio of the size of the file after compression to the size before compression.
- the second merge module 620 uses the delta file to obtain the new version of the compressed file and also includes:
- the first subfile is used to obtain a new version of the compressed file
- the second type of the sub-file of the old version of the compressed file is decompressed, and then merged with the first difference data file to obtain the first merged subfile, and the first merged subfile is obtained. Compressing to obtain the first compressed subfile; using the first compressed subfile to obtain a new version of the compressed file;
- the third sub-file of the old version compressed file is merged with the second difference data file to obtain a second merge sub-file, and the second merge sub-file is compressed to obtain a second compressed subfile; using the second compressed subfile to obtain a new version of the compressed file;
- the second type of the sub-file of the old version of the compressed file is decompressed, and then merged with the first difference data file to obtain the first merged sub-file. Compressing the first merged subfile to obtain a first compressed subfile; combining the first compressed subfile and the first type of subfile to obtain a new version of the compressed file;
- the third type of subfile of the old version of the compressed file is merged with the second difference data file to obtain a second merged subfile, and the second merged
- the subfile is compressed to obtain a second compressed subfile; the second compressed subfile and the first subfile are merged to obtain a new version of the compressed file;
- the second type of the sub-file of the old version of the compressed file is decompressed, and then merged with the first difference data file to obtain the first merged sub-file. Compressing the first merged subfile to obtain the first compressed subfile; the third type of subfile of the old version of the compressed file and the second The difference data file is merged to obtain a second merged subfile, and the second merged subfile is compressed to obtain a second compressed subfile; the first compressed subfile and the second compressed subfile are merged to obtain a new version of the compressed file.
- the second merge module 620 decompresses the second type of subfile of the old version compressed file, merges with the first difference data file, obtains the first merged subfile, and compresses the first merged subfile to obtain the first Compressing the subfile includes: reading and storing the file data header in the first difference data file; reading the second type of subfile corresponding to the first difference data in the old version compressed file; and reading the second type of subfile The file is decompressed; the decompressed second type subfile is merged with the first difference data file to obtain a first merged subfile; and the file header and the first merged subfile are compressed to obtain a first compressed subfile.
- the method according to the present application can also be implemented as a computer program executed by a CPU.
- the computer program is executed by the CPU, the above-described functions defined in the method of the present application are performed.
- the embodiment of the present application further provides a computer readable medium having program code executable by a processor, wherein the program code causes the processor to perform the following steps:
- the second type of subfiles; the third type of subfiles are files that exist in the new version of the compressed file and the old version of the compressed file and that partially or completely fail to meet the preset decompression conditions, including the third class in the new version of the compressed file.
- the second sub-file in the new version of the compressed file and the second sub-file in the corresponding old compressed file are decompressed and compared to obtain the first difference data.
- the first type of subfile, the first difference data, and the second difference data are sent to the client, so that the client incrementally upgrades the old version of the compressed file stored by the client.
- the preset decompression condition includes: the size before the file compression is greater than the preset byte value, and the compression ratio is less than the preset ratio; the compression ratio is a ratio of the size of the file after compression to the size before compression.
- a server 500 provided by a possible embodiment of the present application includes a processor 501 and the above computer readable medium 502.
- the processor 501 can execute the program code in the computer readable medium 502 to implement the new version of the compressed file and the old version of the compressed file. Comparing the differences between the two, the corresponding incremental file is obtained. Compared with the traditional device based on the direct comparison method and the decompression comparison method, the device can ensure that the incremental file is smaller and the efficiency of the difference comparison is better. high.
- the embodiment of the present application further provides a computer readable medium having program code executable by a processor, wherein the program code causes the processor to perform the following steps:
- the delta file includes at least one of a first type of subfile, a first difference data file, and a second difference data file; wherein the first type of subfile is compressed in a new version a subfile that exists in the file but does not exist in the old version of the compressed file; the first difference data file is decompressed for the second type of subfile in the new version of the compressed file and the second subtype of the corresponding old version of the compressed file And the file obtained by the difference comparison, the second type of subfile is a file that exists in both the new version of the compressed file and the old version of the compressed file and both meet the preset decompression condition; the second difference data file is the first in the new version of the compressed file.
- the third type of subfiles and the third type of subfiles in the corresponding old version of the compressed file are not decompressed and directly obtained by differential comparison.
- the third type of subfile exists in the new version of the compressed file and the old version of the compressed file and partially or completely Files that do not meet the preset decompression conditions:
- the first difference data file and the second difference data file are executed in the following manner to obtain a new version of the compressed file: after decompressing the second type of subfile of the old version of the compressed file, and merging with the first difference data file Obtaining a first merged subfile, compressing the first merged subfile, and obtaining a first compressed subfile; combining the third type of subfile of the old version of the compressed file with the second differential data file to obtain a second merged sub File, compressing the second merged subfile to obtain a second compressed subfile; combining the first compressed subfile, the second compressed subfile, and the first type of subfile to obtain a new version of the compressed file;
- the preset decompression condition includes: the size before the file compression is greater than the preset byte value, and the compression ratio is less than the preset ratio; the compression ratio is a ratio of the size of the file after compression to the size before compression.
- the client reading and storing the file data header in the first difference data file; reading the second type subfile corresponding to the first difference data file in the old version compressed file; The second type of subfile is decompressed; the decompressed second type subfile is merged with the first difference data file to obtain the first merged subfile; The data header and the first merged subfile are compressed to obtain a first compressed subfile.
- a client 600 provided by a possible embodiment of the present application includes a processor 601 and the above computer readable medium 602.
- the processor 601 executes program code in the computer readable medium 602 and executes it in the client 600.
- the merge operation of the old version of the compressed file and the corresponding incremental file, the corresponding new version of the compressed file is obtained, and the incremental upgrade of the old version of the compressed file is implemented.
- a computer readable medium eg, a memory
- a volatile memory can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory.
- non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash.
- ROM read only memory
- PROM programmable ROM
- EPROM electrically programmable ROM
- EEPROM electrically erasable programmable ROM
- flash volatile memory
- Volatile memory can include random access memory (RAM), which can act as external cache memory.
- RAM can be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM) and direct Rambus RAM (DRRAM).
- DRAM synchronous RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDR SDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM Synchronous Link DRAM
- DRRAM direct Rambus RAM
- Storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
Description
Claims (22)
- 一种增量升级方法,包括:服务器获得第一类子文件、第二类子文件、第三类子文件中的至少一种;其中,所述第一类子文件为新版本压缩文件中存在而旧版本压缩文件中不存在的文件;所述第二类子文件为新版本压缩文件和旧版本压缩文件中都存在且都满足预设解压条件的文件,包括新版本压缩文件中的第二类子文件和旧版本压缩文件中的第二类子文件;所述第三类子文件为新版本压缩文件和旧版本压缩文件中都存在且部分或全部不满足所述预设解压条件的文件,包括新版本压缩文件中的第三类子文件和旧版本压缩文件中的第三类子文件;当获得的文件中包括第二类子文件时,服务器对新版本压缩文件中的第二类子文件以及对应的旧版本压缩文件中的第二类子文件解压并进行差异比较,得到第一差异数据文件;当获得的文件中包括第三类子文件时,服务器对新版本压缩文件中的第三类子文件以及对应的旧版本压缩文件中的第三类子文件不解压直接进行差异比较,得到第二差异数据文件;服务器根据得到的第一类子文件、第一差异数据文件和第二差异数据文件中的至少一种,生成增量文件供客户端进行文件的增量升级。
- 根据权利要求1所述的增量升级方法,其中,所述预设解压条件包括:文件压缩前的大小大于预设字节值,且压缩率小于预设比值;其中,所述压缩率为文件压缩后的大小与压缩前的大小之比。
- 根据权利要求1所述的增量升级方法,其中,服务器对新版本压缩文件中的第二类子文件以及对应的旧版本压缩文件中的第二类子文件解压并进行差异比较,得到第一差异数据文件的步骤包括:服务器将新版本压缩文件的第二类子文件的文件数据头写入存储区;对新版本压缩文件的第二类子文件以及对应的旧版本压缩文件中的第二类子文件解压并进行差异比较,得到第一差异数据;将得到的第一差异数据写入存储区中第二类子文件的文件数据头的存储地址之后,与第二类子文件在存储区中连续存储;根据连续存储的第二类子文件的文件数据头和第一差异数据,得到第一差异数据文件。
- 根据权利要求1所述的增量升级方法,其中,服务器对新版本压缩文件中的第三类子文件以及对应的旧版本压缩文件中的第三类子文件不解压直接进行差异比较,得到 第二差异数据文件的步骤包括:服务器确定新版本压缩文件中存在存储地址连续的多个第三类子文件,以及,确定旧版本压缩文件中相对应的多个第三类子文件的存储地址也连续;将新版本压缩文件中存储地址连续的多个第三类子文件作为一个整体文件,将旧版本压缩文件中存储地址连续的多个第三类子文件作为另一个整体文件;对两个整体文件不解压直接进行差异比较,得到第二差异数据文件。
- 根据权利要求1所述的增量升级方法,其中,在服务器获得第一类子文件、第二类子文件、第三类子文件中的至少一种的步骤之前,所述方法还包括:服务器接收客户端发送的文件升级请求;当接收到所述文件升级请求时,服务器执行所述获得第一类子文件、第二类子文件、第三类子文件中的至少一种的步骤。
- 一种增量升级方法,包括:客户端从服务器获取增量文件,其中,所述增量文件包括第一类子文件、第一差异数据文件以及第二差异数据文件中的至少一种;其中,所述第一类子文件为新版本压缩文件中存在而旧版本压缩文件中不存在的文件;所述第一差异数据文件为对新版本压缩文件中的第二类子文件以及对应的旧版本压缩文件中的第二类子文件解压并进行差异比较得到的文件,所述第二类子文件为新版本压缩文件和旧版本压缩文件中都存在且都满足预设解压条件的文件;所述第二差异数据文件为对新版本压缩文件中的第三类子文件以及对应的旧版本压缩文件中的第三类子文件不解压直接进行差异比较得到的文件,所述第三类子文件为新版本压缩文件和旧版本压缩文件中都存在且部分或全部不满足所述预设解压条件的文件;所述客户端使用增量文件得到新版本压缩文件,包括:当所述增量文件中包括第一类子文件、第一差异数据文件和第二差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;合并所述第一压缩子文件、所述第二压缩子文件以及所述第一类子文件,得到新版本压缩文件;使用新版本压缩文件进行文件的增量升级。
- 根据权利要求6所述的增量升级方法,其中,所述客户端使用增量文件得到新版 本压缩文件还包括:当所述增量文件中仅包括第一类子文件时,使用所述第一类子文件得到新版本压缩文件;当所述增量文件中仅包括第一差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;使用第一压缩子文件得到新版本压缩文件;当所述增量文件中仅包括第二差异数据文件时,将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;使用所述第二压缩子文件得到新版本压缩文件;当所述增量文件中仅包括第一类子文件和第一差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;合并所述第一压缩子文件和所述第一类子文件,得到新版本压缩文件;当所述增量文件中仅包括第一类子文件和第二差异数据文件时,将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;合并所述第二压缩子文件和所述第一类子文件,得到新版本压缩文件;当所述增量文件中仅包括第一差异数据文件和第二差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;合并所述第一压缩子文件和所述第二压缩子文件,得到新版本压缩文件。
- 根据权利要求6或7所述的增量升级方法,其中,所述将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件的步骤,包括:客户端读取并存储所述第一差异数据文件中的文件数据头;读取旧版本压缩文件中与第一差异数据文件对应的第二类子文件;对读取到的第二类子文件进行解压;将解压后的第二类子文件与所述第一差异数据文件合并,得到第一合并子文件;对所述文件数据头和第一合并子文件进行压缩,得到所述第一压缩子文件。
- 根据权利要求6所述的增量升级方法,其中,所述预设解压条件包括:文件压缩前的大小大于预设字节值,且压缩率小于预设比值;其中,所述压缩率为文件压缩后的大小与压缩前的大小之比。
- 一种服务器,包括:第一获取模块,配置为获得第一类子文件、第二类子文件、第三类子文件中的至少一种;其中,所述第一类子文件为新版本压缩文件中存在而旧版本压缩文件中不存在的文件;所述第二类子文件为新版本压缩文件和旧版本压缩文件中都存在且都满足预设解压条件的文件,包括新版本压缩文件中的第二类子文件和旧版本压缩文件中的第二类子文件;所述第三类子文件为新版本压缩文件和旧版本压缩文件中都存在且部分或全部不满足预设解压条件的文件,包括新版本压缩文件中的第三类子文件和旧版本压缩文件中的第三类子文件;第一比较模块,配置为当获得的文件中包括第二类子文件时,对新版本压缩文件中的第二类子文件以及对应的旧版本压缩文件中的第二类子文件解压并进行差异比较,得到第一差异数据文件;第二比较模块,配置为当获得的文件中包括第三类子文件时,对新版本压缩文件中的第三类子文件以及对应的旧版本压缩文件中的第三类子文件不解压直接进行差异比较,得到第二差异数据文件;生成模块,配置为根据得到的所述第一类子文件、所述第一差异数据文件以及所述第二差异数据文件中的至少一种,生成增量文件供客户端进行文件的增量升级。
- 根据权利要求10所述的服务器,其中,所述预设解压条件包括:文件压缩前的大小大于预设字节值,且压缩率小于预设比值;其中,所述压缩率为文件压缩后的大小与压缩前的大小之比。
- 根据权利要求10所述的服务器,其中,所述第一比较模块包括:第一写入模块,配置为新版本压缩文件的第二类子文件的文件数据头写入存储区;解压比较模块,配置为对新版本压缩文件的第二类子文件以及对应的旧版本压缩文件中的第二类子文件解压并进行差异比较,得到第一差异数据;第二写入模块,配置为将得到的第一差异数据写入存储区中第二类子文件的文件数据头的存储地址之后,与第二类子文件在存储区中连续存储;第一合并模块,配置为根据连续存储的第二类子文件的文件数据头和第一差异数据,得到第一差异数据文件。
- 根据权利要求10所述的服务器,其中,所述第二比较模块包括:确定模块,配置为确定新版本压缩文件中存在存储地址连续的多个第三类子文件,以及,确定旧版本压缩文件中相对应的多个第三类子文件的存储地址也连续;整合模块,配置为将新版本压缩文件中存储地址连续的多个第三类子文件作为一个整体文件,将旧版本压缩文件中存储地址连续的多个第三类子文件作为另一个整体文件;直接比较模块,配置为对两个整体文件不解压直接进行差异比较,得到第二差异数据文件。
- 根据权利要求10所述的服务器,其中,所述服务器还包括:触发模块,配置为在所述第一获取模块获得第一类子文件、第二类子文件、第三类子文件中的至少一种之前,接收客户端发送的文件升级请求;当接收到所述文件升级请求时,触发所述第一获取模块执行。
- 一种客户端,包括:第二获取模块,配置为从服务器获取增量文件,其中,所述增量文件包括第一类子文件、第一差异数据文件以及第二差异数据文件中的至少一种;其中,所述第一类子文件为新版本压缩文件中存在而旧版本压缩文件中不存在的文件;所述第一差异数据文件为对新版本压缩文件中的第二类子文件以及对应的旧版本压缩文件中的第二类子文件解压并进行差异比较得到的文件,所述第二类子文件为新版本压缩文件和旧版本压缩文件中都存在且都满足预设解压条件的文件;所述第二差异数据文件为对新版本压缩文件中的第三类子文件以及对应的旧版本压缩文件中的第三类子文件不解压直接进行差异比较得到的文件,所述第三类子文件为新版本压缩文件和旧版本压缩文件中都存在且部分或全部不满足预设解压条件的文件;第二合并模块,配置为使用增量文件得到新版本压缩文件,包括:当所述增量文件中包括第一类子文件、第一差异数据文件和第二差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;合并所述第一压缩子文件、所述第二压缩子文件以及所述第一类子文件,得到新版本压缩文件;增量升级模块,配置为使用新版本压缩文件进行文件的增量升级。
- 根据权利要求15所述的客户端,其中,所述第二合并模块使用增量文件得到新 版本压缩文件还包括:当所述增量文件中仅包括第一类子文件时,使用所述第一类子文件得到新版本压缩文件;当所述增量文件中仅包括第一差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;使用所述第一压缩子文件得到新版本压缩文件;当所述增量文件中仅包括第二差异数据文件时,将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;使用所述第二压缩子文件得到新版本压缩文件;当所述增量文件中仅包括第一类子文件和第一差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;合并所述第一压缩子文件和所述第一类子文件,得到新版本压缩文件;当所述增量文件中仅包括第一类子文件和第二差异数据文件时,将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;合并所述第二压缩子文件和所述第一类子文件,得到新版本压缩文件;当所述增量文件中仅包括第一差异数据文件和第二差异数据文件时,将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件;将旧版本压缩文件的第三类子文件与所述第二差异数据文件合并,得到第二合并子文件,对所述第二合并子文件进行压缩,得到第二压缩子文件;合并所述第一压缩子文件和所述第二压缩子文件,得到新版本压缩文件。
- 根据权利要求15或16所述的客户端,其中,所述第二合并模块将旧版本压缩文件的第二类子文件解压缩后,与所述第一差异数据文件合并,得到第一合并子文件,对所述第一合并子文件进行压缩,得到第一压缩子文件,包括:读取并存储所述第一差异数据文件中的文件数据头;读取旧版本压缩文件中与第一差异数据对应的第二类子文件;对读取到的第二类子文件进行解压;将解压后的第二类子文件与所述第一差异数据文件合并,得到第一合并子文件;对所述文件数据头和第一合并子文件进行压缩,得到所述第一压缩子文件。
- 根据权利要求15所述的客户端,其中,所述预设解压条件包括:文件压缩前的大小大于预设字节值,且压缩率小于预设比值;其中,所述压缩率为文件压缩后的大小与压缩前的大小之比。
- 一种包含程序指令的计算机程序,当所述计算机程序在服务器上运行时,引发所述服务器执行根据权利要求1-5中任一项所述的增量升级方法。
- 一种计算机可读介质,其中存储了根据权利要求19所述的计算机程序。
- 一种包含程序指令的计算机程序,当所述计算机程序在客户端上运行时,引发所述客户端执行根据权利要求6-9中任一项所述的增量升级方法。
- 一种计算机可读介质,其中存储了根据权利要求21所述的计算机程序。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/315,272 US10048959B2 (en) | 2014-05-30 | 2014-09-18 | Method and apparatus for incremental upgrade |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410238919.4 | 2014-05-30 | ||
CN201410238919.4A CN105404521B (zh) | 2014-05-30 | 2014-05-30 | 一种增量升级方法及相关装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015180304A1 true WO2015180304A1 (zh) | 2015-12-03 |
Family
ID=54697990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/086816 WO2015180304A1 (zh) | 2014-05-30 | 2014-09-18 | 增量升级方法及装置 |
Country Status (3)
Country | Link |
---|---|
US (1) | US10048959B2 (zh) |
CN (1) | CN105404521B (zh) |
WO (1) | WO2015180304A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109558156A (zh) * | 2019-01-15 | 2019-04-02 | 重庆德科电子仪表有限公司 | 一种汽车仪表升级优化方法 |
CN110389773A (zh) * | 2018-04-23 | 2019-10-29 | 比亚迪股份有限公司 | 软件发布及部署方法、装置及系统 |
WO2021079975A1 (ja) * | 2019-10-23 | 2021-04-29 | ソニー株式会社 | 表示システム、表示装置、表示方法、及び、移動装置 |
CN113326059A (zh) * | 2020-02-28 | 2021-08-31 | 腾讯科技(深圳)有限公司 | 一种资源更新方法、装置及存储介质 |
Families Citing this family (31)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105404521B (zh) | 2014-05-30 | 2017-05-31 | 广州市动景计算机科技有限公司 | 一种增量升级方法及相关装置 |
CN105930197A (zh) * | 2016-06-28 | 2016-09-07 | 乐视控股(北京)有限公司 | 一种软件升级的方法及电子设备 |
CN106354525B (zh) * | 2016-08-11 | 2019-10-01 | 深圳市宜搜科技发展有限公司 | 应用软件安装包差分存储方法及系统 |
CN106844479B (zh) * | 2016-12-23 | 2020-07-07 | 光锐恒宇(北京)科技有限公司 | 文件的压缩、解压方法及装置 |
CN106708581A (zh) * | 2016-12-27 | 2017-05-24 | 北京奇虎科技有限公司 | 应用的更新包生成方法、装置和应用的更新方法、装置 |
CN106685718A (zh) * | 2016-12-30 | 2017-05-17 | 杭州迪普科技股份有限公司 | 配置切换方法及装置 |
CN108279941B (zh) | 2016-12-31 | 2021-06-15 | 阿里巴巴集团控股有限公司 | 一种应用程序的压缩方法和装置 |
CN106648712A (zh) * | 2017-02-27 | 2017-05-10 | 百度在线网络技术(北京)有限公司 | 增量更新包的生成方法、装置和服务器 |
US10394548B2 (en) | 2017-07-25 | 2019-08-27 | Aurora Labs Ltd. | Assembling data deltas in vehicle ECUs and managing interdependencies between software versions in vehicle ECUs using tool chain |
CN107391145A (zh) * | 2017-07-27 | 2017-11-24 | 中兴通讯股份有限公司 | 升级包制作方法及装置、升级文件的方法及装置 |
CN109542493A (zh) * | 2017-09-22 | 2019-03-29 | 华为技术有限公司 | 一种镜像升级方法及设备 |
CN107704311A (zh) * | 2017-09-27 | 2018-02-16 | 郑州云海信息技术有限公司 | 一种虚拟机内存迁移方法及其装置 |
US10241903B1 (en) * | 2017-11-15 | 2019-03-26 | Accenture Global Solutions Limited | Parallel testing and reporting system |
US11321080B2 (en) * | 2018-07-19 | 2022-05-03 | Huawei Technologies Co., Ltd. | Patch package generation method and device |
KR102626253B1 (ko) * | 2018-11-23 | 2024-01-17 | 현대자동차주식회사 | Ota를 이용한 차량용 소프트웨어 업데이트 방법 및 장치 |
CN111258620B (zh) * | 2018-11-30 | 2022-02-22 | 中兴通讯股份有限公司 | 差分升级包的生成方法、装置和设备 |
CN111324660B (zh) * | 2018-12-13 | 2024-05-24 | 杭州海康威视系统技术有限公司 | 数据同步方法、装置、电子设备及机器可读存储介质 |
US11416232B2 (en) * | 2019-09-03 | 2022-08-16 | Google Llc | Accelerating application and sub-package installations |
CN111142903B (zh) * | 2019-12-23 | 2023-09-22 | 杭州安恒信息技术股份有限公司 | 一种基于文件对比的配置文件交互式更新方法及装置 |
WO2021128269A1 (zh) * | 2019-12-27 | 2021-07-01 | 深圳市欢太科技有限公司 | 文件处理方法、文件处理装置、移动终端及服务器 |
CN113127017B (zh) * | 2019-12-30 | 2024-07-12 | 西安诺瓦星云科技股份有限公司 | 系统升级方法、装置及系统 |
US11599551B2 (en) | 2020-03-30 | 2023-03-07 | Oracle International Corporation | Deserialization of stream objects using multiple deserialization algorithms |
US11477258B2 (en) * | 2020-03-30 | 2022-10-18 | Oracle International Corporation | Serialization of objects using multiple serialization algorithms |
CN111580851B (zh) * | 2020-06-24 | 2024-12-06 | 腾讯科技(深圳)有限公司 | 一种数据管理的方法以及相关装置 |
CN111984597B (zh) * | 2020-08-19 | 2023-12-08 | 安徽鸿程光电有限公司 | 文件存储方法、装置、设备和介质 |
CN112818656B (zh) * | 2021-01-26 | 2023-10-27 | 北京百度网讯科技有限公司 | 数据差异对比方法、装置、设备、介质和计算机程序产品 |
US11256480B1 (en) | 2021-02-09 | 2022-02-22 | Oracle International Corporation | Deserialization of stream objects using constant-foldable method handles |
US11288045B1 (en) | 2021-02-09 | 2022-03-29 | Oracle International Corporation | Object creation from structured data using indirect constructor invocation |
CN113377711B (zh) * | 2021-06-29 | 2024-04-30 | 云洗电子商务有限公司 | 数据处理方法、装置、设备及计算机可读存储介质 |
US20230185859A1 (en) * | 2021-12-13 | 2023-06-15 | Toshiba Tec Kabushiki Kaisha | Document management device, document management method, and non-transitory recording medium |
WO2024176011A1 (en) * | 2023-02-22 | 2024-08-29 | International Business Machines Corporation | Object storage deduplication |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102523268A (zh) * | 2011-12-08 | 2012-06-27 | 北京新媒传信科技有限公司 | 一种客户端升级方法和系统 |
CN103051723A (zh) * | 2012-12-27 | 2013-04-17 | 广州市动景计算机科技有限公司 | 一种增量升级方法及服务器、终端 |
CN103095838A (zh) * | 2013-01-16 | 2013-05-08 | 福州博远无线网络科技有限公司 | 一种通过下载增量升级包来升级安卓智能手机软件的方法 |
CN103714105A (zh) * | 2012-09-14 | 2014-04-09 | 哈曼贝克自动系统股份有限公司 | 更新导航装置的数据库的方法和装置 |
CN103713928A (zh) * | 2013-12-31 | 2014-04-09 | 优视科技有限公司 | 增量文件生成方法、应用程序安装文件更新方法及装置 |
Family Cites Families (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7898442B1 (en) * | 1997-05-30 | 2011-03-01 | International Business Machines Corporation | On-line data compression analysis and regulation |
US6493871B1 (en) * | 1999-09-16 | 2002-12-10 | Microsoft Corporation | Method and system for downloading updates for software installation |
US7143115B2 (en) * | 2003-04-15 | 2006-11-28 | Pocket Soft, Inc. | Method and apparatus for finding differences between two computer files efficiently in linear time and for using these differences to update computer files |
TWI255420B (en) * | 2004-12-22 | 2006-05-21 | Mitac Technology Corp | Software package system |
EP1934729B1 (en) * | 2005-10-06 | 2021-06-23 | Red Bend Ltd. | Methods and systems for updating content including a compressed version |
KR101426710B1 (ko) * | 2006-07-14 | 2014-09-23 | 삼성전자주식회사 | 휴대단말기의 버전정보 갱신 장치 및 방법 |
US8756195B2 (en) * | 2009-08-27 | 2014-06-17 | The Boeing Company | Universal delta set management |
US8639671B2 (en) * | 2010-06-29 | 2014-01-28 | Teradata Us, Inc. | Database compression |
WO2012056493A1 (en) * | 2010-10-26 | 2012-05-03 | Hitachi, Ltd. | File management method and computer system |
US20120131566A1 (en) * | 2010-11-23 | 2012-05-24 | Microsoft Corporation | Efficient virtual application update |
US20140007074A1 (en) * | 2012-06-27 | 2014-01-02 | Google Inc. | Methods for updating applications |
US9170804B2 (en) * | 2012-07-05 | 2015-10-27 | Nokia Technologies Oy | Method and apparatus for modifying compressed files |
EP2778905A1 (en) * | 2013-03-15 | 2014-09-17 | Dialog Semiconductor B.V. | Integrated circuit with a patching function |
CN103336703B (zh) * | 2013-07-08 | 2018-09-18 | 惠州Tcl移动通信有限公司 | 生成升级包的方法、服务器、软件升级方法、移动终端 |
CN105404521B (zh) | 2014-05-30 | 2017-05-31 | 广州市动景计算机科技有限公司 | 一种增量升级方法及相关装置 |
-
2014
- 2014-05-30 CN CN201410238919.4A patent/CN105404521B/zh active Active
- 2014-09-18 US US15/315,272 patent/US10048959B2/en active Active
- 2014-09-18 WO PCT/CN2014/086816 patent/WO2015180304A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102523268A (zh) * | 2011-12-08 | 2012-06-27 | 北京新媒传信科技有限公司 | 一种客户端升级方法和系统 |
CN103714105A (zh) * | 2012-09-14 | 2014-04-09 | 哈曼贝克自动系统股份有限公司 | 更新导航装置的数据库的方法和装置 |
CN103051723A (zh) * | 2012-12-27 | 2013-04-17 | 广州市动景计算机科技有限公司 | 一种增量升级方法及服务器、终端 |
CN103095838A (zh) * | 2013-01-16 | 2013-05-08 | 福州博远无线网络科技有限公司 | 一种通过下载增量升级包来升级安卓智能手机软件的方法 |
CN103713928A (zh) * | 2013-12-31 | 2014-04-09 | 优视科技有限公司 | 增量文件生成方法、应用程序安装文件更新方法及装置 |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110389773A (zh) * | 2018-04-23 | 2019-10-29 | 比亚迪股份有限公司 | 软件发布及部署方法、装置及系统 |
CN109558156A (zh) * | 2019-01-15 | 2019-04-02 | 重庆德科电子仪表有限公司 | 一种汽车仪表升级优化方法 |
CN109558156B (zh) * | 2019-01-15 | 2021-07-27 | 重庆德科电子仪表有限公司 | 一种汽车仪表升级优化方法 |
WO2021079975A1 (ja) * | 2019-10-23 | 2021-04-29 | ソニー株式会社 | 表示システム、表示装置、表示方法、及び、移動装置 |
CN113326059A (zh) * | 2020-02-28 | 2021-08-31 | 腾讯科技(深圳)有限公司 | 一种资源更新方法、装置及存储介质 |
CN113326059B (zh) * | 2020-02-28 | 2024-04-26 | 腾讯科技(深圳)有限公司 | 一种资源更新方法、装置及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN105404521A (zh) | 2016-03-16 |
US10048959B2 (en) | 2018-08-14 |
CN105404521B (zh) | 2017-05-31 |
US20170249140A1 (en) | 2017-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015180304A1 (zh) | 增量升级方法及装置 | |
KR102007070B1 (ko) | 메모리 관리 시의 중복 제거를 위해서 기준 세트로 기준 블록을 취합하는 기법 | |
JP6316974B2 (ja) | フラッシュメモリ圧縮 | |
US9507811B2 (en) | Compressed data page with uncompressed data fields | |
US20240004838A1 (en) | Quality score compression for improving downstream genotyping accuracy | |
CN112732650B (zh) | 文件分片方法及装置 | |
US20130067237A1 (en) | Providing random access to archives with block maps | |
US9977598B2 (en) | Electronic device and a method for managing memory space thereof | |
JP2013541774A (ja) | ウェブサイトスキャンデバイスおよびウェブサイトスキャン方法 | |
CN105204781A (zh) | 压缩方法、装置和设备 | |
US20200117642A1 (en) | Determining optimal data size for data deduplication operation | |
US9355250B2 (en) | Method and system for rapidly scanning files | |
CN111177271B (zh) | kafka数据持久化到hdfs的数据存储方法、装置、计算机设备 | |
US10915534B2 (en) | Extreme value computation | |
JP2002529849A (ja) | データ処理リソースを供給された内蔵システムにおいて実行可能な中間オブジェクトコードプログラムのためのデータ圧縮方法、および、この方法に対応しかつマルチアプリケーションを備えた内蔵システム | |
US20120271802A1 (en) | Forward compatibility guaranteed data compression and decompression method and apparatus thereof | |
US20170123678A1 (en) | Garbage Collection for Reference Sets in Flash Storage Systems | |
KR20170010810A (ko) | 플래시 메모리 내에 데이터를 판독/기록하기 위한 방법, 장치 및 사용자 장비 | |
CN106293542B (zh) | 一种文件解压缩的方法及装置 | |
CN105320669B (zh) | 数据存储、读取方法及数据存储、读取装置 | |
CN114816219A (zh) | 数据写入和读取方法、装置及数据读写系统 | |
CN110377276B (zh) | 源代码文件管理方法及设备 | |
CN109992469A (zh) | 一种合并日志的方法及装置 | |
CN107577474B (zh) | 升级文件的处理方法及装置、电子设备 | |
CN109189345B (zh) | 一种在线数据整理方法、装置、设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14893238 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15315272 Country of ref document: US |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.05.2017) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14893238 Country of ref document: EP Kind code of ref document: A1 |