Resource incremental update method and system based on rolling sub-packet

By using a rolling sub-package resource incremental update method, an ordered sub-package set is constructed and pushed sequentially, which solves the problems of large number of incremental packages and high storage and computing costs, and achieves efficient resource file updates.

CN122111479APending Publication Date: 2026-05-29珠海剑心互动娱乐有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
珠海剑心互动娱乐有限公司
Filing Date
2026-01-05
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing incremental update methods result in a large number of incremental packages when software resource files are packaged, leading to uncontrollable storage and computing costs. Furthermore, differences in versions among different users result in coarse differential granularity, making efficient management impossible.

Method used

An incremental resource update method based on rolling sub-packets is adopted. This method involves constructing an ordered set of resource sub-packets, deleting the target file and constructing a new sub-packet at the beginning, pushing the sub-packets to the client in sequence, and using an MD5 table to determine file consistency to complete the update.

Benefits of technology

The number of incremental resource packages has been reduced, storage and computing overhead has been lowered, update efficiency has been improved, download volume has been reduced, and the needs of different client versions have been adapted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111479A_ABST
    Figure CN122111479A_ABST
Patent Text Reader

Abstract

The application provides a resource incremental updating method and system based on rolling packaging, which comprises the following steps: arranging a plurality of resource packages in a packaging set in order, and saving each resource file in a resource package uniquely; after publishing a target file of a new version, deleting the resource file of the old version corresponding to the target file in the packaging set; constructing a new resource package based on all target files in the packaging set; when an updating request of a client is obtained, pushing one resource package to the client at a time based on the packaging set until the resource file of the client is the same as the packaging set. According to the technical scheme of the embodiment of the application, the new resource package can be constructed after the new version is published, the version difference chain is represented by the order of the resource package, when the updating of the client of different versions is initiated, only a plurality of resource packages of different numbers need to be downloaded in order, the file consistency is used as the judgment basis for completing the updating, and the storage and calculation cost is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software incremental update technology, and in particular to a resource incremental update method and system based on rolling sub-packages. Background Technology

[0002] Incremental updates or differential updates are common update methods in the software field. They transfer only the changed data between the old and new versions, rather than the entire file set, thereby greatly reducing the amount of data that needs to be downloaded, optimizing network resource utilization, and shortening update time.

[0003] However, software resource files are not stored as loose files, but rather packaged into single container files, such as the .pak files used by Unreal Engine or the Android App Bundle format. In this case, any modification will change the hash value of the entire packaged file. When a version update involves a large number of files, it is easy for all packaged files to be identified as modified files, requiring the download of a large number of outdated resource files during incremental updates. Furthermore, different users have different client versions, and each new version release must retain a difference package pointing to its predecessor for each version. Therefore, existing incremental update methods have a coarse-grained approach to file differences, resulting in a large number of incremental packages after multiple iterations, leading to uncontrollable storage, computation, and management costs. Summary of the Invention

[0004] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a resource incremental update method and system based on rolling sub-packets, which can perform rolling sub-packets according to the update file, reducing the total number of incremental resource packages and the number of downloads, thereby reducing storage and computing costs.

[0005] In a first aspect, embodiments of the present invention provide a resource incremental update method based on rolling sub-packages, applied to a server, wherein the server and a client are connected in communication, and the method includes: Obtain a first version of the subpackage set, wherein the subpackage set includes at least one ordered resource subpackage, each resource subpackage includes at least one resource file of the first version, and when the first version is the first version, the number of resource subpackages is one and includes all the resource files; Obtain at least one target file for the second version release, wherein the target file is a resource file added or modified in the second version, and the second version is the next version after the first version; Delete the resource file of the first version corresponding to the target file from the subpackage set, and construct a new resource subpackage based on all the target files in the subpackage set, wherein the new resource subpackage is located at the beginning of the subpackage set; When an update request is received from the client, one resource sub-packet is pushed to the client each time based on the sub-packet set, until the resource file of the client is the same as the sub-packet set.

