Application update methods, devices, electronic devices and storage media

By generating and merging version difference files into incremental patch files, and combining them with a patch list file, terminal devices only download the necessary incremental patch files for updates, solving the problem of low application update efficiency and achieving faster update speeds and lower server load.

CN114564227BActive Publication Date: 2025-10-31NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210211546.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2025-10-31
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

Current technologies have relatively low application update efficiency, especially for game updates which require downloading large patch files, resulting in slow update speeds and negatively impacting user experience.

Method used

By generating version difference files corresponding to the latest version identifier and version difference files corresponding to historical version identifiers, merging them into an incremental patch file, and saving it as a patch list file, the terminal device determines the target file download length based on the patch list file, and downloads the corresponding target incremental patch file from the incremental patch file for updating.

Benefits of technology

It improved the efficiency of application updates, reduced download waiting time, enhanced user experience, and reduced the storage and upload pressure on the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564227B_ABST
    Figure CN114564227B_ABST
Patent Text Reader

Abstract

This invention provides an application update method, apparatus, electronic device, and storage medium. The method includes: using a resource file that differs from the resource file corresponding to the latest version identifier of the application as a version difference file corresponding to the previous version identifier; obtaining version difference files corresponding to historical version identifiers of the application; merging the version difference file corresponding to the latest version identifier and the version difference files corresponding to the historical version identifiers into an incremental patch file according to the descending order of version identifiers; using the byte length of the version difference files corresponding to each version identifier in the incremental patch file as the file download length corresponding to each version identifier and saving it as a patch list file; the incremental patch file and the patch list file are used to update the application on a terminal device. This invention improves the efficiency of application updates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to an application update method, an application update device, an electronic device, and a storage medium. Background Technology

[0002] With the rapid development of the internet, application updates are becoming increasingly frequent. Taking games as an example, as gameplay becomes richer, graphics become higher, and 3D effects become more realistic, while the performance of terminal devices such as computers, game consoles, and mobile phones becomes increasingly powerful, gamers have increasingly demanding requirements for game graphics, playability, user experience, and security. Therefore, it is often necessary to release patch files online during game operation to modify the game program, in order to fix bugs, add gameplay, and patch security vulnerabilities.

[0003] However, although application update solutions are available on the market, they usually release patch files for all updated versions of the application. Therefore, when updating applications, terminal devices need to download large patch files, which makes the application update efficiency low. Summary of the Invention

[0004] This invention provides an application update method to solve the problem of low application update efficiency in the prior art.

[0005] Accordingly, embodiments of the present invention also provide an application update device to ensure the implementation and application of the above method.

[0006] To address the aforementioned problems, this invention discloses an application update method applied to a server, the method comprising:

[0007] The resource file that is different from the resource file corresponding to the latest version identifier of the application is used as the version difference file corresponding to the latest version identifier;

[0008] Obtain the version difference file corresponding to the historical version identifier of the application;

[0009] The version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier are merged into an incremental patch file according to the high and low order of the version identifiers.

[0010] The byte length of the version difference file corresponding to each version identifier in the incremental patch file is used as the download length of the file corresponding to each version identifier and saved as a patch list file; wherein, the incremental patch file and the patch list file are used to update the application on the terminal device.

[0011] Optionally, the step of using the resource file corresponding to the latest version identifier of the application, which is different from the resource file corresponding to the previous version identifier of the application, as the version difference file corresponding to the latest version identifier includes:

[0012] Obtain the first message digest identifier of the resource file corresponding to the latest version identifier of the application, and the second message digest identifier of the resource file corresponding to the previous version identifier of the application;

[0013] The resource file corresponding to the first message digest identifier, which is different from the second message digest identifier, is made into a version difference file corresponding to the latest version identifier.

[0014] Optionally, after obtaining the version difference file corresponding to the historical version identifier of the application, the method further includes:

[0015] Delete the resource files that are identical to those in the version difference file corresponding to the latest version identifier in the version difference file corresponding to the historical version identifier.

[0016] Optionally, the incremental patch file is one.

[0017] This invention also discloses an application update method applied to a terminal device, the method comprising:

[0018] Get the current version identifier of the application;

[0019] Obtain the patch list file of the application; the patch list file includes the file download length corresponding to each version identifier of the application, and the file download length is used to represent the byte length of the incremental patch file that needs to be downloaded;

[0020] Obtain the download length of the target file identified by the current version from the patch list file;

[0021] Download the target incremental patch file from the incremental patch file according to the target file download length;

[0022] Update the application according to the target incremental patch file.

[0023] Optionally, obtaining the patch list file for the application includes:

[0024] Send a network request to the server for a patch list file for the application;

[0025] Receive the patch list file sent by the server in accordance with the network request.

[0026] Optionally, downloading the target incremental patch file from the incremental patch file according to the target file download length includes:

[0027] A network request is sent to the server requesting an incremental patch file for the application; the network request includes the download length of the target file; the server is used to extract a target incremental patch file of the download length of the target file from the incremental patch file;

[0028] Receive the target incremental patch file sent by the server.

[0029] Optionally, the incremental patch file is a single file; the higher the current version identifier of the application, the smaller the target incremental patch file.

[0030] This invention also discloses an application update apparatus for use on a server, the apparatus comprising:

[0031] The version difference file generation module is used to take the resource file that is different from the resource file that corresponds to the latest version identifier of the application and the resource file that corresponds to the previous version identifier of the application as the version difference file corresponding to the latest version identifier.

[0032] The version difference file acquisition module is used to acquire the version difference file corresponding to the historical version identifier of the application.

[0033] The version difference file merging module is used 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 the high and low order of the version identifier;

[0034] The patch list file generation module is used to take the byte length of the version difference file corresponding to each version identifier in the incremental patch file as the download length of the file corresponding to each version identifier and save it as a patch list file; wherein, the incremental patch file and the patch list file are used to update the application on the terminal device.

[0035] This invention also discloses an application update apparatus for use in a terminal device, the apparatus comprising:

[0036] The version identifier acquisition module is used to obtain the current version identifier of the application;

[0037] The patch list file acquisition module is used to acquire the patch list file of the application; the patch list file includes the file download length corresponding to each version identifier of the application, and the file download length is used to represent the byte length of the incremental patch file that needs to be downloaded;

