CN114564227A - Application program updating method and device, electronic equipment and storage medium - Google Patents

Application program updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114564227A
CN114564227A CN202210211546.6A CN202210211546A CN114564227A CN 114564227 A CN114564227 A CN 114564227A CN 202210211546 A CN202210211546 A CN 202210211546A CN 114564227 A CN114564227 A CN 114564227A
Authority
CN
China
Prior art keywords
file
version
application program
patch
identifier
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
CN202210211546.6A
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 CN202210211546.6A priority Critical patent/CN114564227A/en
Publication of CN114564227A publication Critical patent/CN114564227A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The embodiment of the invention provides an application program updating method, an application program updating device, electronic equipment and a storage medium, wherein the method comprises the following steps: taking a resource file corresponding to the latest version identification of an application program and a resource file corresponding to the previous version identification of the application program which are different as version difference files corresponding to the latest version identification; acquiring a version difference file corresponding to the historical version identification of the application program; merging the version difference file corresponding to the latest version identification and the version difference file corresponding to the historical version identification into a delta patch file according to the high-low sequence of the version identifications; taking the byte length of the version difference file corresponding to each version identification in the incremental patch file as the file download length corresponding to each version identification and storing the file download length as a patch list file; the delta patch file and the patch list file are used for updating the application program of the terminal equipment. The embodiment of the invention improves the updating efficiency of the application program.

Description