[0006] According to some embodiments of the present invention, constructing new resource sub-packages based on all the target files in the sub-package set includes: Determine the data volume of the resource sub-packet that is currently ranked first in the sub-packet set; When the amount of data in the subpackage is greater than or equal to a preset threshold, a new resource subpackage is constructed based on all the target files, and the new resource subpackage is inserted at the beginning of the subpackage set; Alternatively, when the amount of data in the subpackage is less than the preset threshold, all the target files are inserted into the resource subpackage that is currently ranked first.

[0007] According to some embodiments of the present invention, after constructing a new resource subpackage based on all the target files in the subpackage set, the method further includes: If at least one of the resource subpackages is empty, delete the corresponding resource subpackage. When the number of resource packages exceeds a preset number, the last two resource packages are merged and sorted.

[0008] According to some embodiments of the present invention, pushing one resource sub-packet to the client at a time based on the sub-packet set until the resource file of the client is the same as the sub-packet set includes: A first MD5 table is constructed based on the current packet set, and the first MD5 table is sent to the client, wherein the first MD5 table is used to represent all the resource files of the packet set; When the second MD5 table on the client's local machine is different from the first MD5 table, the first resource packet of the packet set is downloaded by the client, and the second MD5 table on the local machine is updated, wherein the second MD5 table is used to represent all the resource files of the client; The update ends when the first MD5 table is the same as the updated second MD5 table. When the first MD5 table is different from the updated second MD5 table, the next resource sub-packet of the sub-packet set is downloaded through the client.

[0009] Secondly, embodiments of the present invention provide a resource incremental update system based on rolling sub-packages, configured on a server, wherein the server is communicatively connected to a client, and the resource incremental update system includes: The subpackage acquisition module is used to acquire a first version of the subpackage set, wherein the subpackage set includes at least one ordered resource subpackage, each resource subpackage includes at least one resource file of the first version, and when the first version is the first version, the number of resource subpackages is one and includes all the resource files; The file acquisition module is used to acquire at least one target file released in the second version, wherein the target file is the resource file added or modified in the second version, and the second version is the next version after the first version; A rolling module is used to delete the resource file of the first version corresponding to the target file in the sub-package set, and construct a new resource sub-package based on all the target files in the sub-package set, wherein the new resource sub-package is located at the beginning of the sub-package set; The update module is used to push one resource sub-packet to the client each time based on the sub-packet set when an update request is received from the client, until the resource file of the client is the same as the sub-packet set.

[0010] According to some embodiments of the present invention, the scrolling module further includes: The data volume determination module is used to determine the data volume of the resource sub-package that is currently ranked first in the sub-package set; The first sub-package module is used to construct a new resource sub-package based on all the target files when the sub-package data volume is greater than or equal to a preset threshold, and insert the new resource sub-package at the beginning of the sub-package set; The second sub-package module is used to insert all the target files into the resource sub-package that is currently ranked first when the sub-package data volume is less than the preset threshold.

[0011] According to some embodiments of the present invention, the scrolling module further includes: The deletion module is used to delete the corresponding resource package when at least one of the resource packages is empty. The merging module is used to merge the last two resource sub-packets when the number of resource sub-packets is greater than a preset number.

[0012] According to some embodiments of the present invention, the updating module further includes: The table acquisition module constructs a first MD5 table based on the current packet set and sends the first MD5 table to the client, wherein the first MD5 table is used to represent all the resource files of the packet set; The first update module, when the second MD5 table on the client's local machine is different from the first MD5 table, downloads the first resource sub-packet of the sub-packet set through the client and updates the local second MD5 table, wherein the second MD5 table is used to represent all the resource files of the client; The second update module is used to end the update when the first MD5 table is the same as the updated second MD5 table. The third update module is used to download the next resource sub-packet of the sub-packet set through the client when the first MD5 table is different from the updated second MD5 table.