[0038] The file download length determination module is used to obtain the download length of the target file identified by the current version from the patch list file;

[0039] An incremental patch file download module is used to download a target incremental patch file from the incremental patch file according to the target file download length;

[0040] An application update module is used to update the application based on the target incremental patch file.

[0041] This invention discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the steps of the application update method described above.

[0042] This invention discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the application update method described above.

[0043] This invention also discloses a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in this invention.

[0044] The embodiments of the present invention have the following advantages:

[0045] In this embodiment of the invention, a version difference file corresponding to the latest version identifier of the application is generated based on the resource file corresponding to the resource file corresponding to the previous version identifier of the application. The version difference file corresponding to the latest version identifier and the version difference files corresponding to the previous version identifiers are merged into an incremental patch file in descending order of version identifier. Furthermore, the byte length of the version difference files corresponding to each version identifier in the incremental patch file is used as the file download length for each version identifier and saved as a patch list file. Subsequently, the terminal device can use the incremental patch file and the patch list file to update the application. In this embodiment of the invention, when updating the application, the terminal device only needs to download the corresponding target incremental patch file from the incremental patch file based on the target file download length determined from the patch list file according to the latest version identifier, without downloading the entire incremental patch file, thus avoiding unnecessary downloads and improving the application update efficiency. Attached Figure Description

[0046] Figure 1 This is a schematic diagram illustrating the processing logic of an AssetBundle scattered file update scheme;

[0047] Figure 2 This is a schematic diagram of the packaging process for an incremental resource package;

[0048] Figure 3 This is a schematic diagram of the processing logic for an incremental resource package update scheme;

[0049] Figure 4 This is a schematic diagram of the processing logic of a skip-increment update scheme;

[0050] Figure 5 This is a flowchart illustrating the steps of an embodiment of an application update method according to the present invention;

[0051] Figure 6 This is a schematic diagram of an incremental patch file packaging according to the present invention;

[0052] Figure 7 This is a schematic diagram of a dictionary A that records the MD5 hashes of all resource files identified by the previous version according to the present invention;

[0053] Figure 8 This is a schematic diagram of a dictionary B of the MD5 of a resource file that records the version differences of each version identifier, according to the present invention.

[0054] Figure 9 This is a schematic diagram illustrating the process of creating an incremental patch file Diff8 that identifies the latest version according to the present invention;

[0055] Figure 10 This is a flowchart illustrating the steps of another embodiment of the application update method of the present invention;

[0056] Figure 11 This is a schematic diagram of an application interaction update according to the present invention;

[0057] Figure 12 This is a schematic diagram of an incremental patch file for an application according to the present invention;

[0058] Figure 13 This is a structural block diagram of an embodiment of an application update device according to the present invention;

[0059] Figure 14 This is a structural block diagram of another embodiment of the application update device of the present invention;

[0060] Figure 15 This is a block diagram of an electronic device provided in an embodiment of the present invention;

[0061] Figure 16 This is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. Detailed Implementation

[0062] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0063] Taking game programs (clients) as an example, in relevant technical solutions, the common game patch release and update solutions for Unity game engines include:

[0064] 1. AssetBundle scattered file update solution:

[0065] Reference Figure 1 The processing logic for updating AssetBundle scattered files is as follows:

[0066] Client logic: (1) The resource list and resource version number of the game program are recorded locally in the Resconfig configuration file; (2) The resource files are used directly after downloading.

[0067] Server logic: (1) Save a copy of the latest resource file; (2) Latest resource list; (3) Latest patch version number;

[0068] Specifically, the game program's patch update logic is as follows: (1) The client starts requesting patch scheme details; (2) The latest resource version number is obtained from the latest resource list on the server; (3) The resource version number of the local client is compared with the resource version number of the server; (4) The list of resources that need to be updated is obtained; (5) HTTP requests are made one by one to obtain the latest resource files; (6) The latest resource files are downloaded to the local client one by one.

[0069] 2. Incremental resource package update plan:

[0070] Reference Figure 2 When the resource file (version 5) is updated and an incremental resource package needs to be packaged, each old resource version (version 1, version 2, version 3, version 4) will be compared with the latest resource by diff, and a corresponding incremental resource package (patch package 1-5, patch package 2-5, patch package 3-5, patch package 4-5) will be generated.

[0071] Reference Figure 3 The incremental resource package update process is as follows:

[0072] (1) The client sends its local resource version number to the server and requests a Patchlist file. (2) After receiving the client's request, the server compares it with the latest resource version number, determines the difference version, and returns the address of the corresponding patch package. (3) The client sends a request to the server to download the patch package based on the returned patch address. (4) After the server verifies the request, it allows the client to download the corresponding patch package.

[0073] 3. Jump-type incremental update scheme

[0074] Reference Figure 4 If it's a normal step-by-step update, updating from Ver1 to Ver2 requires downloading the incremental package patch1_2, from Ver2 to Ver3 requires downloading the incremental package patch2_3, from Ver3 to Ver4 requires downloading the incremental package patch3_4, and from Ver4 to Ver5 requires downloading the incremental package patch4_5. As you can see, older client versions need to download the incremental packages between versions one by one, which is very inefficient and may also generate a lot of redundancy between versions.

[0075] Currently, a better approach is to set a flag in the intermediate version, merge some incremental packages or remove some redundant incremental packages to obtain the incremental package patch corresponding to each version, such as patch1_5, patch2_4, patch2_5, and patch1_5, thus achieving skip-up updates.

[0076] However, all of the above solutions have certain drawbacks, as follows:

[0077] 1. AssetBundle scattered file update solution:

[0078] (1) The advantage of the AssetBundle scattered file update scheme is that it is extremely convenient to maintain. Only one copy of the latest resource file needs to be stored on the server. However, the disadvantages are also very obvious. Each resource file needs to be downloaded, which requires an HTTP request. The download speed is slow, and the player waiting time is very long, which can easily cause player churn. Reading a large number of resource files separately will also lead to long device I / O (input / output) time. (2) The scattered file update scheme also requires online comparison of the differences between resource files and filtering out the list that needs to be updated. This will also generate a lot of waiting time.