Application program updating method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to an application program updating method, an application program updating device, electronic equipment and a storage medium.
Background
With the rapid development of the internet, the application programs are updated more and more frequently. Taking a game program as an example, as the playing methods of the game program are more and more abundant, the image quality of the game is more and more high, and the 3D (three-dimensional) stereoscopic effect is more and more real, meanwhile, as the performance of terminal devices such as a computer, a game host, a mobile phone and the like is more and more high, the requirements of game players on the game image quality, playability, experience, safety and the like of the game program are more and more strict, therefore, patch files are often required to be issued on line during the game operation period to modify the game program, so as to meet the requirements of patching BUGs (faults) in the game program, increasing the game playing methods, patching security and the like.
However, although the application update scheme is already applied in the market, the patch files of all update versions corresponding to the application are usually released, so that the terminal device needs to download a larger patch file when updating the application, so that the update efficiency of the application is low.
Disclosure of Invention
The embodiment of the invention provides an application program updating method, which aims to solve the problem of low updating efficiency of an application program in the prior art.
Correspondingly, the embodiment of the invention also provides an application program updating device which is used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present invention discloses an application program updating method, which is applied to a server, and the method includes:
taking a resource file corresponding to the latest version identification of an application program and a resource file corresponding to the previous version identification of the application program which are different as version difference files corresponding to the latest version identification;
acquiring a version difference file corresponding to the historical version identification of the application program;
merging the version difference file corresponding to the latest version identification and the version difference file corresponding to the historical version identification into a delta patch file according to the high-low sequence of the version identifications;
taking the byte length of the version difference file corresponding to each version identification in the incremental patch file as the file download length corresponding to each version identification and storing the file download length as a patch list file; and updating the application program of the terminal equipment by using the delta patch file and the patch list file.
Optionally, the taking a resource file corresponding to a latest version identifier of an application program and a resource file corresponding to a previous version identifier of the application program that are different from each other as a version difference file corresponding to the latest version identifier includes:
acquiring a first message digest identifier of a resource file corresponding to the latest version identifier of an application program and a second message digest identifier of the resource file corresponding to the previous version identifier of the application program;
and making the resource file corresponding to the first message digest identifier different from the second message digest identifier into a version difference file corresponding to the latest version identifier.
Optionally, after the obtaining of the version difference file corresponding to the historical version identifier of the application program, the method further includes:
and deleting the same resource files in the version difference files corresponding to the historical version identifications and the version difference files corresponding to the latest version identifications.
Optionally, the number of the delta patch files is one.
The embodiment of the invention also discloses an application program updating method which is applied to the terminal equipment and comprises the following steps:
acquiring a current version identifier of an application program;
acquiring a patch list file of the application program; the patch list file comprises file download lengths corresponding to all version identifications of the application program, and the file download lengths are used for representing byte lengths of incremental patch files needing to be downloaded;
acquiring the target file download length of the current version identification from the patch list file;
downloading the target incremental patch file from the incremental patch file according to the target file downloading length;
and updating the application program according to the target increment patch file.
Optionally, the obtaining the patch list file of the application program includes:
sending a network request for requesting a patch list file of the application program to a server;
and receiving the patch list file sent by the server according to the network request.
Optionally, the downloading the target delta patch file from the delta patch file according to the target file download length includes:
sending a network request for requesting a delta patch file of the application program to a server; the network request comprises the download length of the target file; the server is used for extracting a target delta patch file with the target file download length from the delta patch files;
and receiving the target delta patch file sent by the server.
Optionally, the number of the delta patch files is one; the higher the current version identification of the application program is, the smaller the target delta patch file is.
The embodiment of the invention also discloses an application program updating device which is applied to a server, and the device comprises:
the version difference file generation module is used for taking a resource file corresponding to the latest version identification of an application program and a resource file corresponding to the previous version identification of the application program which are different as the version difference file corresponding to the latest version identification;
the version difference file acquisition module is used for acquiring a version difference file corresponding to the historical version identifier of the application program;
the version difference file merging module is used for merging the version difference file corresponding to the latest version identification and the version difference file corresponding to the historical version identification into an incremental patch file according to the high-low sequence of the version identifications;
a patch list file generation module, configured to use the byte length of the version difference file corresponding to each version identifier in the incremental patch file as a file download length corresponding to each version identifier, and store the file download length as a patch list file; and updating the application program of the terminal equipment by using the delta patch file and the patch list file.
The embodiment of the invention also discloses an application program updating device which is applied to the terminal equipment, and the device comprises:
the version identification acquisition module is used for acquiring the current version identification of the application program;
a patch list file obtaining module, configured to obtain a patch list file of the application program; the patch list file comprises file download lengths corresponding to all version identifications of the application program, and the file download lengths are used for representing byte lengths of incremental patch files needing to be downloaded;
a file download length determining module, configured to obtain a target file download length of the current version identifier from the patch list file;
the delta patch file downloading module is used for downloading the target delta patch file from the delta patch file according to the target file downloading length;
and the application program updating module is used for updating the application program according to the target increment patch file.
The embodiment of the invention discloses electronic equipment, which comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, the steps of the application program updating method are realized.
The embodiment of the invention discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the application program updating method are realized.
The embodiment of the invention also discloses a computer program product, which is stored in a storage medium and is executed by at least one processor to realize the method according to the embodiment of the invention.
The embodiment of the invention has the following advantages:
in the embodiment of the present invention, a version difference file corresponding to the latest version identifier is generated according to a resource file corresponding to the latest version identifier of an application program and a resource file corresponding to the previous version identifier of the application program, the version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier are merged into a delta patch file according to the high-low order of the version identifiers, in addition, the byte length of the version difference file corresponding to each version identifier in the delta patch file is also used as the file download length corresponding to each version identifier and is stored as a patch list file, and then, the terminal device can update the application program by using the delta patch file and the patch list file. When the terminal equipment of the embodiment of the invention updates the application program, the corresponding target delta patch file is downloaded from the delta patch file only by the target file downloading length determined from the patch list file based on the latest version identification, and the whole delta patch file is not required to be downloaded, so that unnecessary delta patch files are prevented from being downloaded, and the updating efficiency of the application program is improved.
Drawings
FIG. 1 is a schematic diagram of the processing logic of an AssetBundle bulk file update scheme;
FIG. 2 is a schematic diagram of a packing process of an incremental resource package;
FIG. 3 is a schematic diagram of processing logic for an incremental resource package update scheme;
FIG. 4 is a schematic diagram of processing logic for a skip delta update scheme;
FIG. 5 is a flowchart of the steps of one embodiment of an application update method of the present invention;
FIG. 6 is a schematic illustration of the packaging of a delta patch file in accordance with the present invention;
FIG. 7 is a diagram of a dictionary A of an MD5 of a type that records all resource files identified by a previous version of the invention;
FIG. 8 is a diagram of a dictionary B of an MD5 of a resource file having recorded a version difference file for each version identification, in accordance with the present invention;
FIG. 9 is a diagram illustrating a variation of Diff8 for creating a delta patch file identified by the latest version according to the present invention;
FIG. 10 is a flowchart of the steps of another application update method embodiment of the present invention;
FIG. 11 is a schematic illustration of an application interaction update of the present invention;
FIG. 12 is a schematic illustration of a delta patch file for an application of the present invention;
FIG. 13 is a block diagram of an embodiment of an application update apparatus according to the present invention;
FIG. 14 is a block diagram of an alternate embodiment of an application update apparatus of the present invention;
fig. 15 is a block diagram of an electronic device provided in an embodiment of the invention;
fig. 16 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention more comprehensible, the present invention is described in detail with reference to the accompanying drawings and the detailed description thereof.
Taking a game program (client) as an example, in the related technical solution, a game patch release and update scheme of a game program commonly used by a Unity game engine includes:
1. AssetBundle bulk file update scheme:
referring to FIG. 1, the processing logic of the AssetBundle bulk file update scheme is:
the client logic: (1) in the Resconfig configuration file, locally recording a resource list and a resource version number of the game program; (2) the resource file is directly used after being downloaded.
The server logic: (1) saving a latest resource file; (2) a latest resource list; 3) the latest patch version number;
specifically, the game patch update logic of the game program: (1) the client side starts to request the details of the patch scheme; 2) acquiring a latest resource version number from a latest resource list of a server; (3) comparing the resource version number of the local client with the resource version number of the server; (4) obtaining a resource list needing to be updated; (5) initiating http requests one by one to obtain the latest resource files; (6) and downloading the latest resource files to the local client one by one.
2. Updating scheme of incremental resource package:
referring to fig. 2, when the resource file (version 5) is updated and the incremental resource package needs to be packaged, each of the old resource versions (version 1, version 2, version 3, and version 4) is compared with the latest resource by difference (diff), and a corresponding incremental resource package (patch package 1-5, patch package 2-5, patch package 3-5, and patch package 4-5) is generated.
Referring to fig. 3, the incremental resource package based update process is as follows:
(1) the client sends the local resource version number to the server to request the Patchlist file. (2) And after receiving the request of the client, the server compares the request with the latest resource version number to obtain a difference version, and returns the corresponding patch packet address. (3) And the client initiates a download request of the patch package to the server according to the returned patch address. (4) And after the server passes the verification, allowing the client to download the corresponding patch package.
3. Skip type increment updating scheme
Referring to fig. 4, if the update is normal progressive update, the update of Ver1 to Ver2 requires downloading delta packet patch1_2, the update of Ver2 to Ver3 requires downloading delta packet patch2_3, the update of Ver3 to Ver4 requires downloading delta packet patch3_4, and the update of Ver4 to Ver5 requires downloading delta packet patch4_ 5.
At present, there is a better way to set a flag bit in the intermediate version, merge part of the incremental packets or remove part of the redundant incremental packets to obtain the incremental packets patch corresponding to each version, such as patch1_5, patch2_4, patch2_5, and patch1_5, to implement the skip update.
However, the above solutions all have certain drawbacks, which are as follows:
1. AssetBundle bulk file update scheme:
(1) the AssetBundle bulk file updating scheme has the advantages that the maintenance is extremely convenient, only the latest resource file needs to be saved on the server, but the defects are obvious, each time a resource file is downloaded, an http request needs to be initiated, the downloading speed is slow, the waiting time of a player is very long, the player is very easy to lose, and the respective reading of a large number of resource files can also cause that the time consumption of equipment IO (Input/Output) is long. (2) The solution for updating the fragmented files also needs to compare the differences of the resource files online and filter the list that needs to be updated, which also results in a large amount of waiting time
2. Updating scheme of incremental resource package:
(1) the whole process of the method only has 2 times of http network requests, and time consumption caused by multiple request times is greatly reduced. (2) All versions of patch packages need to be packed each time, the more the version number is, the more the packed patch packages are, and the more time is consumed for packing and uploading. (3) Secondly, the development difficulty is high, the maintenance cost is high, the patch file is large, and after long-term accumulation, the local client side has redundancy residue.
3. Skip type increment updating scheme
(1) The flag bit is troublesome to maintain, the Patchlist file needs to record the combined version information or redundant version information in detail, when the versions are more and more, the Patchlist file is larger, and the larger the Patchlist file is, the more the updating processing is complicated. (2) Regardless of how jumped, the server needs to keep multiple versions of the delta package, with the different versions updated to the latest version. For example, Ver1 and Ver2 skip updates to Ver5, the server should keep a minimum of 2 delta patch packages. (3) The packing logic is complex, and when the number of redundant resource files is more, the skip update is more, and the more problems need to be processed.
Aiming at the defects of the prior art, the embodiment of the invention provides a method for a Unity game engine to issue a game program delta patch, which can reduce the waiting time when the delta patch file is downloaded and is also suitable for other game engines, in order to solve the problem that the player experience is poor due to too long waiting time in the downloading process of the delta patch file.
Referring to fig. 5, a flowchart illustrating steps of an embodiment of an application program updating method according to the present invention is shown, and the embodiment of the present invention is applied to a server, and specifically may include the following steps:
step 501, taking a resource file corresponding to the latest version identifier of an application program and a resource file corresponding to the previous version identifier of the application program, which are different, as a version difference file corresponding to the latest version identifier.
Wherein, the application program can be a game application program, a life service application program and the like; the version identification is an identification for marking the update order of the application program, and may be a number or a name, and the like. For example, the version identification may be version 1, version 2, ver1, ver2 … ….
In a specific implementation, after the application program is modified or the function of the application program is updated, the version identifier of the application program is updated from the previous version identifier to the latest version identifier. For example, assuming that the current version identifier of the application level is ver1, after the application program is modified or updated with functions, the application program can be updated from the current version identifier ver1 to the latest version identifier ver 2.
In the embodiment of the invention, after the application program is updated, whether each resource file of the current version identification is changed from each resource file of the previous version identification is compared, and then the current version identification and the resource file of the previous version identification are different. For example, a resource file with a current version identifier but no previous version identifier is identified, for example, a resource file X with a resource file X but no previous version identifier is identified by the current version identifier, or a resource file Y with both the current version identifier and the previous version identifier but a resource file Y with the current version identifier is changed, for example, the content is changed, and then a resource file with a current version identifier different from the resource file with the previous version identifier is made into a version difference file corresponding to the current version identifier. As an alternative example, the version difference file may be made according to the Unity3D standard.
Step 502, obtaining a version difference file corresponding to the historical version identification of the application program.
Step 503, merging the version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier into a delta patch file according to the sequence of the version identifiers.
In the embodiment of the invention, the version difference file corresponding to the historical version identifier of the application program is obtained, and then the version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier are combined into the incremental patch file according to the high-low sequence of the version identifiers.
Referring to fig. 6, assuming that the latest version identifier ver9 of the application program is published, after the version difference file Diff _ ver8 corresponding to ver9 is created, the historical version identifiers ver8, ver7, ver6, ver5, ver4, ver3, and ver2 corresponding to the version difference files Diff _ ver7, Diff _ ver6, Diff _ ver5, Diff _ ver4, Diff _ ver3, Diff _ ver2, and Diff _ ver1 of the application program may be obtained, and then the version identifiers may be placed in front of the latest version identifier and placed behind the old version identifier, that is, the version difference files corresponding to the version identifiers are merged in reverse order of the version identifiers to create the delta patch file that needs to be published, it is necessary to illustrate that only one delta file needs to be created, and the patch file is finally published, so that only the pressure of the storage server may be reduced.
Step 505, taking the byte length of the version difference file corresponding to each version identifier in the incremental patch file as the file download length corresponding to each version identifier and saving the file as a patch list file; and updating the application program of the terminal equipment by using the delta patch file and the patch list file.
In the embodiment of the present invention, after the delta patch file identified by the latest version of the application program is obtained, a patch list file (Patchlist file) may be further generated based on the delta patch file and stored in the server, so that when the terminal device needs to update the application program, a target delta patch file that needs to be extracted from the delta patch file may be determined based on the patch list file, it should be noted that the terminal device does not need to completely download one delta patch file, and thus, the pressure of data transmission of the server is reduced to the maximum extent.
Specifically, the byte length corresponding to the version difference file corresponding to each version identifier in the delta patch file is obtained, and the obtained byte length is used as the required file download length of each version identifier and recorded in the rangeEnd field in the Patchlist file.
As a specific example, the Patchlist file may be:
{“ver_new”:9,“scrip_ver_new”:9,“flagVersions”:[],“rangeVersion”:[
{“ver”:8,“scrip_ver”:8,rangeEnd:1667499},
{“ver”:7,“scrip_ver”:8,rangeEnd:1767441}
{“ver”:6,“scrip_ver”:8,rangeEnd:1867488}
{“ver”:5,“scrip_ver”:8,rangeEnd:1967497}
{“ver”:6,“scrip_ver”:8,rangeEnd:2667446}
{“ver”:3,“scrip_ver”:8,rangeEnd:3067449}
{“ver”:2,“scrip_ver”:8,rangeEnd:127490500}
{“ver”:1,“scrip_ver”:8,rangeEnd:127490524}]}
when the terminal device needs to update the application program, the current version identifier ver N of the application program may be obtained, and the file length to be downloaded is the range end of ver ═ N in the Patchlist file, for example, if the current version identifier of the application program is 7, the range end of ver ═ 7, that is, "1667499", is obtained from the Patchlist file, and then the delta patch file with the file length of "1667499" bytes may be downloaded from the delta patch file for updating the application program.
In the method for updating the application program, a version difference file corresponding to the latest version identifier is generated according to a resource file corresponding to the latest version identifier of the application program and a resource file corresponding to the previous version identifier of the application program, the version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier are combined into a delta patch file according to the high-low sequence of the version identifiers, in addition, the byte length of the version difference file corresponding to each version identifier in the delta patch file is used as the download length of the patch file corresponding to each version identifier and is stored as a patch list file, and then the terminal device can update the application program by using the delta patch file and the patch list file. When the terminal equipment of the embodiment of the invention updates the application program, the corresponding target delta patch file is downloaded from the delta patch file only by the target file downloading length determined from the patch list file based on the latest version identification, and the whole delta patch file is not required to be downloaded, so that unnecessary delta patch files are prevented from being downloaded, and the updating efficiency of the application program is improved.
On the basis of the above-described embodiment, a modified embodiment of the above-described embodiment is proposed, and it is to be noted herein that, in order to make the description brief, only the differences from the above-described embodiment are described in the modified embodiment.
In an exemplary embodiment, the step 501 of using a resource file corresponding to a latest version identifier of an application program and a resource file corresponding to a previous version identifier of the application program as the resource file corresponding to the latest version identifier, may include the following steps:
acquiring a first message digest identifier of a resource file corresponding to the latest version identifier of an application program and a second message digest identifier of the resource file corresponding to the previous version identifier of the application program;
and making the resource file corresponding to the first message digest identifier different from the second message digest identifier into a version difference file corresponding to the latest version identifier.
The Message Digest flag refers to a value calculated based on an MD5(Message-Digest Algorithm5, fifth edition of Message-Digest Algorithm), and whether a resource file has changed or not can be determined based on the Message Digest flag. Of course, besides the MD5 algorithm, other encryption algorithms, such as DES encryption algorithm, AES encryption algorithm, RSA encryption algorithm, etc., may be used to determine whether the resource file has changed, and embodiments of the present invention are not limited in this respect.
Specifically, if the first message digest identifier of the resource file corresponding to the latest version identifier of the application program is the second message digest identifier of the resource file corresponding to the previous version identifier of the application program, and if the first message digest identifier is not equal to the second message digest identifier, it may be determined that the resource file corresponding to the latest version identifier is changed from the resource file corresponding to the previous version identifier, and the version difference file corresponding to the latest version identifier may be created using the resource file whose latest version identifier is different from the previous version identifier.
As an alternative example, MD5 recording each resource file in the previous version identification in dictionary a, when a delta patch file of the latest version identification is to be made after a resource file of an application is updated, new MD5 of each resource file of the latest version identification is traversed and a changed resource file is found in comparison with old MD5 identified in the previous version identification in dictionary a, where the changed resource file is recorded in dictionary B, and then the version difference file of the latest version identification may be generated based on the resource file recorded in dictionary B.
In an exemplary embodiment, after obtaining the version difference file corresponding to the historical version identifier of the application program in step 502, the method may further include the following steps:
and deleting the same resource files in the version difference files corresponding to the historical version identifications and the version difference files corresponding to the latest version identifications.
In the embodiment of the invention, the version difference files of all version identifications are repackaged and the resource files contained in the latest version difference file in the old version difference files are deleted every time the incremental patch file is manufactured. That is, when the number of versions of the client exceeds 2, when the delta patch file is created, it is checked whether the latest changed resource file is in the dictionary B, and if the name of the resource file exists in the dictionary B, the resource file corresponding to the old version difference file is deleted, and a new delta patch file is created.
In the embodiment of the present invention, assuming that a resource file A, E, H corresponding to the latest version identifier of an application program changes, a delta patch file needs to be newly created, where fig. 7 is a dictionary a of an MD5 recording all resource files of the previous version identifier, and fig. 8 is a dictionary B of an MD5 recording a resource file of a version difference file of each version identifier, and the specific implementation logic is as follows:
(1) MD5 scanning the latest resource file identified by the latest version finds MD5 of resource A, E, H changed from the resource file MD5 identified by the previous version in dictionary a.
(2) Dictionary B is scanned for A, E, H resource files, and it is found that there are A resources in Diff1 and E resources in Diff 2.
(3) Referring to fig. 9, all Diff packages (version difference files) are repackaged, the a resource files in Diff1 are deleted, the E resource files in Diff2 are deleted, and the latest Diff8 contains A, E, H resource files. Therefore, the size of the incremental patch file is controllable, the incremental patch file cannot be increased all the time, the terminal equipment cannot generate redundancy, and unnecessary resource file downloading is reduced.
After the Diff packages required by each version identification of the client are manufactured, the Diff packages are spliced and combined into the delta patch file in the reverse order according to the version identifications, so that even if a plurality of user terminal devices have clients with different version identifications, the corresponding Diff packages can be extracted from the delta patch file for updating based on the version identifications, and the more the client is close to the latest version, the fewer the delta patch files needing to be downloaded are, because the application program can be updated only by downloading the part with the most front difference.
Illustratively, referring to fig. 6, the latest version of the current client is identified as Ver9, the oldest version is identified as Ver1, the Diff packets corresponding to each version identification of the client are obtained as Diff _ Ver1, Diff _ Ver2, Diff _ Ver3, Diff _ Ver4, Diff _ Ver5, Diff _ Ver6, Diff _ Ver7 and Diff _ Ver8, then, the two are spliced into one delta Patch file according to the version identification, and finally, the delta Patch file Patch1_9 is obtained by packaging:
Diff_Ver8-Diff_Ver7-Diff_Ver6-Diff_Ver5-Diff_Ver4-Diff_Ver3-Diff-Ver2-Diff-Ver1。
specifically, after obtaining the delta Patch1_9, the client may update to the latest version 9, for example, for a client whose Ver is 8, only Diff _ Ver8 in Patch1_9 needs to be downloaded, and thus update to the latest version 9. The Ver7 client can be upgraded to the latest 9 version by downloading only Diff _ Ver8 and Diff _ Ver7 in Patch1_ 9.
Referring to fig. 10, a flowchart illustrating steps of another embodiment of an application program updating method according to the present invention is shown, and is applied to a terminal device, where the embodiment of the present invention may specifically include the following steps:
step 1001, acquiring a current version identifier of the application program.
Step 1002, obtaining a patch list file of the application program; the patch list file comprises file download lengths corresponding to the version identifications of the application program, and the file download lengths are used for representing byte lengths of the incremental patch files needing to be downloaded.
Step 1003, obtaining the target file download length of the current version identification from the patch list file.
In the embodiment of the present invention, when the application program is updated, the current version identifier of the application program, for example, the version number is 7, may be obtained, and then the patch list file of the application program is obtained, so as to determine the download length of the target file corresponding to the current version according to the patch list file.
In an exemplary embodiment, the step 1002 of obtaining the patch list file of the application program may include the following steps:
sending a network request for requesting a patch list file of the application program to a server;
and receiving the patch list file sent by the server according to the network request.
Specifically, the patch list file is stored in the server, and when the application program is updated, a network request of the patch list file of the application program may be sent to the server, so as to obtain the patch list file corresponding to the application program from the server, and further, the download length of the target file corresponding to the current version may be determined according to the patch list file.
And 1004, downloading the target delta patch file from the delta patch file according to the target file downloading length.
Step 1005, updating the application program according to the target increment patch file.
In the embodiment of the present invention, after the target file download length of the application program is obtained and determined, the delta patch file can be downloaded to the target delta patch file, so as to update the application program according to the target delta patch file.
In an exemplary embodiment, the step 1004 of downloading the delta patch file to the target delta patch file according to the target file download length may include the following steps:
sending a network request for requesting a delta patch file of the application program to a server; the network request comprises the download length of the target file; the server is used for extracting a target delta patch file with the target file download length from the delta patch files;
and receiving the target delta patch file sent by the server.
The delta patch file stores the difference files required by the clients of different versions, and is arranged in a reverse order, and the more new versions of the difference files required to be downloaded are placed in front. Therefore, in the embodiment of the present invention, a network request for requesting a delta patch file of an application program is sent to a server, where the network request includes a target file download length corresponding to a current version identifier of the application program, and therefore, after receiving the network request, the server may extract the target delta patch file from the delta patch file according to the target file download length.
It should be noted that, since the invalid redundant difference file is removed when the delta patch file is created, the only delta patch file stored on the server is the one without redundant file and is all the latest and valid. Because the difference files required by the clients of different versions are arranged in the incremental patch file in a reverse order from high to low, the target incremental file with the specified length can be downloaded by using http when the file is downloaded, the incremental patch file is downloaded with different lengths, and the server only stores the incremental patch file of one game, but updates the game programs of different versions.
In the method for updating the application program, when the application program needs to be updated, the current version identifier of the application program is acquired, the patch list file of the application program is acquired, the target file download length of the current version identifier is acquired from the patch list file, so that the target delta patch file is downloaded from the delta patch file according to the target file download length, and finally the application program can be updated according to the target delta patch file. In the embodiment of the invention, only one increment patch file of the game is stored in the server, and a plurality of increment patch files of different versions are not stored in the server, so that the whole increment patch file is not required to be downloaded, unnecessary target increment patch files are prevented from being downloaded, and the updating efficiency of the application program is improved.
Referring to fig. 11, on the terminal device side, the specific logic is updated as follows:
1. and acquiring a local version number N of the client, wherein the length of the file to be downloaded is a range end corresponding to ver ═ N in the Patchlist file, for example, the local version number is 7, namely the range end corresponding to ver ═ 7 is acquired.
2. And the client side initiates an http request to download the target delta patch file with the specified length.
3. And decompressing the downloaded target increment patch file by the client to finish the updating of the application program.
Referring to fig. 12, a delta Patch file Patch1_9 of an application program of which the current latest version is Ver10 is saved in the server, Diff _ Ver8 (a version difference file between Ver8 and Ver 9), Diff _ Ver7 (a version difference file between Ver7 and Ver 8), Diff _ Ver6 (a version difference file between Ver6 and Ver 7), Diff _ Ver5 (a version difference file between Ver5 and Ver 6), Diff _ Ver4 (a version difference file between Ver4 and Ver 5), Diff _ Ver3 (a version difference file between Ver3 and Ver 4), Diff _ Ver2 (a version difference file between Ver2 and Ver 3), Diff _ Ver1 (a difference file between Ver1 and Ver 2) are included in Patch1_ 9.
For the clients of each version, only the target delta Patch files corresponding to the client need to be acquired from the delta Patch file Patch1_9 according to the version identifiers of the client. For example, assume that from Ver8 to Ver9, the required target delta file is Diff _ Ver 8; assuming updates from Ver7 to Ver9, the required target delta files are Diff _ Ver8, Diff _ Ver 7; assuming updates from Ver6 to Ver9, the required target delta files are Diff _ Ver8, Diff _ Ver7, Diff _ Ver 6; assuming an update from Ver5 to Ver9, the required target delta files are Diff _ Ver8, Diff _ Ver7, Diff _ Ver6, Diff _ Ver 5; assuming an update from Ver4 to Ver9, the required target delta files are Diff _ Ver8, Diff _ Ver7, Diff _ Ver6, Diff _ Ver5, Diff _ Ver 4; assuming an update from Ver3 to Ver9, the required target delta files are Diff _ Ver8, Diff _ Ver7, Diff _ Ver6, Diff _ Ver5, Diff _ Ver4, Diff _ Ver 3; assuming an update from Ver2 to Ver9, the required target delta files are Diff _ Ver8, Diff _ Ver7, Diff _ Ver6, Diff _ Ver5, Diff _ Ver4, Diff _ Ver3, Diff _ Ver 2; assuming updates from Ver1 to Ver9, the required target delta files are Diff _ Ver8, Diff _ Ver7, Diff _ Ver6, Diff _ Ver5, Diff _ Ver4, Diff _ Ver3, Diff _ Ver2, Diff _ Ver 1. It can be seen that the higher the current version identification of the application, the smaller the target delta patch file.
In order that those skilled in the art will better understand the embodiments of the present invention, a specific implementation is described below.
The core content of the embodiment of the invention is mainly divided into three parts. The first part is difference processing when making a difference resource set of each version; the second part is that the difference resource sets of each version are merged into a final increment patch file, and the server only stores the only increment patch file; the third part is that the game client downloads the delta patch files according to different file lengths, only one delta patch file is used as the server, and when different versions can be updated to the logic of the latest version.
1) Making version update version difference package
(1) Dictionary a records MD5 for each resource in the last client version.
(2) After the resource file is updated, when a new increment patch file is manufactured, the MD5 of each current resource is traversed, the old MD5 of the previous version in the dictionary A is compared, and the resource file with the change is found out. The resource file with the change is recorded in a dictionary B, and a version difference package is manufactured according to the Unity3D standard.
(3) In the embodiment of the invention, the version difference files of all client versions are regenerated each time the incremental patch file is manufactured, and the resource files contained in the latest version difference file in the version difference files of the old versions are removed. That is, when the number of versions of the client exceeds 2, when the version difference file is created, on the basis of the step (2), it is checked whether the latest changed resource file is in the dictionary B, and if the resource name exists in the dictionary B, the resource file in the version difference file corresponding to the old version is deleted, and a new version difference file is created.
2) Packaging the final unique delta patch file
And according to the version sequence, the version difference file with the newest version is placed in front, the version difference sets are merged in the reverse sequence to manufacture the incremental patch file, and finally, only the incremental patch file needs to be released.
3) Client downloads logic according to different file lengths
(1) The server stores a Patchlist file, records the required file download length of each client version, and records the file download length in the randEnd field.
(2) And acquiring a local version number N of the client, wherein the download length of the file to be downloaded is a range end corresponding to ver ═ N in the Patchlist, for example, the local version number is 7, namely the range end corresponding to ver ═ 7 is acquired.
(3) The client side initiates an http request to download the content of the specified file download length of the only incremental patch file on the server, and the content is used as a target incremental patch file to update the client side.
The embodiment of the invention at least has the following advantages:
(1) increasing download speed
The method and the device for downloading the incremental patch files can be combined into the only incremental patch files of the client, and the content with different file downloading lengths is downloaded from the incremental patch files as target incremental patch files according to the freshness of different versions, wherein the downloading can be completed only by making http requests for a server twice, specifically, the http requests are sent to request the Patchlist files from the server once to determine the downloading lengths of the files needing to be downloaded from the incremental patch files, and the http requests containing the file downloading lengths are sent according to the rangeEnd fields in the Patchlist files once to download the content with the file downloading lengths from the incremental patch files.
The current network environment has entered the 5G era, the theoretical downloading speed can reach 20Gbps, but the downloading speed of the old patch release scheme is usually lower than 1MB/S, the speed is very slow, the http request needs to be sent for many times when the biggest reason is updated, and the time is consumed in establishing connection with the server. The embodiment of the invention solves the problems, and the http request only needs to be sent twice, so that the bandwidth can be fully released, and the extremely-high-speed downloading speed brought by the 5G era can be enjoyed. Through laboratory tests, under the same other conditions, the download speed of the embodiment of the invention is more than 6 times of that of the bulk file patch scheme. It can be understood that the download speed of the delta patch file is increased, which has the most direct effect of reducing the download waiting time during the application program update, and can greatly reduce the loss of the user due to the application program update waiting.
(2) Reducing differential check time
In the manufacturing process before the incremental patch file is released, the version difference files of each version are calculated and spliced into the incremental patch file in the reverse order, when the application program of the terminal equipment is updated, the application program can be updated only by downloading the corresponding file from the incremental patch file according to the appointed file downloading length and then decompressing, the file difference between the client and the server does not need to be compared again, and the waiting time is further reduced.
(3) The total size of the incremental patch file is controllable, and the client does not generate resource redundancy locally after updating the incremental patch file
When the delta patch file of the application program is made each time, the version difference files of all versions are rewritten and packaged, and when the resource files modified in the latest version difference file are found to exist in the old version difference file at the same time, the resource files with the same name as the old version difference file are deleted. Therefore, useless resource files can be prevented from being downloaded when the client is updated, redundancy is avoided, the size of the incremental patch files can be controlled and cannot be increased infinitely all the time, and the incremental patch files stored on the server are always smaller than the size of the whole package of the latest application program.
(4) The server only stores one unique incremental patch file, thereby reducing the storage and uploading pressure of the server to the maximum extent
Because the server only needs to store one increment patch file, and the size of the increment patch file is controllable, the storage pressure of the server is reduced to the maximum extent, time consumption is reduced when the increment patch file is uploaded, and the maintenance is simple.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those of skill in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the embodiments of the invention.
Referring to fig. 13, a block diagram of an embodiment of an application program updating apparatus according to the present invention is shown, and is applied to a server, and the embodiment of the present invention may specifically include the following modules:
a version difference file generation module 1301, configured to use a resource file corresponding to a latest version identifier of an application program and a resource file corresponding to a previous version identifier of the application program that are different as a version difference file corresponding to the latest version identifier;
a version difference file obtaining module 1302, configured to obtain a version difference file corresponding to a history version identifier of the application program;
the version difference file merging module 1303 is configured to merge the version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier into an incremental patch file according to a high-low order of the version identifiers;
a patch list file generating module 1304, configured to use the byte length of the version difference file corresponding to each version identifier in the delta patch file as a file download length corresponding to each version identifier, and store the file download length as a patch list file; and updating the application program of the terminal equipment by using the delta patch file and the patch list file.
In an exemplary embodiment, the version difference file generating module 1301 is configured to obtain a first message digest identifier of a resource file corresponding to a latest version identifier of an application program, and a second message digest identifier of the resource file corresponding to a previous version identifier of the application program; and making the resource file corresponding to the first message digest identifier different from the second message digest identifier into a version difference file corresponding to the latest version identifier.
In an exemplary embodiment, the apparatus further comprises: and the resource file deleting module is used for deleting the same resource file in the version difference file corresponding to the historical version identifier and the version difference file corresponding to the latest version identifier.
Referring to fig. 14, a block diagram of an embodiment of an application program updating apparatus according to the present invention is shown, and is applied to a terminal device, where the embodiment of the present invention specifically includes the following modules:
a version identifier obtaining module 1401, configured to obtain a current version identifier of the application program;
a patch list file obtaining module 1402, configured to obtain a patch list file of the application program; the patch list file comprises file download lengths corresponding to all version identifications of the application program, and the file download lengths are used for representing byte lengths of incremental patch files needing to be downloaded;
a file download length determining module 1403, configured to obtain the target file download length of the current version identifier from the patch list file;
a delta patch file downloading module 1404, configured to download the target delta patch file from the delta patch file according to the target file download length;
an application update module 1405, configured to update the application according to the target delta patch file.
In an exemplary embodiment, the patch list file obtaining module 1402 is configured to send a network request requesting a patch list file of the application program to a server; and receiving the patch list file sent by the server according to the network request.
In an exemplary embodiment, the delta patch file downloading module 1404 is configured to send a network request to a server for requesting a delta patch file of the application program; the network request comprises the download length of the target file; the server is used for extracting a target delta patch file with the target file download length from the delta patch files; and receiving the target delta patch file sent by the server.
In an exemplary embodiment, the higher the current version identification of the application program, the smaller the target delta patch file.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In addition, an embodiment of the present invention further provides an electronic device, as shown in fig. 15, including a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, where the processor 1501, the communication interface 1502, and the memory 1503 complete communication with each other through the communication bus 1504;
a memory 1503 for storing a computer program; the processor 1501, when executing the program stored in the memory 1503, implements the following steps:
taking a resource file corresponding to the latest version identification of an application program and a resource file corresponding to the previous version identification of the application program which are different as version difference files corresponding to the latest version identification;
acquiring a version difference file corresponding to the historical version identification of the application program;
merging the version difference file corresponding to the latest version identification and the version difference file corresponding to the historical version identification into an incremental patch file according to the high-low sequence of the version identifications;
taking the byte length of the version difference file corresponding to each version identification in the incremental patch file as the file download length corresponding to each version identification and storing the file download length as a patch list file; and updating the application program of the terminal equipment by using the delta patch file and the patch list file.
Optionally, the taking a resource file corresponding to a latest version identifier of an application program and a resource file corresponding to a previous version identifier of the application program that are different from each other as a version difference file corresponding to the latest version identifier includes:
acquiring a first message digest identifier of a resource file corresponding to the latest version identifier of an application program and a second message digest identifier of the resource file corresponding to the previous version identifier of the application program;
and making the resource file corresponding to the first message digest identifier different from the second message digest identifier into a version difference file corresponding to the latest version identifier.
Optionally, after the obtaining of the version difference file corresponding to the historical version identifier of the application program, the method further includes:
and deleting the same resource files in the version difference files corresponding to the historical version identifications and the version difference files corresponding to the latest version identifications.
Optionally, the number of the delta patch files is one.
The computer program when executed by the processor further realizes the steps of:
acquiring a current version identifier of an application program;
acquiring a patch list file of the application program; the patch list file comprises file download lengths corresponding to all version identifications of the application program, and the file download lengths are used for representing byte lengths of incremental patch files needing to be downloaded;
acquiring the target file download length of the current version identification from the patch list file;
downloading the incremental patch files to the target incremental patch file according to the target file downloading length;
and updating the application program according to the target increment patch file.
Optionally, the obtaining the patch list file of the application program includes:
sending a network request for requesting a patch list file of the application program to a server;
and receiving the patch list file sent by the server according to the network request.
Optionally, the downloading from the delta patch file to the target delta patch file according to the target file download length includes:
sending a network request for requesting a delta patch file of the application program to a server; the network request comprises the download length of the target file; the server is used for extracting a target delta patch file with the target file download length from the delta patch files;
and receiving the target delta patch file sent by the server.
Optionally, the number of the delta patch files is one; the higher the current version identification of the application program is, the smaller the target delta patch file is.
When the terminal equipment updates the application program, only the target file downloading length determined from the patch list file based on the latest version identification is needed, and the corresponding target delta patch file is downloaded from the delta patch file, so that the whole delta patch file is not needed to be downloaded, unnecessary delta patch files are prevented from being downloaded, and the updating efficiency of the application program is improved.
Because only one increment patch file of the game is stored in the server, and a plurality of increment patch files of different versions are not stored in the server, the whole increment patch file does not need to be downloaded, unnecessary target increment patch files are prevented from being downloaded, and the updating efficiency of the application program is improved.
The embodiment of the invention discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the following steps:
taking a resource file corresponding to the latest version identification of an application program and a resource file corresponding to the previous version identification of the application program which are different as version difference files corresponding to the latest version identification;
acquiring a version difference file corresponding to the historical version identification of the application program;
merging the version difference file corresponding to the latest version identification and the version difference file corresponding to the historical version identification into a delta patch file according to the high-low sequence of the version identifications;
taking the byte length of the version difference file corresponding to each version identification in the incremental patch file as the file download length corresponding to each version identification and storing the file download length as a patch list file; and updating the application program of the terminal equipment by using the delta patch file and the patch list file.
Optionally, the taking a resource file corresponding to a latest version identifier of an application program and a resource file corresponding to a previous version identifier of the application program that are different from each other as a version difference file corresponding to the latest version identifier includes:
acquiring a first message digest identifier of a resource file corresponding to the latest version identifier of an application program and a second message digest identifier of the resource file corresponding to the previous version identifier of the application program;
and making the resource file corresponding to the first message digest identifier different from the second message digest identifier into a version difference file corresponding to the latest version identifier.
Optionally, after the obtaining of the version difference file corresponding to the historical version identifier of the application program, the method further includes:
and deleting the same resource files in the version difference files corresponding to the historical version identifications and the version difference files corresponding to the latest version identifications.
Optionally, the number of the delta patch files is one.
The computer program when executed by the processor further realizes the steps of:
acquiring a current version identifier of an application program;
acquiring a patch list file of the application program; the patch list file comprises file download lengths corresponding to all version identifications of the application program, and the file download lengths are used for representing byte lengths of incremental patch files needing to be downloaded;
acquiring the target file download length of the current version identification from the patch list file;
downloading the target incremental patch file from the incremental patch file according to the target file downloading length;
and updating the application program according to the target increment patch file.
Optionally, the obtaining the patch list file of the application program includes:
sending a network request for requesting a patch list file of the application program to a server;
and receiving the patch list file sent by the server according to the network request.
Optionally, the downloading from the delta patch file to the target delta patch file according to the target file download length includes:
sending a network request for requesting a delta patch file of the application program to a server; the network request comprises the download length of the target file; the server is used for extracting a target delta patch file with the target file download length from the delta patch files;
and receiving the target delta patch file sent by the server.
Optionally, the number of the delta patch files is one; the higher the current version identification of the application program is, the smaller the target delta patch file is.
When the terminal equipment updates the application program, only the target file downloading length determined from the patch list file based on the latest version identification is needed, and the corresponding target delta patch file is downloaded from the delta patch file, so that the whole delta patch file is not needed to be downloaded, unnecessary delta patch files are prevented from being downloaded, and the updating efficiency of the application program is improved.
Because only one increment patch file of the game is stored in the server, and a plurality of increment patch files of different versions are not stored in the server, the whole increment patch file does not need to be downloaded, unnecessary target increment patch files are prevented from being downloaded, and the updating efficiency of the application program is improved.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the terminal and other devices.
The Memory may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
As shown in fig. 16, in yet another embodiment provided by the present invention, there is also provided a computer-readable storage medium 1601 having stored therein instructions which, when run on a computer, cause the computer to execute the application program updating method described in the above embodiment.
In another embodiment provided by the present invention, a computer program product is further provided, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the foregoing method embodiments, and achieve the same technical effects, and in order to avoid repetition, the details are not repeated here.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or terminal equipment comprising the element.
The application updating method, the application updating device, the electronic device and the storage medium provided by the invention are described in detail, and specific examples are applied in the text to explain the principle and the implementation of the invention, and the description of the above examples is only used to help understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. An application program updating method applied to a server, the method comprising:
taking a resource file corresponding to the latest version identification of an application program and a resource file corresponding to the previous version identification of the application program which are different as version difference files corresponding to the latest version identification;
acquiring a version difference file corresponding to the historical version identification of the application program;
merging the version difference file corresponding to the latest version identification and the version difference file corresponding to the historical version identification into a delta patch file according to the high-low sequence of the version identifications;
taking the byte length of the version difference file corresponding to each version identification in the incremental patch file as the file download length corresponding to each version identification and storing the file download length as a patch list file; and updating the application program of the terminal equipment by using the delta patch file and the patch list file.
2. The method according to claim 1, wherein the taking a resource file corresponding to a latest version identifier of an application program different from a resource file corresponding to a previous version identifier of the application program as a version difference file corresponding to the latest version identifier comprises:
acquiring a first message digest identifier of a resource file corresponding to the latest version identifier of an application program and a second message digest identifier of the resource file corresponding to the previous version identifier of the application program;
and making the resource file corresponding to the first message digest identifier different from the second message digest identifier into a version difference file corresponding to the latest version identifier.
3. The method according to claim 1 or 2, wherein after the obtaining of the version difference file corresponding to the historical version identifier of the application program, the method further comprises:
and deleting the same resource files in the version difference files corresponding to the historical version identifications and the version difference files corresponding to the latest version identifications.
4. The method as recited in claim 1, wherein the delta patch file is one.
5. An application program updating method is applied to a terminal device, and the method comprises the following steps:
acquiring a current version identifier of an application program;
acquiring a patch list file of the application program; the patch list file comprises file download lengths corresponding to all version identifications of the application program, and the file download lengths are used for representing byte lengths of incremental patch files needing to be downloaded;
acquiring the target file download length of the current version identification from the patch list file;
downloading the target incremental patch file from the incremental patch file according to the target file downloading length;
and updating the application program according to the target delta patch file.
6. The method of claim 5, wherein obtaining the patch list file of the application program comprises:
sending a network request for requesting a patch list file of the application program to a server;
and receiving the patch list file sent by the server according to the network request.
7. The method of claim 5, wherein downloading from the delta patch file to a target delta patch file according to the target file download length comprises:
sending a network request for requesting a delta patch file of the application program to a server; the network request comprises the download length of the target file; the server is used for extracting a target delta patch file with the target file download length from the delta patch files;
and receiving the target delta patch file sent by the server.
8. The method of claim 5, wherein the delta patch file is one; the higher the current version identification of the application program is, the smaller the target delta patch file is.
9. An application program updating apparatus applied to a server, the apparatus comprising:
the version difference file generation module is used for taking a resource file corresponding to the latest version identification of an application program and a resource file corresponding to the previous version identification of the application program which are different as the version difference file corresponding to the latest version identification;
the version difference file acquisition module is used for acquiring a version difference file corresponding to the historical version identifier of the application program;
the version difference file merging module is used for merging the version difference file corresponding to the latest version identification and the version difference file corresponding to the historical version identification into an incremental patch file according to the high-low sequence of the version identifications;
a patch list file generation module, configured to use the byte length of the version difference file corresponding to each version identifier in the delta patch file as a file download length corresponding to each version identifier, and store the file as a patch list file; the delta patch file and the patch list file are used for updating the application program of the terminal equipment.
10. An application program updating apparatus, applied to a terminal device, the apparatus comprising:
the version identification acquisition module is used for acquiring the current version identification of the application program;
a patch list file obtaining module, configured to obtain a patch list file of the application program; the patch list file comprises file download lengths corresponding to all version identifications of the application program, and the file download lengths are used for representing byte lengths of incremental patch files needing to be downloaded;
a file download length determining module, configured to obtain a target file download length of the current version identifier from the patch list file;
the delta patch file downloading module is used for downloading the target delta patch file from the delta patch file according to the target file downloading length;
and the application program updating module is used for updating the application program according to the target increment patch file.
11. An electronic device, comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, the computer program, when executed by the processor, implementing the steps of the application update method according to any one of claims 1 to 8.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the application update method according to any one of claims 1 to 8.
CN202210211546.6A 2022-03-04 2022-03-04 Application program updating method and device, electronic equipment and storage medium Pending CN114564227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210211546.6A CN114564227A (en) 2022-03-04 2022-03-04 Application program updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210211546.6A CN114564227A (en) 2022-03-04 2022-03-04 Application program updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114564227A true CN114564227A (en) 2022-05-31