[0013] Thirdly, embodiments of the present invention provide a resource incremental update apparatus based on rolling sub-packets, including at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the resource incremental update method based on rolling sub-packets as described in the first aspect above.

[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for performing the resource incremental update method based on rolling sub-packaging as described in the first aspect above.

[0015] The incremental resource update method based on rolling sub-packages according to embodiments of the present invention has at least the following beneficial effects: Obtaining a first version sub-package set, wherein the sub-package set includes at least one ordered resource sub-package, each resource sub-package including at least one resource file of the first version; when the first version is the first version, the number of resource sub-packages is one and includes all the resource files; obtaining at least one target file for a second version release, wherein the target file is a resource file added or modified in the second version, and the second version is the next version of the first version; deleting the resource file of the first version corresponding to the target file from the sub-package set, constructing a new resource sub-package based on all the target files in the sub-package set, wherein the new resource sub-package is located at the beginning of the sub-package set; when an update request is received from the client, pushing one resource sub-package to the client each time based on the sub-package set, until the resource file of the client is the same as the sub-package set. According to the technical solution of the present invention, new resource packages can be built on a rolling basis after a new version is released. Each resource file is stored in only one resource package with the latest version. The version differential chain is represented by the sorting of resource packages. When a client with a different version initiates an update, it only needs to download different numbers of resource packages in sequence. The consistency of files is used as the criterion for completing the update. There is no need to resolve version dependencies, which effectively reduces the storage and computing overhead. Attached Figure Description

[0016] Figure 1 This is a flowchart of a resource incremental update method based on rolling sub-packages provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the sub-package set obtained by multiple version rolling sub-packages provided in another embodiment of the present invention; Figure 3 This is a flowchart illustrating a client update example provided in another embodiment of the present invention; Figure 4 This is a structural diagram of a resource incremental update system based on rolling subcontracting provided in another embodiment of the present invention; Figure 5 This is a structural diagram of a resource incremental update device based on rolling subcontracting provided in another embodiment of the present invention; Detailed Implementation Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0017] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0018] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0019] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0020] This invention provides a method and system for incremental resource updates based on rolling sub-packages. The method includes: obtaining a first version of a sub-package set, wherein the sub-package set includes at least one ordered resource sub-package, each resource sub-package including at least one resource file of the first version, and when the first version is the first version, the number of resource sub-packages is one and includes all the resource files; obtaining at least one target file for a second version release, wherein the target file is a resource file added or modified in the second version, and the second version is the next version of the first version; deleting the resource file of the first version corresponding to the target file from the sub-package set, constructing a new resource sub-package based on all the target files in the sub-package set, wherein the new resource sub-package is located at the beginning of the sub-package set; when an update request is received from the client, pushing one resource sub-package to the client each time based on the sub-package set, until the resource files of the client are the same as those in the sub-package set. According to the technical solution of the present invention, new resource packages can be built on a rolling basis after a new version is released. Each resource file is stored in only one resource package with the latest version. The version differential chain is represented by the sorting of resource packages. When a client with a different version initiates an update, it only needs to download different numbers of resource packages in sequence. The consistency of files is used as the criterion for completing the update. There is no need to resolve version dependencies, which effectively reduces the storage and computing overhead.

[0021] The technical solutions of the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0022] Reference Figure 1 , Figure 1 The flowchart illustrates a resource incremental update method based on rolling sub-packets, which includes, but is not limited to, the following steps: S10, obtain the first version of the subpackage set, wherein the subpackage set includes at least one ordered resource subpackage, each resource subpackage includes at least one resource file of the first version, and when the first version is the first version, the number of resource subpackages is one and includes all resource files.

[0023] It should be noted that the subpackage set in this embodiment includes multiple resource subpackages, which are arranged in order, for example, by number. After a new resource subpackage is generated in each new version, the number of each existing resource subpackage is incremented by one.

