CN117971260A - Application updating method, device, computer equipment and storage medium - Google Patents

Application updating method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117971260A
CN117971260A CN202311836005.3A CN202311836005A CN117971260A CN 117971260 A CN117971260 A CN 117971260A CN 202311836005 A CN202311836005 A CN 202311836005A CN 117971260 A CN117971260 A CN 117971260A
Authority
CN
China
Prior art keywords
file
resource
target
compression algorithm
compression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311836005.3A
Other languages
Chinese (zh)
Inventor
郑启强
詹定根
杨明睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202311836005.3A priority Critical patent/CN117971260A/en
Publication of CN117971260A publication Critical patent/CN117971260A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses an application updating method, an application updating device, computer equipment and a storage medium. According to the scheme, compression algorithm modification information of a resource file of a target application is obtained, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles of a compression algorithm to be modified in the resource file, then an initial compression file corresponding to the resource file is obtained, each target resource subfile is decompressed from the initial compression file based on the compression algorithm modification records, and compression processing is carried out on each target resource subfile based on the compression algorithm modification records of each target resource subfile to obtain a target compression file of the resource file; and finally, updating the target application based on the target compressed file. Therefore, the difference data generated by the original compressed file and the modified compressed file of the target application can be reduced, and the updating efficiency of the application software can be improved.

Description