[0079] 2. Incremental resource package update plan:

[0080] (1) This method involves only two HTTP network requests throughout the entire process, significantly reducing the time consumed by the large number of requests. (2) Each time, all versions of the patch package need to be generated. The more version numbers there are, the more patch packages need to be generated, which increases the time spent on packaging and uploading. (3) Secondly, the development difficulty is high, the maintenance cost is high, the patch file is large, and after a long period of accumulation, there will be redundant residues on the local client.

[0081] 3. Jump-type incremental update scheme

[0082] (1) Maintaining the flags is cumbersome. The Patchlist file needs to record detailed information about the merged versions or redundant versions. As the number of versions increases, the Patchlist file becomes quite large, and the larger the Patchlist file, the more complex the update process becomes. (2) Regardless of the jump, the server needs to save multiple incremental packages to update different versions to the latest version. For example, if Ver1 and Ver2 are updated to Ver5 in a jump, the server must save at least two incremental patch packages. (3) The packaging logic is complex. The more redundant resource files there are and the more jump updates there are, the more problems need to be handled.

[0083] To address the shortcomings of the existing technical solutions, this invention provides a method for publishing incremental patches for game programs using the Unity game engine, which reduces the waiting time when downloading incremental patch files and leads to a poor player experience. This method is also applicable to other game engines.

[0084] Reference Figure 5 The diagram illustrates a flowchart of an embodiment of an application update method according to the present invention, applied to a server. Specifically, this embodiment may include the following steps:

[0085] Step 501: The resource file that is different from the resource file corresponding to the latest version identifier of the application is used as the version difference file corresponding to the latest version identifier.

[0086] The application can be a game application, a lifestyle service application, etc.; the version identifier is used to mark the update order of the application, and can be a number or name, etc. For example, the version identifier can be version 1, version 2, ver1, ver2, etc.

[0087] In practice, after an application undergoes a patch or feature update, its version identifier is updated from the previous version identifier to the latest version identifier. For example, assuming the current version identifier of the application is ver1, after a patch or feature update, the application can be updated from the current version identifier ver1 to the latest version identifier ver2.

[0088] In this embodiment of the invention, after an application update, each resource file identified by the current version is compared to each resource file identified by the previous version to determine if there are any changes. Then, the resource files that differ between the current and previous version identifiers are identified. For example, resource files present in the current version identifier but not in the previous version identifier (e.g., resource file X present in the current version identifier but not in the previous version identifier), or resource file Y present in both the current and previous version identifiers but changed (e.g., its content changed), are then created as version difference files corresponding to the current version identifier. As an optional example, version difference files can be created according to the Unity3D standard.

[0089] Step 502: Obtain the version difference file corresponding to the historical version identifier of the application.

[0090] Step 503: 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 the high and low order of the version identifiers.

[0091] In this embodiment of the invention, the version difference file corresponding to the historical version identifier of the application is obtained. Then, the version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier are merged into an incremental patch file in descending order of version identifier.

[0092] Reference Figure 6 Assuming the latest version of the application is identified as ver9, after creating the version difference file Diff_ver8 corresponding to ver9, we can obtain the version difference files Diff_ver7, Diff_ver6, Diff_ver5, Diff_ver4, Diff_ver3, Diff_ver2, and Diff_ver1 corresponding to the historical version identifiers ver8, ver7, ver6, ver5, ver4, ver3, and ver2, respectively. Then, we can merge the version difference files corresponding to each version identifier in reverse order, placing the latest version identifier first and the older version identifier last, to create the incremental patch file for the application to be released. It should be noted that only one incremental patch file needs to be created, and ultimately only this one incremental patch file needs to be released, thus reducing the storage pressure on the server.

[0093] Step 505: Take the byte length of the version difference file corresponding to each version identifier in the incremental patch file as the download length of the file corresponding to each version identifier and save it as a patch list file; wherein, the incremental patch file and the patch list file are used to update the application on the terminal device.

[0094] In this embodiment of the invention, after obtaining the incremental patch file that identifies the latest version of the application, a patch list file can be generated based on the incremental patch file and stored on the server. When the terminal device needs to update the application, the target incremental patch file to be extracted from the incremental patch file can be determined based on the patch list file. It should be noted that the terminal device does not need to download an entire incremental patch file, thus minimizing the pressure on the server for data transmission.

[0095] Specifically, the byte length of the version difference file corresponding to each version identifier in the incremental patch file is obtained as the required file download length for each version identifier and recorded in the rangeEnd field of the Patchlist file.

[0096] As a concrete example, a patchlist file can be:

[0097] {"ver_new":9,"scrip_ver_new":9,"flagVersions":[],"rangeVersion":[

[0098] {"ver":8,"scrip_ver":8,rangeEnd:1667499},

[0099] {"ver":7,"scrip_ver":8,rangeEnd:1767441}

[0100] {"ver":6,"scrip_ver":8,rangeEnd:1867488}

[0101] {"ver":5,"scrip_ver":8,rangeEnd:1967497}

[0102] {"ver":6,"scrip_ver":8,rangeEnd:2667446}

[0103] {"ver":3,"scrip_ver":8,rangeEnd:3067449}

[0104] {"ver":2,"scrip_ver":8,rangeEnd:127490500}

[0105] {"ver":1,"scrip_ver":8,rangeEnd:127490524}]}

[0106] When a terminal device needs to update an application, it can obtain the application's current version identifier ver N. The length of the file to be downloaded is the rangeEnd of ver=N in the Patchlist file. For example, if the application's current version identifier is 7, then the rangeEnd of ver=7, i.e. "1667499", is taken from the Patchlist file. Then, an incremental patch file with a length of "1667499" bytes can be downloaded from the incremental patch file to update the application.

[0107] In the above application update method, a version difference file corresponding to the latest version identifier is generated based on the resource file corresponding to the latest version identifier and the resource file corresponding to the previous version identifier. This latest version difference file and the version difference files corresponding to previous version identifiers are then merged into an incremental patch file in descending order of version identifier. Furthermore, the byte length of the version difference files corresponding to each version identifier in the incremental patch file is used as the file download length for each version identifier and saved as a patch list file. Subsequently, the terminal device can use the incremental patch file and the patch list file to update the application. In this embodiment of the invention, when updating an application, the terminal device only needs to download the corresponding target incremental patch file from the incremental patch file based on the target file download length determined from the patch list file according to the latest version identifier. This avoids downloading the entire incremental patch file, preventing unnecessary downloads and improving the efficiency of application updates.