[0024] It should be noted that in the first version, the resource subpackage is generated for the first time. Since incremental updates are not involved, the first version has only one resource subpackage, which includes all resource files. For example... Figure 2 As shown, taking the first version as V1 as an example, the resource sub-package corresponding to V1 is sub-package 1. Sub-package 1 includes all resource files. In this embodiment, {fileA, fileB, fileC, ...} represents the initial sub-package 1.

[0025] S20, Obtain at least one target file for the second version release, wherein the target file is a resource file added or modified in the second version, and the second version is the next version after the first version.

[0026] It should be noted that, for ease of description of the technical solution of this embodiment, the first version of this embodiment is the current version, and the second version is the newly released version. Therefore, the first version and the second version are not used to refer to two specific versions, but rather as appellations for the old and new versions. The technical solution of this embodiment performs rolling iteration of resource sub-packaging between the two versions, and executes steps S10 to S30 of this embodiment once each time a new version is released. For example, as shown... Figure 2 As shown, the first version is V1. After obtaining the target file, the second version is V2. After completing the relevant processing in this embodiment, V2 is determined as the first version. After obtaining the target file of V3, the second version is V3, and so on, the technical solution of this embodiment is executed in a rolling manner.

[0027] It should be noted that the target file can be a modified resource file, for example, in V2, fileA can be modified and the target file is fileA (V2); or it can be a newly added resource file, for example, if fileD is added in V2, then fileD is the target file.

[0028] S30, delete the resource file corresponding to the first version of the target file in the subpackage set, and build a new resource subpackage based on all the target files in the subpackage set, wherein the new resource subpackage is located at the first position in the subpackage set.

[0029] It should be noted that in this embodiment, each resource file exists in only one resource sub-package to avoid duplicate file downloads. When the target file is a newly added resource file, since there is no old version of the resource file, there is no need to perform a deletion operation. When the target file is a modified file, the same old version (first version) of the file can be identified in the sub-package set by indexing the filename and other methods, and then deleted.

[0030] The following is combined with Figure 2 The rolling subcontracting process in steps S10 to S30 of this embodiment is illustrated by example: First, in the first version, the sub-package 1 corresponding to version V1 includes {fileA, fileB, fileC, ...}, resulting in a sub-package set consisting of sub-package 1 alone.

[0031] After version V2 is released, the first version is version V1, and the second version is version V2. In version V2, fileA is modified to obtain the target file fileA(V2). FileA is deleted from sub-package 1 and moved to the next sub-package to determine sub-package 2. A new sub-package 1 is generated based on fileA(V2), so that the sub-package set corresponding to the second version V2 includes sub-package 1 {fileA(V2)} and sub-package 2 {fileB, fileC, ...}. After the rolling is completed, the first version is determined to be version V2.

[0032] After version V3 is released, the second version is version V3. The target file fileD is added. There are no files to be deleted. The sequence number of the current two sub-packets is incremented by one. Therefore, the sub-packet set obtained by version V3 is: sub-packet 1 {fileD}, sub-packet 2 {fileA (V2)} and sub-packet 3 {fileB, fileC, ...}.

[0033] The same principle applies to subsequent versions V4 to V6, and will not be repeated here.

[0034] S40: When an update request is received from the client, push one resource sub-packet to the client each time based on the sub-packet set, until the client's resource file is the same as the sub-packet set.

[0035] It should be noted that, according to the description of the above embodiments, in this embodiment, when a new file is released for each version, a new resource package is constructed from the target file and placed at the beginning of the package set. This allows the order of the resource packages to represent the differential chain of the versions. There is no need to repeatedly calculate the difference files between each two versions and generate corresponding incremental packages. When different versions are updated, only different numbers of resource packages need to be downloaded. Thus, the update requirements of all version differences can be met through a single package set. Each resource file in the package set has only one copy. There is no need to generate or maintain a differential package separately for each historical version. When a new version is released, only the packages in the scrolling window need to be updated according to the technical solution of this embodiment, which greatly reduces the complexity of building and deployment.

[0036] It should be noted that update requests can be obtained at any time. In this embodiment, rolling sub-packets are used so that the resource files stored in the later resource sub-packets are the resource files that have not been updated for a longer time, and the resource files of the more recent version are stored in the earlier resource sub-packets. Therefore, when updating the client, the newer the client version, the fewer resource sub-packets need to be downloaded.

[0037] For example, such as Figure 2 As shown, taking the server's current version as V6 as an example, and the client's current version as V5, the difference between the two versions is the addition of fileF in version V6. Therefore, the server first pushes sub-packet 1 from the sub-packet set of version V6 to the client, so that the client can obtain fileF. After the installation of fileF is completed, the client's files are the same as the server's, and it can be determined that the client has completed the update.

[0038] For example, such as Figure 2 As shown, taking the current server version as V6 and the current client version as V3 as an example, the differences between version V3 and version V6 are the addition of fileF in version V6, the addition of fileE in version V5, and the modification of fileB in version V4. The server pushes sub-packet 1 from the sub-packet set of version V6 to the client. After the client installs fileF, the resource files are still different from those in the current sub-packet set on the server, so the server continues to push sub-packet 2 (fileE added in version V5). After the client installs fileE, the resource files are still different from those in the current sub-packet set on the server, so the server continues to push sub-packet 3 (fileB modified in version V4). After installation, the resource files are the same as those on the server, and the update is completed.

[0039] By utilizing the rolling update strategy of resource packages, the technical solution of this embodiment eliminates the need to build difference files between every two versions. When updating a version, it is only necessary to push resource packages one by one. The update is completed based on whether the files on the client and the server are consistent. This reduces the number of resource files that need to be downloaded, and only one set of packages is needed to meet the update requirements of all versions, effectively reducing storage and computing overhead.

[0040] In another embodiment, in step S30, a new resource sub-package is constructed based on all target files in the sub-package set, specifically including but not limited to the following steps: S31, Determine the data volume of the resource sub-package that is currently ranked first in the sub-package set; S32, when the amount of subpackage data is greater than or equal to a preset threshold, construct a new resource subpackage based on all target files and insert the new resource subpackage at the beginning of the subpackage set; S33, when the amount of data in the sub-package is less than the preset threshold, insert all target files into the resource sub-package that is currently ranked first.

[0041] It should be noted that while the above embodiments proposed a rolling packet splitting technical solution, this embodiment further proposes a flexible rolling packet triggering mechanism. The decision is based on the packet data volume of the top-ranked resource packet. When the packet data volume is less than a preset threshold, no new resource packet is constructed; instead, the target file is inserted into the currently top-ranked resource packet. Because the packet data volume is small, even downloading older versions of resource files will not consume excessive resources, reducing inefficient or invalid rolling packets. When the packet data volume is greater than or equal to the preset threshold, a new resource packet is constructed based on all target files, and the rolling packet operation described in the above embodiments is executed.

[0042] It should be noted that the data volume of the sub-package can be either the sub-package size or the number of files. Taking the sub-package size as an example, the preset threshold is set to 5MB. Figure 2 As shown in the example of version V3 adding fileD, if version V2's sub-packet 1 only contains fileA (V2), and this file is less than 5MB, then fileD will be inserted into sub-packet 1, resulting in sub-packet 1 including fileA (V2) and fileD; if fileA (V2) is greater than 5MB, then a new sub-packet 2 will be created based on fileD, and the existing sub-packet 1 will be updated to sub-packet 2.

[0043] In another embodiment, after step S30 is performed, the following steps are included, but are not limited to: S34, when at least one resource subpackage is empty, delete the corresponding resource subpackage; S35: When the number of resource sub-packets exceeds the preset number, merge and sort the last two resource sub-packets.

[0044] It should be noted that each resource file in this embodiment exists in only one resource subpackage. Therefore, if the target file in the previous version was in a resource subpackage with only one resource file, after creating a new resource subpackage, the old resource subpackage will no longer contain any resource files. The empty resource subpackage can then be deleted.

[0045] It should be noted that as the version rollout process continues to increase the number of resource packages, some resource files may not be updated for a long time. Furthermore, each version update corresponds to one resource package, and older resource packages are used for updates less frequently. In this embodiment, a preset number is set to control the number of resource packages. When the number of resource packages after the rollout exceeds the preset number, the last two resource packages are merged to improve overall efficiency.

[0046] For example, such as Figure 2 As shown, the preset quantity is set to 5. The first version is version V5, and the second version is version V6. The sub-package set of version V5 includes 5 resource sub-packages. After the new fileF is released in version V6, sub-packages 4 and 5 of version V5 are merged into a new sub-package 5. The remaining resource sub-packages can be rolled out sequentially.

[0047] In another embodiment, step S40 specifically includes, but is not limited to, the following steps: S41, construct a first MD5 table based on the current packet set, and send the first MD5 table to the client. The first MD5 table is used to represent all resource files in the packet set. S42, when the second MD5 table on the client's local machine is different from the first MD5 table, the client downloads the first resource packet of the packet set and updates the local second MD5 table, where the second MD5 table is used to represent all the resource files of the client; S43, when the first MD5 table is the same as the updated second MD5 table, the update ends; S44, when the first MD5 table is different from the updated second MD5 table, download the next resource packet of the packet set through the client.

[0048] It should be noted that this embodiment updates resources by sending them to the client one by one in batches. An MD5 table is used as the basis for file identification. The server maintains a first MD5 table corresponding to the latest batch set. When the client initiates an update request, it sends a second MD5 table. The first and second MD5 tables are necessarily different, thus triggering the sending of the first resource batch in the batch set to the client. After the client completes the deployment of the resource files updated with the latest version, it updates the second MD5 table. If the client is only one version behind, the updated second MD5 table is the same as the first MD5 table, and the update ends. If the client is multiple versions behind, the second MD5 table will still be different from the first MD5 table, and the next resource batch will be sent, repeating the above operation until the two MD5 tables are the same.

[0049] For example, such as Figure 3 As shown, the server's packet set is based on Figure 2 Taking the package set corresponding to version V6 as an example, after the client initiates an update, it downloads the first MD5 table from the server and reads the second MD5 table locally. If the two are inconsistent, it downloads package 1 from the server and updates the local second MD5 table. If the updated second MD5 table is consistent with the first MD5 table, the update ends; if they are inconsistent, it continues to download package 2 from the server and continues to update the second MD5 table. If the second MD5 table is consistent with the first MD5 table, the update ends; otherwise, it continues to download package 3, and so on, until the second MD5 table is consistent with the first MD5 table, or all resource packages have been downloaded.

[0050] Additionally, refer to Figure 4 This invention provides a resource incremental update system based on rolling sub-packages, configured on a server, with the server and client communicating together. The resource incremental update system includes: The subpackage acquisition module is used to acquire the first version of the subpackage set, wherein the subpackage set includes at least one ordered resource subpackage, each resource subpackage includes at least one resource file of the first version, and when the first version is the first version, the number of resource subpackages is one and includes all resource files; The file acquisition module is used to acquire at least one target file for the second version release, wherein the target file is a resource file added or modified in the second version, and the second version is the next version after the first version; The rolling module is used to delete the first version of the resource file corresponding to the target file in the sub-package set, and build a new resource sub-package based on all the target files in the sub-package set, where the new resource sub-package is located at the beginning of the sub-package set; The update module is used to push one resource sub-packet to the client at a time based on the sub-packet set when an update request is received from the client, until the client's resource file is the same as the sub-packet set.

[0051] It should be noted that the specific principle of the incremental resource update system based on rolling sub-packets can be found in the description of the above embodiment of the incremental resource update method based on rolling sub-packets, and will not be repeated here. Through the incremental resource update system of this embodiment, new resource sub-packets can be built in a rolling fashion after a new version is released. Each resource file is stored in only one resource sub-packet with the latest version. The sorting of resource sub-packets represents the differential chain of versions. When clients with different versions initiate updates, they only need to download different numbers of resource sub-packets sequentially. File consistency is used as the criterion for completing the update, eliminating the need to resolve version dependencies, effectively reducing storage and computational overhead.

[0052] In another embodiment, the scrolling module further includes: The delete module is used to delete the corresponding resource package when at least one resource package is empty. The merge module is used to merge the last two resource packages when the number of resource packages exceeds the preset number.

[0053] It should be noted that the processing principle of resource subpackaging can be referred to the description of the above method embodiments, and will not be repeated here.

[0054] In another embodiment, the scrolling module further includes: The data volume determination module is used to determine the data volume of the resource sub-package that is currently ranked first in the sub-package set; The first sub-package module is used to construct a new resource sub-package based on all target files when the sub-package data volume is greater than or equal to a preset threshold, and insert the new resource sub-package at the beginning of the sub-package set; The second sub-package module is used to insert all target files into the resource sub-package that is currently ranked first when the sub-package data volume is less than a preset threshold.

[0055] It should be noted that the construction principle of resource subpackaging can be referred to the description of the above method embodiments, and will not be repeated here.

[0056] In another embodiment, the update module further includes: The table acquisition module constructs a first MD5 table based on the current packet set and sends the first MD5 table to the client, wherein the first MD5 table is used to represent all the resource files of the packet set; The first update module, when the second MD5 table on the client's local machine is different from the first MD5 table, downloads the first resource sub-packet of the sub-packet set through the client and updates the local second MD5 table, wherein the second MD5 table is used to represent all the resource files of the client; The second update module is used to end the update when the first MD5 table is the same as the updated second MD5 table. The third update module is used to download the next resource sub-packet of the sub-packet set through the client when the first MD5 table is different from the updated second MD5 table.

[0057] It should be noted that the principle of client update can be referred to the description of the above method embodiments, and will not be repeated here.

[0058] like Figure 5 As shown, Figure 5 This is a structural diagram of a resource incremental update device based on rolling sub-packages according to an embodiment of the present invention. The present invention also provides a resource incremental update device based on rolling sub-packages, comprising: The processor 401 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 402 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401 to execute the resource incremental update method based on rolling sub-packages in the embodiments of this application. Input / output interface 403 is used to implement information input and output; The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404); The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.

[0059] This application embodiment also provides a storage medium, which is a computer-readable storage medium, storing a computer program that, when executed by a processor, implements the above-described resource incremental update method based on rolling sub-packages.

[0060] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0061] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0062] The above provides a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A resource incremental update method based on rolling sub-packages, characterized in that, Applied to a server, wherein the server communicates with a client, the method includes: Obtain a first version of the subpackage set, wherein the subpackage set includes at least one ordered resource subpackage, each resource subpackage includes at least one resource file of the first version, and when the first version is the first version, the number of resource subpackages is one and includes all the resource files; Obtain at least one target file for the second version release, wherein the target file is a resource file added or modified in the second version, and the second version is the next version after the first version; Delete the resource file of the first version corresponding to the target file from the subpackage set, and construct a new resource subpackage based on all the target files in the subpackage set, wherein the new resource subpackage is located at the beginning of the subpackage set; When an update request is received from the client, one resource sub-packet is pushed to the client each time based on the sub-packet set, until the resource file of the client is the same as the sub-packet set.

2. The resource incremental update method based on rolling subcontracting according to claim 1, characterized in that, Based on all the target files, a new resource subpackage is constructed from the subpackage set, including: Determine the data volume of the resource sub-packet that is currently ranked first in the sub-packet set; When the amount of data in the subpackage is greater than or equal to a preset threshold, a new resource subpackage is constructed based on all the target files, and the new resource subpackage is inserted at the beginning of the subpackage set; Alternatively, when the amount of data in the subpackage is less than the preset threshold, all the target files are inserted into the resource subpackage that is currently ranked first.