Application updating method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application update method, an application update device, a computer device, and a storage medium.
Background
With the rapid development of mobile games, users have increasingly higher requirements on the quality of the games, so that the frequency of updating the games is faster and faster. In order to avoid that the user needs to download the game again every time, the game is updated in a mode of differentially updating patches at present, namely, the data with differences before and after the game is updated in a patch mode. In addition, in order to make the downloaded package smaller, game resources are compressed.
In the related art, compression algorithm is utilized to respectively compress an original file and a modified file of a game, the obtained two compressed files are subjected to differentiation operation, a differentiation patch is generated, and the differentiation patch is sent to a game client for updating. However, when the compression algorithm needs to be updated, the package body of the differentiated patch is very large due to the fact that the compressed files obtained by different compression algorithms are different, the time of downloading the patch package by the client is long, and the game updating efficiency is affected.
Disclosure of Invention
The embodiment of the application provides an application updating method, an application updating device, computer equipment and a storage medium, which can improve the updating efficiency of application software.
The embodiment of the application provides an application updating method, which comprises the following steps:
Acquiring compression algorithm modification information of a resource file of a target application, wherein the compression algorithm modification information comprises a compression algorithm modification record corresponding to a target resource sub-file of a compression algorithm to be modified in the resource file;
Acquiring an initial compression file corresponding to the resource file, wherein the initial compression file is obtained by compressing the resource file based on a compression algorithm before modification;
based on the compression algorithm modification record, each target resource subfile is decompressed from the initial compressed file;
Modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compression file of the resource file;
And finishing updating of the target application based on the target compressed file.
Correspondingly, the embodiment of the application also provides an application updating device, which comprises:
The first acquisition unit is used for acquiring compression algorithm modification information of a resource file of a target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles of which the compression algorithm needs to be modified in the resource file;
the second acquisition unit is used for acquiring an initial compressed file corresponding to the resource file, wherein the initial compressed file is obtained by compressing the resource file based on a compression algorithm before modification;
the decompression unit is used for decompressing each target resource subfile from the initial compressed file based on the compression algorithm modification record;
The compression unit is used for modifying the record based on the compression algorithm of each target resource subfile, compressing each target resource subfile and obtaining a target compression file of the resource file;
And the updating unit is used for completing the updating of the target application based on the target compressed file.
Correspondingly, the embodiment of the application also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the application updating method provided by any one of the embodiments of the application.
Correspondingly, the embodiment of the application also provides a storage medium which stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the application updating method.
The embodiment of the application obtains the compression algorithm modification information of the resource file of the target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles needing to modify the compression algorithm in the resource file, then obtains initial compression files corresponding to the resource file, decompresses each target resource subfile from the initial compression files based on the compression algorithm modification records, and compresses each target resource subfile based on the compression algorithm modification records of each target resource subfile to obtain the target compression file of the resource file; and finally, updating the target application based on the target compressed file. Therefore, the difference data generated by the original compressed file and the modified compressed file of the target application can be reduced, and the updating efficiency of the application software can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an application update.
Fig. 2 is a flowchart of an application update method according to an embodiment of the present application.
Fig. 3 is a flowchart of an application updating method according to an embodiment of the present application.
Fig. 4 is a block diagram of an application updating device according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
In the related art, after the development of the game product is completed, the resource file of the game product needs to be packaged and then externally put to the player for downloading, after the downloading of the client resource is completed, the resource file also needs to be updated along with the updating of the game product, and in the game updating stage, the game inclusion is large, generally, the game is carried out in a differential updating patch mode, namely, the data with differences before and after are updated in a patch mode, so that the updating data which the player needs to download is less. Wherein differential updates are typically operated on compressed resource files.
For example, referring to fig. 1, fig. 1 is a flowchart of an application update, wherein an original file refers to an original resource file of a game product, and a modified original file refers to a resource file of an updated game product. The method comprises the steps of performing compression processing on an original file to obtain a compressed file, performing compression processing on a modified original file to obtain a modified compressed file, and further performing differentiation operation on the compressed file and the modified compressed file, namely obtaining difference data of the compressed file and the modified compressed file to obtain a differentiated patch, applying the differentiated patch to a game client, and obtaining a new game client through updating.
However, with the updating of the compression algorithm, the new compression algorithm brings better compression effect, for example, the compression speed is higher and the compression efficiency is higher, so that the game item can select to use the new updated compression algorithm to compress the resource file. In the game updating process, the modified resource file is compressed by using a new compression algorithm to obtain a modified compressed file, and at this time, the compressed file of the external network is still the compressed file obtained by using the old compression algorithm.
When the compression algorithm changes, even if the data in the resource file before compression is not modified, the compressed resource file is actually differential because the resource file is compressed and then differentiated. Thus, substantially the entire game resource file may have data differences, resulting in a very large differential patch being generated, which is very unfriendly to players for updating the game.
The embodiment of the application provides an application updating method, an application updating device, a storage medium and computer equipment. Specifically, the application updating method of the embodiment of the application can be executed by a computer device, wherein the computer device can be a server or the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligent platforms, and the like.
For example, the computer device may be a terminal, where the terminal may obtain compression algorithm modification information of a resource file of the target application, where the compression algorithm modification information includes a compression algorithm modification record corresponding to a target resource subfile in the resource file that needs to modify a compression algorithm; acquiring an initial compression file corresponding to the resource file, wherein the initial compression file is obtained by compressing the resource file based on a compression algorithm before modification; modifying the record based on a compression algorithm, and decompressing each target resource subfile from the initial compressed file; modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compression file of the resource file; and updating the target application based on the target compressed file.
Based on the above problems, the embodiments of the present application provide a first application update method, apparatus, computer device, and storage medium, which can improve update efficiency of application software.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The embodiment of the application provides an application updating method which can be executed by a terminal or a server, and the embodiment of the application is described by taking the application updating method executed by the server as an example.
Fig. 2 is a schematic flow chart of an application updating method according to an embodiment of the present application, as shown in fig. 2. The specific flow of the application updating method can be as follows:
101. And obtaining the compression algorithm modification information of the resource file of the target application.
In the embodiment of the application, the target application can be application software, and the application software refers to various programming languages which can be used by a user and a set of application programs compiled by the various programming languages, and is divided into an application software package and a user program. For example, the target application may be game application software or the like.
The resource file refers to a file obtained after the development of the target application is completed, and a user can complete the installation of the target application according to the resource file by downloading the resource file to the terminal, wherein the resource file can comprise a plurality of resource subfiles.
The compression algorithm modification information may include a compression algorithm modification record corresponding to a target resource sub-file of the compression algorithm to be modified in the resource file, where the target resource sub-file refers to a resource sub-file of the compression algorithm to be modified in the resource file, and the compression algorithm modification record corresponding to each target resource sub-file may include a compression algorithm before modification and a compression algorithm after modification.
Specifically, the compression algorithm refers to an algorithm for data compression, and is also commonly referred to as signal coding in the field of electronics and communication, and includes two steps of compression and restoration (or decoding and encoding).
For example, the compression algorithm may include: LZMA compression algorithm, LZ4 compression algorithm, gzip compression algorithm, and the like. The LZMA compression algorithm is applied to a 7-Zip compression tool, a dictionary coding mechanism similar to LZ77 is used, the compression rate is higher than bzip2 under the general condition, and the maximum variable dictionary used for compression can reach 4GB; the LZ4 compression algorithm follows the LZ77 theory, realizes data compression through sliding window, hash table, data coding and other operations, searches for matching by taking at least 4 bytes as a scanning window in the compression process, scans by moving 1 byte each time, and compresses when repeated; the Gzip compression algorithm compresses a file to be compressed by first compressing a file using a variant of the LZ77 algorithm and then compressing the result using huffman coding (static huffman coding or dynamic huffman coding, as the case may be).
Among them, different compression algorithms may have differences in the effects of file compression/decompression, for example, different compression algorithms may have differences in the effects of compression speed, compression rate, decompression speed, and the like.
In the embodiment of the application, after the compression algorithm is used for compressing the resource file of the target application, a compression package of the resource file is obtained, and the terminal downloads the compression package to obtain the resource file of the target application for installation, wherein the purpose of compressing the resource file by using the compression algorithm is to reduce the data downloaded by the terminal.
After the target application is developed, the resource file can be compressed through a compression algorithm, for example, a first compression algorithm, so as to obtain a first compression file of the resource file; the terminal may download the first compressed file to obtain the resource file for installation. If a new compression algorithm is subsequently deduced, a better compression/decompression effect is brought, the compression algorithm used by the resource file of the target application during compression needs to be replaced, namely the initially used first compression algorithm is updated to be the new compression algorithm.
In some embodiments, to reduce the size of the generated difference patch, the method may further include:
determining subfiles needing to modify a compression algorithm in the resource file to obtain target resource subfiles;
acquiring a compression algorithm before modification and a compression algorithm after modification corresponding to the target resource subfile, and generating a compression algorithm modification record;
and obtaining compression algorithm modification information based on the file identification of the target resource subfile and the compression algorithm modification record.
In the embodiment of the application, the subfiles needing to modify the compression algorithm in the resource file can be determined by acquiring the resource subfiles with the compression algorithm modification marks in the resource file, and the resource subfiles with the marks are used as target resource subfiles.
The compression algorithm modification mark of the resource subfiles in the resource file can be marked for game developers.
For example, the resource file may include: a first resource sub-file, a second resource sub-file, a third resource sub-file, a fourth resource sub-file, etc. The resource subfiles that the developer determines to modify the compression algorithm may be: the developer can perform compression algorithm modification marking on the resource subfiles, the second resource subfiles and the third resource subfiles, for example, adding characters of 'compression algorithm update' on the file names of the resource subfiles as marks, and other marking modes and the like can be also included.
The terminal can further read the mark information of each resource in the resource file, and the resource subfiles marked by the compression algorithm modification exist, so as to determine the target resource subfiles needing the compression algorithm modification.
The compression algorithm before modification refers to a compression algorithm used for compressing the modified resource file when the target application is updated last time, and the compression algorithm after modification refers to a compression algorithm used for compressing the modified resource file when the target application is updated currently.
Wherein the modified compression algorithm of the target resource subfile can be set by a developer.
For example, the target resource subfile may include: the first resource subfile, the second resource subfile, and the third resource subfile. The compression algorithm before modification for obtaining the first resource subfile, the second resource subfile, and the third resource subfile may be a first compression algorithm, and the compression algorithm after modification for the first resource subfile, the second resource subfile, and the third resource subfile may be a second compression algorithm, and the compression algorithm modification record for the first resource subfile may be generated as follows: modifying from the first compression algorithm to a second compression algorithm; the compression algorithm modification record of the second resource subfile is: modifying from the first compression algorithm to a second compression algorithm; the compression algorithm modification record of the third resource subfile is: the first compression algorithm is modified to the second compression algorithm.
Further, the file identifier of each target resource sub-file is obtained, and the file identifier can be a file name. For example, the file name of the first resource subfile may be: the file name of the second resource subfile may be aaa: bbb, the file name of the third resource subfile may be: ccc.
Finally, according to the file identification of each target resource subfile and the compression algorithm modification record table, the obtaining compression algorithm modification information comprises: aaa: modifying from the first compression algorithm to a second compression algorithm; bbb: modifying from the first compression algorithm to a second compression algorithm; aaa: the first compression algorithm is modified to the second compression algorithm ccc.
102. And obtaining an initial compressed file corresponding to the resource file.
The initial compressed file is obtained by compressing the resource file based on a compression algorithm before modification.
In some embodiments, before the step of "obtaining the initial compressed file corresponding to the resource file", the method may further include the steps of:
And compressing each resource subfile in the resource file according to an initial compression algorithm to obtain an initial compressed file.
The initial compression algorithm can be a compression algorithm used for compression before uploading to the external network after target application development is completed. The initial compressed file may be an installation package downloaded for the terminal installation target application.
Specifically, before uploading the initial compressed file to the external network for downloading by the terminal, the resource file needs to be compressed, that is, each resource sub-file in the resource file is compressed by using an initial compression algorithm, and the obtained compression package of each resource sub-file is packaged, so as to obtain the initial compressed file.
The terminal acquires the initial compressed file, and can acquire the initial compressed file in a downloading mode or in a file sharing mode.
103. And modifying the record based on a compression algorithm, and decompressing each target resource subfile from the initial compressed file.
In some embodiments, the compression algorithm modification record may include a file identifier of the target resource subfile and a modified compression algorithm corresponding to the target resource subfile, and then the step of "decompressing each target resource subfile from the initial compressed file based on the compression algorithm modification record" may include the following operations:
reading a file identifier in a compression algorithm modification record;
And decompressing the initial compressed file based on the file identification and the compression algorithm before modification to obtain each target resource subfile.
The compression algorithm modification information comprises compression algorithm modification records corresponding to all target resource subfiles.
For example, the compression algorithm modification information includes compression algorithm modification records of a plurality of target resource subfiles, which may be: aaa: modifying from the first compression algorithm to a second compression algorithm; bbb: modifying from the first compression algorithm to a second compression algorithm; aaa: the first compression algorithm is modified to the second compression algorithm ccc.
And further reading file identifiers in the compression algorithm modification records, which are aaa, bbb, ccc respectively.
In some embodiments, in order to modify the compression algorithm of the compressed files in the initial compressed file, the step of decompressing the initial compressed file based on the file identifier and the compression algorithm before modification to obtain each target resource subfile may include the following operations:
determining an initial compression sub-file corresponding to the file identification from the initial compression file;
And decompressing the initial compressed subfile according to the compression algorithm before modification to obtain the target resource subfile.
The initial compressed file is obtained by compressing the resource file, and may include the compressed file corresponding to each resource sub-file in the resource file.
After the file identification in the compression algorithm modification information is read, searching the compressed file corresponding to the file identification from the initial compressed file to obtain an initial compressed sub-file.
For example, the resource file may include a first resource sub-file, a second resource sub-file, a third resource sub-file, and a fourth resource sub-file, and the initial compressed file includes: the method comprises the steps of compressing files corresponding to a first resource sub-file, compressing files corresponding to a second resource sub-file, compressing files corresponding to a third resource sub-file and compressing files corresponding to a fourth resource sub-file.
Further, according to the file identifier aaa, bbb, ccc read from the compression algorithm modification information, searching a compressed file corresponding to the file identifier aaa from each compressed file in the initial compressed files to be a compressed file corresponding to the first resource subfile; the compressed file corresponding to the file identifier bbb is a compressed file corresponding to the second resource subfile; the compressed file corresponding to the file identifier ccc is a compressed file corresponding to the second resource subfile. Obtaining an initial compressed subfile includes: the compressed files corresponding to the first resource subfiles, the compressed files corresponding to the second resource subfiles and the compressed files corresponding to the third resource subfiles.
The compression algorithm before modification may be an initial compression algorithm, and for a compression file corresponding to the first resource subfile, a compression file corresponding to the second resource subfile, and a compression file corresponding to the third resource subfile, the compression algorithm before modification is used to perform decompression processing, and the first resource subfile, the second resource subfile, and the third resource subfile are decompressed from the initial compression file to serve as target resource subfiles.
104. And modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compressed file of the resource file.
In some embodiments, to complete modification of the compression algorithm of the compressed file in the initial compressed file, the step of "modifying the record based on the compression algorithm of each target resource subfile, performing compression processing on each target resource subfile to obtain a target compressed file of the resource file" may include the following operations:
determining a modified compression algorithm in each compression algorithm modification record;
Respectively compressing each target compression sub-file according to the modified compression algorithm to obtain target compression sub-files corresponding to each target compression sub-file;
and obtaining the target compressed file based on each target compressed sub-file.
For example, the compression algorithm modification record for the first resource subfile is: modifying from the first compression algorithm to a second compression algorithm; the compression algorithm modification record of the second resource subfile is: modifying from the first compression algorithm to a second compression algorithm; the compression algorithm modification record of the third resource subfile is: the modification from the first compression algorithm to the second compression algorithm may then determine that the modified compression algorithm is the second compression algorithm.
Further, a second compression algorithm is used for compressing the first resource subfile to obtain a target compressed subfile corresponding to the first resource subfile; compressing the second resource subfile by using a second compression algorithm to obtain a target compressed subfile corresponding to the second resource subfile; and compressing the third resource subfile by using a second compression algorithm to obtain a target compressed subfile corresponding to the third resource subfile.
In some embodiments, the step of "obtaining the target compressed file based on each target compressed subfile" may include the following operations:
And writing each target compressed sub-file into the packaging file to obtain the target compressed file.
Specifically, writing the plurality of target compressed subfiles into the package file, that is, merging the plurality of target compressed subfiles into one compressed file as the target compressed file.
Because the application software has a lot of resource files, hundreds of thousands and millions, each file cannot exist in the application client independently, some files are packaged into a packaged file (for example, ten thousands of files are packaged into one file), and the package body containing many files is called as a packaged file.
105. And updating the target application based on the target compressed file.
In some embodiments, the step of "completing the update of the target application based on the target compressed file" may include the following operations:
acquiring an updated compressed file corresponding to the updated resource file of the target application;
performing differentiation processing on the updated compressed file and the target compressed file to obtain a difference patch file;
And updating the resource file based on the difference patch file to obtain the updated target application.
The updated resource file refers to a resource file updated and modified by the target application, and the updated compressed file refers to a compressed file obtained by compressing the updated resource file by using a modified compression algorithm.
The target compressed file is a compressed file of a resource file which is stored in the external network terminal and is not updated by the target application, and is compressed based on an updated compressed algorithm, namely the updated compressed file is the same as the compressed algorithm used by the target compressed file.
Specifically, the updated compressed file and the target compressed file are subjected to differentiation processing, namely, difference data of the updated compressed file and the target compressed file are obtained, and a difference patch, namely, an updated patch file of the target application is obtained based on the difference data.
And the terminal can download the update patch file, and perform conventional application update operation based on the update patch file, so as to complete the client update of the target application.
The embodiment of the application discloses an application updating method, which comprises the following steps: acquiring compression algorithm modification information of a resource file of a target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles of the compression algorithm to be modified in the resource file; acquiring an initial compression file corresponding to the resource file, wherein the initial compression file is obtained by compressing the resource file based on a compression algorithm before modification; modifying the record based on a compression algorithm, and decompressing each target resource subfile from the initial compressed file; modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compression file of the resource file; and updating the target application based on the target compressed file. Therefore, the difference data generated by the original compressed file and the modified compressed file of the target application can be reduced, and the updating efficiency of the application software can be improved.
In light of the foregoing, the application update method of the present application will be further described by way of example. Referring to fig. 3, fig. 3 is a flowchart of an application update method according to an embodiment of the present application, where the application update method is applied to update a game application.
The original file refers to an original resource file of the game product, and the compressed file refers to a compressed file obtained by compressing the original file by using a new compression algorithm.
Further, the compressed files are subjected to compression algorithm modification records, namely file identifiers of all the compressed files in the compressed files are recorded, and the compression algorithm modification records corresponding to all the compressed files comprise a compression algorithm before modification and a compression algorithm after modification, so that the compression algorithm modification record information is used for generating a differential patch.
Wherein the differencing patch does not include a differencing file of the game resource file, but only includes a record of the compression algorithm modification.
The compression algorithm modification record patch file may then be uploaded to the external network. Furthermore, the terminal of the external network can download the compression algorithm modification record patch file, and when the patch is applied, the relevant configuration information is read from the patch file, for example, the configuration information can comprise the resource subfiles needing to modify the compression algorithm, the corresponding modified compression algorithm and the like.
Specifically, for all files needing to be modified by the compression algorithm, the original resource files, namely the game local decompressed files, are decompressed from the game local compressed files by using an old compression mode, namely the compression algorithm before modification.
The game local compressed file refers to a compressed file of a resource file of a game application initially downloaded by a terminal.
And finally, recompressing the game local decompression file by using a new compression mode, namely, a modified compression algorithm to obtain a game local update compression file, and rewriting the compressed new file into the packaging file, thereby completing the update of the compression algorithm of the game resource file in the terminal.
In order to facilitate better implementation of the application updating method provided by the embodiment of the application, the embodiment of the application also provides an application updating device based on the application updating method. Where nouns have the same meaning as in the application update method described above, specific implementation details may be referred to in the description of the method embodiments.
Referring to fig. 4, fig. 4 is a block diagram of an application updating apparatus according to an embodiment of the present application, where the apparatus includes:
A first obtaining unit 301, configured to obtain compression algorithm modification information of a resource file of a target application, where the compression algorithm modification information includes a compression algorithm modification record corresponding to a target resource sub-file in the resource file, where a compression algorithm needs to be modified;
the second obtaining unit 302 is configured to obtain an initial compressed file corresponding to the resource file, where the initial compressed file is obtained by compressing the resource file based on a compression algorithm before modification;
a decompression unit 303, configured to decompress each target resource subfile from the initial compressed file based on the compression algorithm modification record;
and the compression unit 304 is configured to modify the record based on a compression algorithm of each target resource subfile, and compress each target resource subfile to obtain a target compressed file of the resource file.
And the updating unit 305 is used for completing the updating of the target application based on the target compressed file.
In some embodiments, the decompression unit 303 may include:
A reading subunit, configured to read a file identifier in the compression algorithm modification record;
and the decompression sub-unit is used for decompressing the initial compressed file based on the file identification and the pre-modification compression algorithm to obtain each target resource sub-file.
In some embodiments, the decompression subunit may be specifically configured to:
determining an initial compression sub-file corresponding to the file identifier from the initial compression file;
And decompressing the initial compressed subfile according to the pre-modification compression algorithm to obtain the target resource subfile.
In some embodiments, the compression unit 304 may include:
a first determining subunit, configured to determine a modified compression algorithm in each compression algorithm modification record;
The compression subunit is used for respectively compressing each target compression sub-file according to the modified compression algorithm to obtain target compression sub-files corresponding to each target compression sub-file;
and the second determining subunit is used for obtaining the target compressed file based on each target compressed sub-file.
In some embodiments, the second determining subunit may be specifically configured to:
And writing each target compressed sub-file into the packaging file to obtain the target compressed file.
In some embodiments, the update unit 305 may include:
the acquisition subunit is used for acquiring an updated compressed file corresponding to the updated resource file of the target application;
the processing subunit is used for carrying out differentiation processing on the updated compressed file and the target compressed file to obtain a difference patch file;
And the updating subunit is used for updating the resource file based on the difference patch file to obtain an updated target application.
In some embodiments, the apparatus may further comprise:
The first determining unit is used for determining subfiles needing to modify a compression algorithm in the resource file to obtain the target resource subfile;
The third acquisition unit is used for acquiring a compression algorithm before modification and a compression algorithm after modification corresponding to the target resource subfile and generating a compression algorithm modification record;
and the second determining unit is used for obtaining the compression algorithm modification information based on the file identification of the target resource subfile and the compression algorithm modification record.
In some embodiments, the apparatus may further comprise:
and the processing unit is used for compressing each resource subfile in the resource file according to an initial compression algorithm to obtain the initial compressed file.
The embodiment of the application discloses an application updating device, which acquires compression algorithm modification information of a resource file of a target application through a first acquisition unit 301, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles of which the compression algorithm needs to be modified in the resource file; the second obtaining unit 302 obtains an initial compressed file corresponding to the resource file, where the initial compressed file is obtained by compressing the resource file based on a compression algorithm before modification; the decompression unit 303 decompresses each target resource subfile from the initial compressed file based on the compression algorithm modification record; the compression unit 304 modifies the record based on the compression algorithm of each target resource sub-file, and compresses each target resource sub-file to obtain a target compressed file of the resource file. The updating unit 305 completes the updating of the target application based on the target compressed file. Thus, the updating efficiency of the application software can be improved.
Correspondingly, the embodiment of the application also provides computer equipment which can be a server. Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application, as shown in fig. 5. The computer apparatus 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Processor 401 is a control center of computer device 400 and connects the various portions of the entire computer device 400 using various interfaces and lines to perform various functions of computer device 400 and process data by running or loading software programs and/or modules stored in memory 402 and invoking data stored in memory 402, thereby performing overall monitoring of computer device 400.
In the embodiment of the present application, the processor 401 in the computer device 400 loads the instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions:
Acquiring compression algorithm modification information of a resource file of a target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles of the compression algorithm to be modified in the resource file;
acquiring an initial compression file corresponding to the resource file, wherein the initial compression file is obtained by compressing the resource file based on a compression algorithm before modification;
modifying the record based on a compression algorithm, and decompressing each target resource subfile from the initial compressed file;
modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compression file of the resource file;
and updating the target application based on the target compressed file.
In some embodiments, the compression algorithm modification record includes a file identification of the target resource subfile and a modified compression algorithm corresponding to the target resource subfile;
Modifying the record based on the compression algorithm, and decompressing each target resource subfile from the initial compressed file, wherein the method comprises the following steps:
reading a file identifier in a compression algorithm modification record;
And decompressing the initial compressed file based on the file identification and the compression algorithm before modification to obtain each target resource subfile.
In some embodiments, based on the file identifier and the pre-modification compression algorithm, decompressing the initial compressed file to obtain each target resource subfile, including:
determining an initial compression sub-file corresponding to the file identification from the initial compression file;
And decompressing the initial compressed subfile according to the compression algorithm before modification to obtain the target resource subfile.
In some embodiments, modifying the record based on a compression algorithm of each target resource subfile, and performing compression processing on each target resource subfile to obtain a target compressed file of the resource file, including:
determining a modified compression algorithm in each compression algorithm modification record;
Respectively compressing each target compression sub-file according to the modified compression algorithm to obtain target compression sub-files corresponding to each target compression sub-file;
and obtaining the target compressed file based on each target compressed sub-file.
In some embodiments, obtaining the target compressed file based on each target compressed subfile includes:
And writing each target compressed sub-file into the packaging file to obtain the target compressed file.
In some embodiments, completing the updating of the target application based on the target compressed file includes:
acquiring an updated compressed file corresponding to the updated resource file of the target application;
performing differentiation processing on the updated compressed file and the target compressed file to obtain a difference patch file;
And updating the resource file based on the difference patch file to obtain the updated target application.
In some embodiments, the method further comprises:
determining subfiles needing to modify a compression algorithm in the resource file to obtain target resource subfiles;
acquiring a compression algorithm before modification and a compression algorithm after modification corresponding to the target resource subfile, and generating a compression algorithm modification record;
and obtaining compression algorithm modification information based on the file identification of the target resource subfile and the compression algorithm modification record.
In some embodiments, before obtaining the initial compressed file corresponding to the resource file, the method further includes:
And compressing each resource subfile in the resource file according to an initial compression algorithm to obtain an initial compressed file.
The embodiment of the application obtains the compression algorithm modification information of the resource file of the target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles needing to modify the compression algorithm in the resource file, then obtains initial compression files corresponding to the resource file, decompresses each target resource subfile from the initial compression files based on the compression algorithm modification records, and compresses each target resource subfile based on the compression algorithm modification records of each target resource subfile to obtain the target compression file of the resource file; and finally, updating the target application based on the target compressed file. Therefore, the difference data generated by the original compressed file and the modified compressed file of the target application can be reduced, and the updating efficiency of the application software can be improved.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 5, the computer device 400 further includes: a touch display 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch display 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407, respectively. Those skilled in the art will appreciate that the computer device structure shown in FIG. 5 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components.
The touch display 403 may be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of a computer device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 401, and can receive and execute commands sent from the processor 401. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 401 to determine the type of touch event, and the processor 401 then provides a corresponding visual output on the display panel in accordance with the type of touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 403 to realize the input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch-sensitive display 403 may also implement an input function as part of the input unit 406.
In an embodiment of the present application, the processor 401 executes the game application program to generate a graphical user interface on the touch display screen 403, where the virtual scene on the graphical user interface includes at least one skill control area, and the skill control area includes at least one skill control. The touch display 403 is used for presenting a graphical user interface and receiving an operation instruction generated by a user acting on the graphical user interface.
The radio frequency circuitry 404 may be used to transceive radio frequency signals to establish wireless communications with a network device or other computer device via wireless communications.
The audio circuitry 405 may be used to provide an audio interface between a user and a computer device through speakers, microphones, and so on. The audio circuit 405 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 405 and converted into audio data, which are processed by the audio data output processor 401 and sent via the radio frequency circuit 404 to, for example, another computer device, or which are output to the memory 402 for further processing. The audio circuit 405 may also include an ear bud jack to provide communication of the peripheral ear bud with the computer device.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 407 is used to power the various components of the computer device 400. Alternatively, the power supply 407 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. The power supply 407 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 5, the computer device 400 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., and will not be described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
As can be seen from the foregoing, the computer device provided in this embodiment may obtain the compression algorithm modification information of the resource file of the target application, where the compression algorithm modification information includes a compression algorithm modification record corresponding to a target resource sub-file in the resource file, where the compression algorithm needs to be modified; acquiring an initial compression file corresponding to the resource file, wherein the initial compression file is obtained by compressing the resource file based on a compression algorithm before modification; modifying the record based on a compression algorithm, and decompressing each target resource subfile from the initial compressed file; modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compression file of the resource file; and updating the target application based on the target compressed file.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform the steps of any of the application updating methods provided by the embodiment of the present application. For example, the computer program may perform the steps of:
Acquiring compression algorithm modification information of a resource file of a target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles of the compression algorithm to be modified in the resource file;
acquiring an initial compression file corresponding to the resource file, wherein the initial compression file is obtained by compressing the resource file based on a compression algorithm before modification;
modifying the record based on a compression algorithm, and decompressing each target resource subfile from the initial compressed file;
modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compression file of the resource file;
and updating the target application based on the target compressed file.
In some embodiments, the compression algorithm modification record includes a file identification of the target resource subfile and a modified compression algorithm corresponding to the target resource subfile;
Modifying the record based on the compression algorithm, and decompressing each target resource subfile from the initial compressed file, wherein the method comprises the following steps:
reading a file identifier in a compression algorithm modification record;
And decompressing the initial compressed file based on the file identification and the compression algorithm before modification to obtain each target resource subfile.
In some embodiments, based on the file identifier and the pre-modification compression algorithm, decompressing the initial compressed file to obtain each target resource subfile, including:
determining an initial compression sub-file corresponding to the file identification from the initial compression file;
And decompressing the initial compressed subfile according to the compression algorithm before modification to obtain the target resource subfile.
In some embodiments, modifying the record based on a compression algorithm of each target resource subfile, and performing compression processing on each target resource subfile to obtain a target compressed file of the resource file, including:
determining a modified compression algorithm in each compression algorithm modification record;
Respectively compressing each target compression sub-file according to the modified compression algorithm to obtain target compression sub-files corresponding to each target compression sub-file;
and obtaining the target compressed file based on each target compressed sub-file.
In some embodiments, obtaining the target compressed file based on each target compressed subfile includes:
And writing each target compressed sub-file into the packaging file to obtain the target compressed file.
In some embodiments, completing the updating of the target application based on the target compressed file includes:
acquiring an updated compressed file corresponding to the updated resource file of the target application;
performing differentiation processing on the updated compressed file and the target compressed file to obtain a difference patch file;
And updating the resource file based on the difference patch file to obtain the updated target application.
In some embodiments, the method further comprises:
determining subfiles needing to modify a compression algorithm in the resource file to obtain target resource subfiles;
acquiring a compression algorithm before modification and a compression algorithm after modification corresponding to the target resource subfile, and generating a compression algorithm modification record;
and obtaining compression algorithm modification information based on the file identification of the target resource subfile and the compression algorithm modification record.
In some embodiments, before obtaining the initial compressed file corresponding to the resource file, the method further includes:
And compressing each resource subfile in the resource file according to an initial compression algorithm to obtain an initial compressed file.
The embodiment of the application obtains the compression algorithm modification information of the resource file of the target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles needing to modify the compression algorithm in the resource file, then obtains initial compression files corresponding to the resource file, decompresses each target resource subfile from the initial compression files based on the compression algorithm modification records, and compresses each target resource subfile based on the compression algorithm modification records of each target resource subfile to obtain the target compression file of the resource file; and finally, updating the target application based on the target compressed file. Therefore, the difference data generated by the original compressed file and the modified compressed file of the target application can be reduced, and the updating efficiency of the application software can be improved.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any application updating method provided by the embodiment of the present application can be executed by the computer program stored in the storage medium, so that the beneficial effects that any application updating method provided by the embodiment of the present application can be achieved, and detailed descriptions of the previous embodiments are omitted herein.
The foregoing describes in detail an application updating method, apparatus, storage medium and computer device provided by the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (11)