Family

ID=81718296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210211546.6A Pending CN114564227A (en) 2022-03-04 2022-03-04 Application program updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114564227A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900478A (en) * 2022-06-08 2022-08-12 珠海金山数字网络科技有限公司 Resource processing system and method
CN117055937A (en) * 2023-07-18 2023-11-14 深圳先锋居善科技有限公司 Application program updating method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900478A (en) * 2022-06-08 2022-08-12 珠海金山数字网络科技有限公司 Resource processing system and method
CN114900478B (en) * 2022-06-08 2024-03-26 珠海金山数字网络科技有限公司 Resource processing system and method
CN117055937A (en) * 2023-07-18 2023-11-14 深圳先锋居善科技有限公司 Application program updating method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108037946B (en) Method, system and server for hot updating of application program
CN105511889B (en) Universal game version increment updating system and method
JP7297769B2 (en) Shader distribution among client machines for pre-caching
CN114564227A (en) Application program updating method and device, electronic equipment and storage medium
CN109391673B (en) Method, system and terminal equipment for managing update file
CN110442377B (en) Patch package generation method, application updating method, device and electronic equipment
CN109471843B (en) Metadata caching method, system and related device
CN103188097A (en) Method, device and system achieving patch management
CN112451972A (en) Game engine-based resource compression package construction method, device, system and medium
CN112748877A (en) File integration uploading method and device and file downloading method and device
CN111107133A (en) Generation method of difference packet, data updating method, device and storage medium
CN110058952B (en) Method and system for verifying embedded equipment file
CN110807000B (en) File repair method and device, electronic equipment and storage medium
CN111294613A (en) Video processing method, client and server
CN111210826A (en) Voice information processing method and device, storage medium and intelligent terminal
CN111586170B (en) Resource downloading method, device, equipment and computer readable storage medium
CN109889608B (en) Dynamic resource loading method and device, electronic equipment and storage medium
CN102483716B (en) Server unit and content acquisition method
US11327741B2 (en) Information processing apparatus
CN111314403B (en) Method and device for checking resource consistency
CN105812894A (en) Video file processing method and device based on intelligent terminal
CN114968963A (en) File overwriting method and device and electronic equipment
CN107643959A (en) Image file treating method and apparatus
CN113194330A (en) Fragmented multi-cloud video resource management method and system
CN114356245B (en) Method and system for fast comparing and updating mass files

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