3. The resource incremental update method based on rolling subcontracting according to claim 2, characterized in that, After constructing a new resource subpackage based on all the target files in the subpackage set, the method further includes: If at least one of the resource subpackages is empty, delete the corresponding resource subpackage. When the number of resource packages exceeds a preset number, the last two resource packages are merged and sorted.

4. The resource incremental update method based on rolling subcontracting according to claim 1, characterized in that, Based on the packet set, one resource packet is pushed to the client at a time until the resource file of the client is the same as the packet set, including: A first MD5 table is constructed based on the current packet set, and the first MD5 table is sent to the client, wherein the first MD5 table is used to represent all the resource files of the packet set; When the second MD5 table on the client's local machine is different from the first MD5 table, the first resource packet of the packet set is downloaded by the client, and the second MD5 table on the local machine is updated, wherein the second MD5 table is used to represent all the resource files of the client; The update ends when the first MD5 table is the same as the updated second MD5 table. When the first MD5 table is different from the updated second MD5 table, the next resource sub-packet of the sub-packet set is downloaded through the client.

5. A resource incremental update system based on rolling subcontracting, characterized in that, The incremental resource update system is configured on a server, which communicates with the client, and includes: The subpackage acquisition module is used to acquire a first version of the subpackage set, wherein the subpackage set includes at least one ordered resource subpackage, each resource subpackage includes at least one resource file of the first version, and when the first version is the first version, the number of resource subpackages is one and includes all the resource files; The file acquisition module is used to acquire at least one target file released in the second version, wherein the target file is the resource file added or modified in the second version, and the second version is the next version after the first version; A rolling module is used to delete the resource file of the first version corresponding to the target file in the sub-package set, and construct a new resource sub-package based on all the target files in the sub-package set, wherein the new resource sub-package is located at the beginning of the sub-package set; The update module is used to push one resource sub-packet to the client each time based on the sub-packet set when an update request is received from the client, until the resource file of the client is the same as the sub-packet set.

6. The resource incremental update system based on rolling subcontracting according to claim 5, characterized in that, The scrolling module also includes: The data volume determination module is used to determine the data volume of the resource sub-package that is currently ranked first in the sub-package set; The first sub-package module is used to construct a new resource sub-package based on all the target files when the sub-package data volume is greater than or equal to a preset threshold, and insert the new resource sub-package at the beginning of the sub-package set; The second sub-package module is used to insert all the target files into the resource sub-package that is currently ranked first when the sub-package data volume is less than the preset threshold.

7. The resource incremental update system based on rolling subcontracting according to claim 6, characterized in that, The scrolling module also includes: The deletion module is used to delete the corresponding resource package when at least one of the resource packages is empty. The merging module is used to merge the last two resource sub-packets when the number of resource sub-packets is greater than a preset number.

8. The resource incremental update system based on rolling subcontracting according to claim 5, characterized in that, The update module also includes: The table acquisition module constructs a first MD5 table based on the current packet set and sends the first MD5 table to the client, wherein the first MD5 table is used to represent all the resource files of the packet set; The first update module, when the second MD5 table on the client's local machine is different from the first MD5 table, downloads the first resource sub-packet of the sub-packet set through the client and updates the local second MD5 table, wherein the second MD5 table is used to represent all the resource files of the client; The second update module is used to end the update when the first MD5 table is the same as the updated second MD5 table. The third update module is used to download the next resource sub-packet of the sub-packet set through the client when the first MD5 table is different from the updated second MD5 table.

9. A resource incremental update device based on rolling subcontracting, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform the resource incremental update method based on rolling subcontracting as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the resource incremental update method based on rolling sub-packaging as described in any one of claims 1 to 4.