1. An application updating method, the method comprising:
Acquiring compression algorithm modification information of a resource file of a target application, wherein the compression algorithm modification information comprises a compression algorithm modification record corresponding to a target resource sub-file of a compression algorithm to be modified in the resource file;
Acquiring an initial compression file corresponding to the resource file, wherein the initial compression file is obtained by compressing the resource file based on a compression algorithm before modification;
based on the compression algorithm modification record, each target resource subfile is decompressed from the initial compressed file;
Modifying the record based on the compression algorithm of each target resource subfile, and carrying out compression processing on each target resource subfile to obtain a target compression file of the resource file;
And finishing updating of the target application based on the target compressed file.
2. The method of claim 1, wherein the compression algorithm modification record includes a file identification of a target resource subfile and a modified compression algorithm corresponding to the target resource subfile;
the modifying the record based on the compression algorithm, and decompressing each target resource subfile from the initial compressed file, including:
reading a file identifier in the compression algorithm modification record;
and decompressing the initial compressed file based on the file identification and the pre-modification compression algorithm to obtain each target resource subfile.
3. The method according to claim 2, wherein said decompressing the initial compressed file based on the file identifier and the pre-modification compression algorithm to obtain the target resource subfiles includes:
determining an initial compression sub-file corresponding to the file identifier from the initial compression file;
And decompressing the initial compressed subfile according to the pre-modification compression algorithm to obtain the target resource subfile.
4. The method of claim 1, wherein the compressing the target resource subfiles to obtain the target compressed file of the resource file based on the compression algorithm modification record of the target resource subfiles comprises:
determining a modified compression algorithm in each compression algorithm modification record;
compressing each target compression sub-file according to the modified compression algorithm to obtain a target compression sub-file corresponding to each target compression sub-file;
and obtaining the target compressed file based on each target compressed sub-file.
5. The method of claim 4, wherein the obtaining the target compressed file based on each target compressed subfile comprises:
And writing each target compressed sub-file into the packaging file to obtain the target compressed file.
6. The method of claim 1, wherein the completing the updating of the target application based on the target compressed file comprises:
acquiring an updated compressed file corresponding to the updated resource file of the target application;
Performing differentiation processing on the updated compressed file and the target compressed file to obtain a difference patch file;
and updating the resource file based on the difference patch file to obtain the updated target application.
7. The method according to claim 1, wherein the method further comprises:
Determining subfiles needing to modify a compression algorithm in the resource file to obtain the target resource subfiles;
acquiring a compression algorithm before modification and a compression algorithm after modification corresponding to the target resource subfile, and generating a compression algorithm modification record;
And obtaining the compression algorithm modification information based on the file identification of the target resource subfile and the compression algorithm modification record.
8. The method of claim 1, wherein prior to the obtaining the initial compressed file corresponding to the resource file, the method further comprises:
And compressing each resource sub-file in the resource file according to an initial compression algorithm to obtain the initial compressed file.
9. An application updating apparatus, the apparatus comprising:
The first acquisition unit is used for acquiring compression algorithm modification information of a resource file of a target application, wherein the compression algorithm modification information comprises compression algorithm modification records corresponding to target resource subfiles of which the compression algorithm needs to be modified in the resource file;
the second acquisition unit is used for acquiring an initial compressed file corresponding to the resource file, wherein the initial compressed file is obtained by compressing the resource file based on a compression algorithm before modification;
the decompression unit is used for decompressing each target resource subfile from the initial compressed file based on the compression algorithm modification record;
The compression unit is used for modifying the record based on the compression algorithm of each target resource subfile, compressing each target resource subfile and obtaining a target compression file of the resource file;
And the updating unit is used for completing the updating of the target application based on the target compressed file.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the application update method of any of claims 1 to 8 when the program is executed by the processor.
11. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the application updating method of any one of claims 1 to 8.
CN202311836005.3A 2023-12-28 2023-12-28 Application updating method, device, computer equipment and storage medium Pending CN117971260A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311836005.3A CN117971260A (en) 2023-12-28 2023-12-28 Application updating method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311836005.3A CN117971260A (en) 2023-12-28 2023-12-28 Application updating method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117971260A true CN117971260A (en) 2024-05-03