[0108] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.

[0109] In an exemplary embodiment, step 501, which involves using the resource file corresponding to the latest version identifier of the application as the version difference file corresponding to the previous version identifier of the application, may include the following steps:

[0110] Obtain the first message digest identifier of the resource file corresponding to the latest version identifier of the application, and the second message digest identifier of the resource file corresponding to the previous version identifier of the application;

[0111] The resource file corresponding to the first message digest identifier, which is different from the second message digest identifier, is made into a version difference file corresponding to the latest version identifier.

[0112] The message digest identifier refers to the value calculated based on the MD5 (Message-Digest Algorithm 5) algorithm. The message digest identifier can be used to determine whether a resource file has changed. Of course, besides MD5, other encryption algorithms that can be used to determine whether a resource file has changed, such as DES, AES, RSA, etc., are also acceptable, and this embodiment of the invention does not impose any limitations on them.

[0113] Specifically, if the first message digest identifier of the resource file corresponding to the latest version identifier of the application is not equal to the second message digest identifier of the resource file corresponding to the previous version identifier of the application, it can be determined that the resource file corresponding to the latest version identifier has changed compared to the resource file of the previous version identifier. Then, a version difference file corresponding to the latest version identifier can be created using the resource file that is different from the previous version identifier.

[0114] As an optional example, dictionary A records the MD5 of each resource file in the previous version identifier. When creating an incremental patch file for the latest version identifier after the application's resource files are updated, the new MD5 of each resource file in the latest version identifier is traversed and compared with the old MD5 of the previous version identifier in dictionary A to find the resource files that have changed. The resource files that have changed are recorded in dictionary B. Then, a version difference file for the latest version identifier can be generated based on the resource files recorded in dictionary B.

[0115] In an exemplary embodiment, after step 502, obtaining the version difference file corresponding to the historical version identifier of the application, the method may further include the following steps:

[0116] Delete the resource files that are identical to those in the version difference file corresponding to the latest version identifier in the version difference file corresponding to the historical version identifier.

[0117] In this embodiment of the invention, each time an incremental patch file is created, all version difference files with version identifiers are repackaged, and resource files contained in the latest version difference file in the old version difference files are deleted. That is, when there are more than two client versions, when creating an incremental patch file, it checks whether the latest changed resource file is in dictionary B. If the name of the resource file exists in dictionary B, the resource file in the corresponding old version difference file is deleted, and a new incremental patch file is created.

[0118] In this embodiment of the invention, assuming that the resource files A, E, and H corresponding to the latest version identifier of the application have changed, it is necessary to recreate the incremental patch file. Figure 7 Dictionary A contains the MD5 hashes of all resource files identified by the previous version. Figure 8 The execution logic is as follows: Dictionary B, which records the MD5 hashes of resource files for each version identifier, is used to store the version differences.

[0119] (1) Scan the latest resource file identified by the latest version and compare it with the MD5 of the resource file identified by the previous version in dictionary A. It was found that the MD5 of resource files A, E and H have changed.

[0120] (2) Scan Dictionary B for A, E, and H resource files. It is found that there is resource A in Diff1 and resource E in Diff2.

[0121] (3)Reference Figure 9 All Diff packages (version difference files) are repackaged. Resource file A in Diff1 and resource file E in Diff2 are deleted. The latest Diff8 contains resource files A, E, and H. In this way, the size of the incremental patch file is controlled and will not increase indefinitely, and there will be no redundancy on the terminal device, reducing unnecessary resource file downloads.

[0122] After creating the Diff packages required for each client version identifier, they are concatenated in reverse order of version identifier to form an incremental patch file. This allows even users with various client versions on their devices to extract the corresponding Diff packages from the incremental patch file for updates based on the version identifier. Furthermore, the closer the client is to the latest version, the fewer incremental patch files need to be downloaded, because only the most recently differing parts need to be downloaded to complete the application update.

[0123] For example, refer to Figure 6The current client's latest version is identified as Ver9, and the oldest version is identified as Ver1. The Diff packages corresponding to each client version identifier are obtained as Diff_Ver1, Diff_Ver2, Diff_Ver3, Diff_Ver4, Diff_Ver5, Diff_Ver6, Diff_Ver7, and Diff_Ver8. These packages are then concatenated in reverse version order to form an incremental patch file. Finally, the incremental patch file Patch1_9 is obtained by packaging the files.

[0124] Diff_Ver8-Diff_Ver7-Diff_Ver6-Diff_Ver5-Diff_Ver4-Diff_Ver3-Diff-Ver2-Diff-Ver1.

[0125] Specifically, upon receiving incremental patch Patch 1_9, clients can update to the latest version 9. For example, for clients with Ver=8, simply downloading Diff_Ver8 from Patch 1_9 will update them to the latest version 9. Clients with Ver=7 only need to download Diff_Ver8 and Diff_Ver7 from Patch 1_9 to upgrade to the latest version 9.

[0126] Reference Figure 10 The diagram illustrates a flowchart of another embodiment of the application update method of the present invention, applied to a terminal device. Specifically, this embodiment may include the following steps:

[0127] Step 1001: Obtain the current version identifier of the application.

[0128] Step 1002: Obtain the patch list file of the application; the patch list file includes the file download length corresponding to each version identifier of the application, and the file download length is used to represent the byte length of the incremental patch file that needs to be downloaded.

[0129] Step 1003: Obtain the download length of the target file identified by the current version from the patch list file.

[0130] In this embodiment of the invention, when the application is updated, the current version identifier of the application can be obtained, for example, version number 7, and then the patch list file of the application can be obtained to determine the download length of the target file corresponding to the current version based on the patch list file.

[0131] In an exemplary embodiment, step 1002, obtaining the patch list file of the application, may include the following steps:

[0132] Send a network request to the server for a patch list file for the application;

[0133] Receive the patch list file sent by the server in accordance with the network request.

[0134] Specifically, the patch list file is stored on the server. When an application is updated, it can send a network request for the application's patch list file to the server to obtain the corresponding patch list file for the application. Then, the download length of the target file corresponding to the current version can be determined based on the patch list file.

[0135] Step 1004: Download the target incremental patch file from the incremental patch file according to the target file download length.

[0136] Step 1005: Update the application according to the target incremental patch file.

[0137] In this embodiment of the invention, after obtaining the target file download length of the application, the target incremental patch file can be downloaded from the incremental patch file to update the application according to the target incremental patch file.

[0138] In an exemplary embodiment, step 1004, downloading the target incremental patch file from the incremental patch file according to the target file download length, may include the following steps:

[0139] A network request is sent to the server requesting an incremental patch file for the application; the network request includes the download length of the target file; the server is used to extract a target incremental patch file of the download length of the target file from the incremental patch file;

[0140] Receive the target incremental patch file sent by the server.

[0141] This incremental patch file stores the difference files required by different client versions, arranged in reverse chronological order, with the difference files required for newer versions appearing first. Therefore, in this embodiment of the invention, a network request for the application's incremental patch file is sent to the server. This network request includes the download length of the target file corresponding to the current version identifier of the application. Thus, upon receiving this network request, the server can extract the target incremental patch file from the incremental patch file based on the target file download length.

[0142] It's important to note that because invalid and redundant difference files were removed during the incremental patch creation process, the single incremental patch file stored on the server contains no redundant files and is entirely up-to-date and valid. Since the difference files required by different client versions are arranged in descending order within this incremental patch file, we can utilize the target incremental file of a specified length during HTTP downloads to download incremental patch files of varying lengths. This ensures that the server stores only one incremental patch file for the game, while updating different versions of the game.

[0143] In the above application update method, when an application update is required, the current version identifier of the application is obtained, the patch list file of the application is obtained, the target file download length of the current version identifier is obtained from the patch list file, and the target incremental patch file is downloaded from the incremental patch file according to the target file download length. Finally, the application can be updated according to the target incremental patch file. Since this embodiment of the invention only stores the incremental patch file of one game on the server, instead of storing multiple incremental patch files of different versions on the server, it is not necessary to download the entire incremental patch file, avoiding the download of unnecessary target incremental patch files and improving the application update efficiency.

[0144] Reference Figure 11 On the terminal device side, the specific update logic is as follows:

[0145] 1. Obtain the client's local version number N. The length of the file to be downloaded is the rangeEnd corresponding to ver=N in the Patchlist file. For example, if the local version number is 7, then take the rangeEnd of ver=7.

[0146] 2. The client initiates an HTTP request to download the target incremental patch file of the specified length.

[0147] 3. The client extracts the downloaded target incremental patch file to complete the application update.

[0148] Reference Figure 12The server stores the incremental patch file Patch1_9 for the application, which is currently the latest version Ver10. Patch1_9 contains Diff_Ver 8 (the version difference file between Ver8 and Ver9), Diff_Ver7 (the version difference file between Ver7 and Ver8), Diff_Ver 6 (the version difference file between Ver6 and Ver7), Diff_Ver 5 (the version difference file between Ver5 and Ver6), Diff_Ver 4 (the version difference file between Ver4 and Ver5), Diff_Ver 3 (the version difference file between Ver3 and Ver4), Diff_Ver 2 (the version difference file between Ver2 and Ver3), and Diff_Ver 1 (the version difference file between Ver1 and Ver2).

[0149] For each client version, simply obtain the corresponding target incremental patch file from the incremental patch file Patch1_9 according to its version identifier. For example, assuming an update from Ver8 to Ver9, the required target incremental file is Diff_Ver 8; assuming an update from Ver7 to Ver9, the required target incremental files are Diff_Ver 8 and Diff_Ver 7; assuming an update from Ver6 to Ver9, the required target incremental files are Diff_Ver 8, Diff_Ver 7, and Diff_Ver 6; assuming an update from Ver5 to Ver9, the required target incremental files are Diff_Ver 8, Diff_Ver 7, Diff_Ver 6, and Diff_Ver 5; assuming an update from Ver4 to Ver9, the required target incremental files are Diff_Ver 8, Diff_Ver 7, Diff_Ver 6, Diff_Ver 5, and Diff_Ver 4; assuming an update from Ver3 to Ver9, the required target incremental files are Diff_Ver 8, Diff_Ver 7, Diff_Ver 6, Diff_Ver 5, and Diff_Ver 6. 4. Diff_Ver3; Assuming an update from Ver2 to Ver9, the required target incremental files are Diff_Ver 8, Diff_Ver 7, Diff_Ver 6, Diff_Ver 5, Diff_Ver 4, Diff_Ver 3, and Diff_Ver 2; assuming an update from Ver1 to Ver9, the required target incremental files are Diff_Ver 8, Diff_Ver 7, Diff_Ver 6, Diff_Ver 5, Diff_Ver 4, Diff_Ver 3, Diff_Ver 2, and Diff_Ver 1. It can be seen that the higher the current version identifier of the application, the smaller the target incremental patch file.

[0150] To enable those skilled in the art to better understand the embodiments of the present invention, a specific implementation is described below.

[0151] The core content of this invention's embodiments is mainly divided into three parts. The first part is the difference processing when creating the difference resource set for each version; the second part is merging the difference resource sets of each version into a final incremental patch file, with the server storing only this unique incremental patch file; the third part is the logic of the game client downloading the incremental patch file according to different file lengths, ensuring that the server has only one incremental patch file, thus enabling different versions to be updated to the latest version.

[0152] 1) Create version update patch

[0153] (1) Dictionary A records the MD5 of each resource in the previous client version.

[0154] (2) When creating a new incremental patch file after a resource file is updated, iterate through the MD5 hash of each current resource and compare it with the old MD5 hash of the previous version in dictionary A to find the resource files that have changed. The changed resource files are recorded in dictionary B, and a version difference package is created according to the Unity3D standard.

[0155] (3) In each incremental patch file created in this embodiment of the invention, the version difference files for all client versions are rewritten, and the resource files contained in the latest version difference file in the old version version difference files are removed. That is, when there are more than 2 client versions, when creating the version difference file, based on step (2), it will check whether the latest changed resource file is in dictionary B. If the resource name exists in dictionary B, the resource file in the corresponding old version version difference file will be deleted, and a new version difference file will be created.

[0156] 2) Package the final, unique incremental patch file

[0157] In order of version, the latest version's difference file is placed first, and the difference sets of each version are merged in reverse order to create an incremental patch file. In the end, only this one incremental patch file needs to be released.

[0158] 3) Client-side download logic based on different file lengths

[0159] (1) The server stores a Patchlist file, which records the required file download length for each client version in the rangeEnd field.

[0160] (2) Obtain the local version number N of the client. The download length of the file to be downloaded is the rangeEnd of the corresponding ver=N in the Patchlist. For example, if the local version number is 7, then take the rangeEnd of ver=7.

[0161] (3) The client initiates an HTTP request to download the specified file length of the unique incremental patch file on the server, which is then used as the target incremental patch file for client updates.

[0162] Applying the embodiments of the present invention has at least the following advantages:

[0163] (1) Improve download speed

[0164] In this embodiment of the invention, a unique incremental patch file is merged into a single file on the client side. Based on the newness of different versions, different file download lengths are downloaded from the incremental patch file as the target incremental patch file. In this embodiment of the invention, only two HTTP requests to the server are required to complete the download. Specifically, one HTTP request is sent to the server to request the Patchlist file to determine the file download length to be downloaded from the incremental patch file. The other HTTP request is sent based on the rangeEnd field in the Patchlist file, which contains the file download length, to download the file download length from the incremental patch file.

[0165] The current network environment has entered the 5G era, with theoretical download speeds reaching 20Gbps. However, older patch release methods often have download speeds below 1MB / s, which is extremely slow. The main reason is that updates require sending multiple HTTP requests, with time spent establishing connections with the server. This invention solves this problem by requiring only two HTTP requests, fully utilizing bandwidth and allowing users to enjoy the ultra-fast download speeds of 5G. Laboratory tests show that, under the same conditions, the download speed of this invention is more than six times that of the scattered file patching method. It is understandable that the increased download speed of incremental patch files directly reduces download waiting time during application updates, significantly reducing user churn due to application update delays.

[0166] (2) Reduce difference verification time

[0167] During the creation process before the incremental patch file is released, the version difference files for each version have been calculated and concatenated in reverse order to form an incremental patch file. When the application on the terminal device is updated, it is only necessary to download the corresponding file from the incremental patch file according to the agreed file download length and then decompress it to update the application. There is no need to compare the file differences between the client and the server again, which further reduces the waiting time.

[0168] (3) The total size of incremental patch files is controllable, and no resource redundancy will be generated locally after the client updates the incremental patch files.

[0169] Each time an incremental patch file for the application is created, the version difference files for all versions are rewritten and packaged. If a resource file modified in the latest version's difference file also exists in an older version's difference file, the resource file with the same name in the older version's difference file is deleted. This avoids clients downloading useless resource files during updates, preventing redundancy. Furthermore, the size of the incremental patch file can be controlled, preventing it from growing indefinitely. The incremental patch files stored on the server will always be smaller than the total size of the latest application package.

[0170] (4) The server stores only one incremental patch file, which minimizes the storage and upload pressure on the server.

[0171] Since the server only needs to store one incremental patch file, and the size of this incremental patch file is controllable, the storage pressure on the server is reduced to the greatest extent, as well as the time spent uploading the incremental patch file, making maintenance simple.

[0172] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0173] Reference Figure 13 The diagram illustrates a structural block diagram of an embodiment of an application update device according to the present invention, applied to a server. Specifically, this embodiment may include the following modules:

[0174] The version difference file generation module 1301 is used to take the resource file corresponding to the latest version identifier of the application and the resource file corresponding to the previous version identifier of the application as the version difference file corresponding to the latest version identifier.

[0175] Version difference file acquisition module 1302 is used to acquire the version difference file corresponding to the historical version identifier of the application.

[0176] The version difference file merging module 1303 is used 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 the high and low order of the version identifiers.

[0177] The patch list file generation module 1304 is used to take the byte length of the version difference file corresponding to each version identifier in the incremental patch file as the download length of the file corresponding to each version identifier and save it as a patch list file; wherein, the incremental patch file and the patch list file are used to update the application on the terminal device.

[0178] In an exemplary embodiment, the version difference file generation module 1301 is used to obtain a first message digest identifier of the resource file corresponding to the latest version identifier of the application, and a second message digest identifier of the resource file corresponding to the previous version identifier of the application; and to create a version difference file corresponding to the latest version identifier by taking the resource file corresponding to the first message digest identifier that is different from the second message digest identifier.

[0179] In one exemplary embodiment, the apparatus further includes a resource file deletion module, configured to delete resource files that are identical to those in the version difference file corresponding to the latest version identifier in the version difference file corresponding to the historical version identifier.

[0180] Reference Figure 14 The diagram illustrates a structural block diagram of an embodiment of an application update device according to the present invention, applied to a terminal device. Specifically, this embodiment may include the following modules:

[0181] Version identifier acquisition module 1401 is used to obtain the current version identifier of the application;

[0182] The patch list file acquisition module 1402 is used to acquire the patch list file of the application; the patch list file includes the file download length corresponding to each version identifier of the application, and the file download length is used to represent the byte length of the incremental patch file that needs to be downloaded;

[0183] The file download length determination module 1403 is used to obtain the target file download length of the current version identifier from the patch list file;

[0184] The incremental patch file download module 1404 is used to download the target incremental patch file from the incremental patch file according to the target file download length;

[0185] Application update module 1405 is used to update the application according to the target incremental patch file.

[0186] In one exemplary embodiment, the patch list file acquisition module 1402 is configured to send a network request to the server requesting a patch list file for the application; and receive the patch list file sent by the server according to the network request.

[0187] In one exemplary embodiment, the incremental patch file download module 1404 is configured to send a network request to the server requesting an incremental patch file for the application; the network request includes the target file download length; the server is configured to extract a target incremental patch file of the target file download length from the incremental patch file; and receive the target incremental patch file sent by the server.

[0188] In one exemplary embodiment, the higher the current version identifier of the application, the smaller the target incremental patch file.

[0189] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0190] In addition, embodiments of the present invention also provide an electronic device, such as... Figure 15 As shown, it includes a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.

[0191] The memory 1503 is used to store computer programs; the processor 1501, when executing the program stored in the memory 1503, performs the following steps:

[0192] The resource file that is different from the resource file corresponding to the latest version identifier of the application is used as the version difference file corresponding to the latest version identifier;

[0193] Obtain the version difference file corresponding to the historical version identifier of the application;

[0194] The version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier are merged into an incremental patch file according to the high and low order of the version identifiers.

[0195] The byte length of the version difference file corresponding to each version identifier in the incremental patch file is used as the download length of the file corresponding to each version identifier and saved as a patch list file; wherein, the incremental patch file and the patch list file are used to update the application on the terminal device.

[0196] Optionally, the step of using the resource file corresponding to the latest version identifier of the application, which is different from the resource file corresponding to the previous version identifier of the application, as the version difference file corresponding to the latest version identifier includes:

[0197] Obtain the first message digest identifier of the resource file corresponding to the latest version identifier of the application, and the second message digest identifier of the resource file corresponding to the previous version identifier of the application;

[0198] The resource file corresponding to the first message digest identifier, which is different from the second message digest identifier, is made into a version difference file corresponding to the latest version identifier.

[0199] Optionally, after obtaining the version difference file corresponding to the historical version identifier of the application, the method further includes:

[0200] Delete the resource files that are identical to those in the version difference file corresponding to the latest version identifier in the version difference file corresponding to the historical version identifier.

[0201] Optionally, the incremental patch file is one.

[0202] When the computer program is executed by the processor, it also performs the following steps:

[0203] Get the current version identifier of the application;

[0204] Obtain the patch list file of the application; the patch list file includes the file download length corresponding to each version identifier of the application, and the file download length is used to represent the byte length of the incremental patch file that needs to be downloaded;

[0205] Obtain the download length of the target file identified by the current version from the patch list file;

[0206] Download the target incremental patch file from the incremental patch file according to the target file download length;

[0207] Update the application according to the target incremental patch file.

[0208] Optionally, obtaining the patch list file for the application includes:

[0209] Send a network request to the server for a patch list file for the application;

[0210] Receive the patch list file sent by the server in accordance with the network request.

[0211] Optionally, downloading the target incremental patch file from the incremental patch file according to the target file download length includes:

[0212] A network request is sent to the server requesting an incremental patch file for the application; the network request includes the download length of the target file; the server is used to extract a target incremental patch file of the download length of the target file from the incremental patch file;

[0213] Receive the target incremental patch file sent by the server.

[0214] Optionally, the incremental patch file is a single file; the higher the current version identifier of the application, the smaller the target incremental patch file.

[0215] When updating applications, terminal devices only need to download the target file determined from the patch list file based on the latest version identifier, and then download the corresponding target incremental patch file from the incremental patch file. This avoids downloading the entire incremental patch file, thus improving the efficiency of application updates.

[0216] Since only one incremental patch file for the game is stored on the server, instead of multiple incremental patch files for different versions, there is no need to download the entire incremental patch file. This avoids downloading unnecessary target incremental patch files and improves the efficiency of application updates.

[0217] This invention discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the following steps:

[0218] The resource file that is different from the resource file corresponding to the latest version identifier of the application is used as the version difference file corresponding to the latest version identifier;

[0219] Obtain the version difference file corresponding to the historical version identifier of the application;

[0220] The version difference file corresponding to the latest version identifier and the version difference file corresponding to the historical version identifier are merged into an incremental patch file according to the high and low order of the version identifiers.

[0221] The byte length of the version difference file corresponding to each version identifier in the incremental patch file is used as the download length of the file corresponding to each version identifier and saved as a patch list file; wherein, the incremental patch file and the patch list file are used to update the application on the terminal device.

[0222] Optionally, the step of using the resource file corresponding to the latest version identifier of the application, which is different from the resource file corresponding to the previous version identifier of the application, as the version difference file corresponding to the latest version identifier includes:

[0223] Obtain the first message digest identifier of the resource file corresponding to the latest version identifier of the application, and the second message digest identifier of the resource file corresponding to the previous version identifier of the application;

[0224] The resource file corresponding to the first message digest identifier, which is different from the second message digest identifier, is made into a version difference file corresponding to the latest version identifier.

[0225] Optionally, after obtaining the version difference file corresponding to the historical version identifier of the application, the method further includes:

[0226] Delete the resource files that are identical to those in the version difference file corresponding to the latest version identifier in the version difference file corresponding to the historical version identifier.

[0227] Optionally, the incremental patch file is one.

[0228] When the computer program is executed by the processor, it also performs the following steps:

[0229] Get the current version identifier of the application;

[0230] Obtain the patch list file of the application; the patch list file includes the file download length corresponding to each version identifier of the application, and the file download length is used to represent the byte length of the incremental patch file that needs to be downloaded;

[0231] Obtain the download length of the target file identified by the current version from the patch list file;

[0232] Download the target incremental patch file from the incremental patch file according to the target file download length;

[0233] Update the application according to the target incremental patch file.

[0234] Optionally, obtaining the patch list file for the application includes:

[0235] Send a network request to the server for a patch list file for the application;

[0236] Receive the patch list file sent by the server in accordance with the network request.

[0237] Optionally, downloading the target incremental patch file from the incremental patch file according to the target file download length includes:

[0238] A network request is sent to the server requesting an incremental patch file for the application; the network request includes the download length of the target file; the server is used to extract a target incremental patch file of the download length of the target file from the incremental patch file;

[0239] Receive the target incremental patch file sent by the server.

[0240] Optionally, the incremental patch file is a single file; the higher the current version identifier of the application, the smaller the target incremental patch file.

[0241] When updating applications, terminal devices only need to download the target file determined from the patch list file based on the latest version identifier, and then download the corresponding target incremental patch file from the incremental patch file. This avoids downloading the entire incremental patch file, thus improving the efficiency of application updates.

[0242] Since only one incremental patch file for the game is stored on the server, instead of multiple incremental patch files for different versions, there is no need to download the entire incremental patch file. This avoids downloading unnecessary target incremental patch files and improves the efficiency of application updates.

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

[0244] The communication interface is used for communication between the aforementioned terminal and other devices.

[0245] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0246] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0247] like Figure 16 As shown, in another embodiment of the present invention, a computer-readable storage medium 1601 is also provided, which stores instructions that, when run on a computer, cause the computer to execute the application update method described in the above embodiments.

[0248] In another embodiment of the present invention, a computer program product is also provided. The program product is stored in a storage medium and is executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0249] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0250] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0251] This invention is 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 block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0252] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0253] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0254] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0255] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0256] The above provides a detailed description of an application update method, an application update device, an electronic device, and a storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An application update method, characterized in that, Applied to a server, the method includes: Perform the following operations sequentially on each version of the application: The resource file corresponding to the current version identifier of the application that is different from the resource file corresponding to the previous version identifier of the application is taken as the version difference file corresponding to the current version identifier; Obtain the version difference files corresponding to each version identifier of the application; 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 the high and low order of the version identifier; The byte length of the version difference file corresponding to each version identifier in the incremental patch file is used as the download length of the file corresponding to each version identifier and saved as a patch list file; wherein, the incremental patch file and the patch list file are used to download the target incremental patch file, the target incremental patch file is used to update the application on the terminal device, the download length of the file corresponding to the current version identifier of the application in the patch list file is the byte length of the target incremental patch file, and the starting position of the incremental patch file is consistent with the starting position of the target incremental patch file.

2. The method according to claim 1, characterized in that, The step of using the resource file corresponding to the latest version identifier of the application, which differs from the resource file corresponding to the previous version identifier of the application, as the version difference file corresponding to the latest version identifier includes: Obtain the first message digest identifier of the resource file corresponding to the latest version identifier of the application, and the second message digest identifier of the resource file corresponding to the previous version identifier of the application; The resource file corresponding to the first message digest identifier, which is different from the second message digest identifier, is made into a version difference file corresponding to the latest version identifier.

3. The method according to claim 1 or 2, characterized in that, After obtaining the version difference file corresponding to the historical version identifier of the application, the method further includes: Delete the resource files that are identical to those in the version difference file corresponding to the latest version identifier in the version difference file corresponding to the historical version identifier.

4. The method according to claim 1, characterized in that, The incremental patch file is one.

5. An application update method, characterized in that, Applied to a terminal device, the method includes: Get the current version identifier of the application; Obtain the patch list file of the application; the patch list file includes the file download length corresponding to each version identifier of the application, the file download length is used to represent the byte length of the incremental patch file to be downloaded, the incremental patch file includes the difference files required by different version clients, sorted and merged according to the high and low order of the version identifier; the difference files required by different version clients include the difference files corresponding to all consecutive version identifiers from the current version identifier to the version identifier preceding the latest version identifier, and the difference files corresponding to each version identifier are determined by the resource files corresponding to each version identifier and the resource files corresponding to the previous version identifier; Obtain the download length of the target file identified by the current version from the patch list file; Download the target incremental patch file from the incremental patch file according to the target file download length; the target file download length of the current version identifier is the byte length of the target incremental patch file, and the starting position of the incremental patch file is consistent with the starting position of the target incremental patch file; The application is updated according to the target incremental patch file; the updated version of the application is identified by the latest version identifier.

6. The method according to claim 5, characterized in that, The step of obtaining the patch list file for the application includes: Send a network request to the server for a patch list file for the application; Receive the patch list file sent by the server in accordance with the network request.

7. The method according to claim 5, characterized in that, The step of downloading the target incremental patch file from the incremental patch file according to the target file download length includes: A network request is sent to the server requesting an incremental patch file for the application; the network request includes the download length of the target file; the server is used to extract a target incremental patch file of the download length of the target file from the incremental patch file; Receive the target incremental patch file sent by the server.

8. The method according to claim 5, characterized in that, The incremental patch file is a single file; the higher the current version identifier of the application, the smaller the target incremental patch file.

9. An application update device, characterized in that, Applied to a server, the device includes: The version difference file generation module is used to perform the following operations sequentially on each version of the application: the resource file corresponding to the current version identifier of the application that is different from the resource file corresponding to the previous version identifier of the application is used as the version difference file corresponding to the current version identifier. The version difference file acquisition module is used to acquire the version difference files corresponding to each version identifier of the application. The version difference file merging module is used 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 the high and low order of the version identifier. The patch list file generation module is used to take the byte length of the version difference file corresponding to each version identifier in the incremental patch file as the download length of the file corresponding to each version identifier and save it as a patch list file; wherein, the incremental patch file and the patch list file are used to download the target incremental patch file, the target incremental patch file is used to update the application on the terminal device, the download length of the file corresponding to the current version identifier of the application in the patch list file is the byte length of the target incremental patch file, and the starting position of the incremental patch file is consistent with the starting position of the target incremental patch file.

10. An application update device, characterized in that, Applied to a terminal device, the device includes: The version identifier acquisition module is used to obtain the current version identifier of the application; The patch list file acquisition module is used to acquire the patch list file of the application. The patch list file includes the file download length corresponding to each version identifier of the application. The file download length is used to represent the byte length of the incremental patch file to be downloaded. The incremental patch file includes the difference files required by different version clients, which are sorted and merged according to the high and low order of the version identifier. The difference files required by different version clients include the difference files corresponding to all consecutive version identifiers from the current version identifier to the version identifier preceding the latest version identifier. The difference files corresponding to each version identifier are determined by the resource file corresponding to each version identifier and the resource file corresponding to the previous version identifier. The file download length determination module is used to obtain the download length of the target file identified by the current version from the patch list file; The incremental patch file download module is used to download the target incremental patch file from the incremental patch file according to the target file download length; the target file download length of the current version identifier is the byte length of the target incremental patch file, and the starting position of the incremental patch file is consistent with the starting position of the target incremental patch file; An application update module is used to update the application according to the target incremental patch file; the updated version of the application is identified by the latest version identifier.

11. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the application update method as described in any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the application update method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Incremental updating method and device, storage medium and electronic equipment

    CN110262827A

  • Patch generation method and device

    CN111008034A