Family

ID=90856639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311836005.3A Pending CN117971260A (en) 2023-12-28 2023-12-28 Application updating method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117971260A (en)

Similar Documents

Publication Publication Date Title
CN105302587B (en) Data-updating method and device
CN106528125A (en) Data file incremental updating method, server, client and system
CN104252364A (en) Increment updating method, equipment and system
CN108804130B (en) Program installation package generation method and device
CN114185491B (en) Partition file downloading method and device, storage medium and computer equipment
CN112114849B (en) Resource updating method and device
CN113302585A (en) Accelerating applications and sub-packet installation
CN110780940A (en) Application program loading method, electronic device and storage medium
CN110609694A (en) BUG repairing method and device, terminal equipment and storage medium
CN113568645B (en) Software updating method, device, electronic equipment and storage medium
CN117971260A (en) Application updating method, device, computer equipment and storage medium
CN114095533B (en) Cloud game account login method and device, computer equipment and storage medium
CN111262737A (en) Port configuration management method and device, storage medium and terminal
CN113518088B (en) Data processing method, device, server, client and medium
CN114676371A (en) Page element information replacement method and device, computer equipment and storage medium
CN113742716B (en) Code running method, device, electronic equipment, storage medium and program product
CN110442361B (en) Gray release method and device and electronic equipment
CN109558731B (en) Feature code processing method, device and storage medium
CN110688344A (en) File scanning method and device, computer readable storage medium and terminal
CN112891933B (en) Game service starting method and related device
CN114726849B (en) File transmission method, device, server and computer readable storage medium
CN114372032A (en) Resource file synchronization method, device, equipment and storage medium
CN111104566B (en) Feature index encoding method, device, electronic equipment and storage medium
CN115982110B (en) File running method, file running device, computer equipment and readable storage medium
CN113996066A (en) Game application updating method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination